# Conceptual question - What FEM does on top of NDSolve, how to use it?

I have few conceptual questions concerning FEM -all are conceptual and their answers might be intertwined hence I ask all in 1 post-:

1. What FEM does on top of NDSolve? Because NDSolve already divide the domain on a mesh . Here some triggers which automatically activating a FEM solver explained. Sometimes FEM is also used in more detail as in this question - great title btw- as well.

2. When I solve a system of PDE's by NDSolve, would writing everything from scratch with NDSolveFEM  be a valid way of crosscheck? Or should one prefer MATLAB or FEniCS for crosschecking?

3. Without getting in too much theory, where can I learn FEM with application? I want to learn how to use it properly, including dealing with convergence problems or choosing the correct primary space for a type of equation. Also I checked Wolfram archives for MMA but couldn't come across with something up to date.

• At 3.) To my knowledge, Mathematica uses $P_2$ and $S_2$ elements by default for spatial problems. One can also use $P_1$ and $S_1$ instead by using the option "MeshOrder"->1. Mar 16 at 8:14
• At 1. + 2.) "When I solve a system of PDE's by NDSolve, would writing everything from scratch with "NDSolveFEM" be a valid way of crosscheck?" "NDSolveFEM" is used as the backend of the FEM capabilities of NDSolve. (When NDSolve is called with the option Method -> {"FiniteElement"} or when a Region or MeshRegion is supplied as domain.) So this would not really be a cross check. Mar 16 at 8:15
• At 3.) Have you seen this? reference.wolfram.com/language/FEMDocumentation/tutorial/… Mar 16 at 8:18
• "What FEM does on top of NDSolve?" Once again, "NDSolveFEM" is a backend for NDSolve and allows you to use also nonrectangular domains. Mar 16 at 8:20
• @HenrikSchumacher, so the mesh order is automatic. I haven't seen the complete tutorial, thank you. Mar 16 at 8:48

1. NDSolve calls the functions from NDSolveFEM. This is explained in the finite element programming tutorial. The reasons this exists is that customers can intercept the FEM solution process at any stage and modify it in any why they wish. It's also useful to develop and explain new FEM related functions like done for NDEigensystem. The FEM sub module provides you with the possibility to do things that are currently not possible from an NDSolve level. (Model order reduction, Rayleigh damping, etc, etc) The question you link in your item 1) does not need the FEM context.
• @xzczd thanks for the edit now I know how to do  NDSolveFEM  Mar 17 at 8:05
• Comment is a bit different, you need NDSolve\FEM\. Mar 17 at 8:09
• @xzczd, great thanks! NDSolveFEM Mar 17 at 9:12