# Is it necessary to project the initial condition onto the variational space in a fully discrete galerkin method?

I'm solving a simple 1D heat diffusion problem $$u_t=u_{xx},\quad \Omega\times[0,T]$$ $$u=0\quad, \partial\Omega\times [0,T]$$ $$u(x,0)=f$$using a fully discrete galerkin finite element method. This effectively reduces solution of the parabolic problem into solving a recursive sequence of elliptic problems $\{U_h\}^t$, each using the solution from the previous timestep $\{U_h\}^{t-1}$.

I have been told that it is not a good idea to use the initial condition $f$ as $\{U_h\}^0$. Instead, it has been recommended to me to use the projection of $f$ onto the variational space chosen for the weak formulation as $\{U_h\}^0$. I have run some numerical experiments using $f$ instead of its projection and I observe that

1. The errors still approach zero as the spatial and temporal step sizes approach zero.
2. The orders of convergence are still preserved.

Heuristically, it seems to me that projecting the initial condition would introduce more error into the problem than using the $f$ as is. These numerical experiments seem to indicate that it really isn't necessary to obtain consistent, stable solutions (at least, for this problem). Are there situations in which it is crucial to project the initial condition, or is more a matter of taste/mathematical formality?

-
I assume that by "use the initial condidtion $f$ as $\{U_h\}^0$" you mean $U_h^0(x_i) = f(x_i)$? What kind of elements are you using? If you're using an interpolatory basis (e.g. piecewise Lagrange elements), then the project of $f$ onto this basis should be the interpolant (to machine precision). In which case, there should be very little difference between the two approaches. Maybe if @WolfgangBangerth is paying attention, he can verify or refute my memory. –  Bill Barth Dec 14 '12 at 18:11
@BillBarth: Yes, $U_h^0(x_i) = f(x_i)$. In fact, I was using piecewise linear lagrange elements. Does it matter more for other basis elements? –  Paul Dec 14 '12 at 18:57
Someone who's got the math closer to mind can confirm, but if the basis is interpolatory, then Galerkin projection should lead to interpolatory approximations. The mass matrix will get pretty poorly conditioned as the polynomial degree increases, but you should be OK for reasonable order Lagrange basis functions. What other basis functions did you have in mind? –  Bill Barth Dec 14 '12 at 20:42
@BillBarth: I was thinking in terms of lagrangian basis functions, but I'm wondering if the same would be true for hermites as well. –  Paul Dec 14 '12 at 22:40

It depends on how you define "projection" and what scheme you are using. But let's investigate the backward Euler method. There, you need to solve the following discrete problem in every time step: $$(v_h,U_h^n) + \Delta t (\nabla v_h, \nabla u_h^n) = (v_h, U_h^{n-1}).$$ The question is what to use in the first time step: Either $$(v_h,U_h^1) + \Delta t (\nabla v_h, \nabla u_h^1) = (v_h, f)$$ or $$(v_h,U_h^1) + \Delta t (\nabla v_h, \nabla u_h^1) = (v_h, \Pi f)$$ where $\Pi$ is the projection onto the finite element space. Let's assume that you mean the $L_2$ projection, then $\Pi f$ is defined as follows: $$(v_h, \Pi f) = (v_h, f) \qquad \forall v_h\in V_h.$$ In other words, for this time discretization and the $L_2$ norm, the two alternatives for the first time step are exactly the same!
This is not always the case. For example, for the explicit Euler scheme (unsuitable for the heat equation, but instructive here), alternative 1 would yield the following for the first time step: $$(v_h,U_h^1) = - \Delta t (\nabla v_h, \nabla f)+ (v_h, f).$$ Alternative 2 would be $$(v_h,U_h^1) = - \Delta t (\nabla v_h, \nabla \Pi f)+ (v_h, \Pi f).$$ This is obviously not the same. Sometimes, however, you can define a different projector in such a way that the two match again. (Here, this is not possible due to the sign of the first term on the right; if it had been positive, you could just consider the two right hand sides as defining a projector $\Pi$.)