More general Galerkin