Consider the weak form of our all-time favorite Poisson-equation, $$- \int_{\Omega} \nabla u \cdot \nabla v\, \mathrm{d} x = \int_{\Gamma}v \nabla u \cdot \mathrm{d}x +\int_{\Omega} fv\, \mathrm{d} x,$$ for all test functions $v\in V$ and with some domain $\Omega$, boundary $\Gamma = \partial \Omega$. Please note that the boundary integral does not vanish (yet).
Now, develop the solution $$u= \sum_i \alpha_i \varphi_i$$ (and the rhs $f$) in terms of the basis functions of some Galerkin subspace, $$\mathrm{span}\{\varphi_i\} = V_h,$$ and test with the basis functions to get $$- \sum_i \alpha_i \int_{\Omega} \nabla \varphi_i \cdot \nabla \varphi_j\, \mathrm{d} x =\sum_i \int_{\Gamma}\varphi_j \nabla \varphi_i \cdot \mathrm{d}x +\sum_i f_i \int_{\Omega} \varphi_i \varphi_j\, \mathrm{d} x$$ for all $j=1, \dots , N$. Introduce the matrices $S$, $M$, with $$S_{ij} = \int_{\Omega} \nabla \varphi_i \cdot \nabla \varphi_j\, \mathrm{d} x $$ $$M_{ij} = \int_{\Omega} \varphi_i \varphi_j\, \mathrm{d} x$$ Now one can proceed to write this in matrix-vector form, $$A\alpha = Mf + \sum_i \int_{\Gamma}\varphi_j \nabla \varphi_i \cdot \mathrm{d}x$$ and solve for $\alpha_i$, as known. However, the boundary term has to be handled yet.
For the sake of simplicity, let's assume homogeneous Dirichlet-BC on $\Gamma$. Usually, one would then set the test and trial space as $H^1_0(\Omega )$, that is one would require the basis functions to already satisfy the BCs. My questions now:
- Is this necessary? I've tried to derive a matrix similar to $S$ and $M$, but it's really non-trivial to impose the BCs on the solution $u$, if the basis functions do not satisfy them.
- Is there any good literature on both, theory and implementation, of these kind of general Galerkin-methods, where the basis function are not FEM-basis functions?
The boundary condition can be interpreted as a constraint on the more general solution space. There are many approaches to apply Dirichlet-type constraints: penalty methods, Lagrange multiplier methods, augmented Lagrangian methods, Nitsche's method.
The theory is very similar up to some point, e.g. the best approximation property (Cea's lemma) holds in many cases. However, to get a priori error estimates depending on the number of degrees-of-freedom (or mesh parameter as in FEM) you typically combine best approximation property with interpolation theory and this is a very well known topic in the context of FEM basis functions.
Now it depends on the actual basis whether you have interpolation estimates available in the litetature or not. E.g. for many spectral-type bases (sine/cosine, orthogonal polynomials) you can find the relevant theory.