Different results on both sides of a variational problem

On the one hand I thought that FEniCS/FEniCSX used the Galerking method to obtain the algebraic equations to be solved. Is the Galerking method an example of the method of weighted residues? What does FEniCS use to obtain the algebraic equations?

FEniCS uses whatever variational method you choose to implement! It looks like your MWE is using the standard Galerkin method (sometimes referred to as “Bubnov–Galerkin” in settings where “Galerkin” refers to variational methods generally), but you could also implement various Petrov–Galerkin, discontinuous Galerkin, weakly-consistent, or other methods.

Would there be any other way to correctly evaluate the values of the Laplacian term that the solver has taken into account when giving a time step?

Extracting higher derivatives from low-order finite element solutions can be tricky. You might take a look at the discussion here for some possibilities.

1 Like