A problem that arises when we solve PDEs with NDSolve[]
and Method->Automatic
is how to know which method has been chosen : TensorProductGrid
or FiniteElement
?
The question is important because :
NDSolve often use
TensorProductGrid
(wrongly I think) instead ofFiniteElement
. I guess the reason is historical :TensorProductGrid
is maybe 15 years older thanFiniteElement
. For compatibility reasons all forms of syntax that was leading toTensorProductGrid
should continue to lead to this method.The wrong choice may lead to problems that are very, very advanced (here for example)
- If we don't know which method is used, we don't know which documentation to read (the one for
TensorProductGrid
or the one forFiniteElement
) and these documentations are very consequent (and it's crucial to understand error messages). - Even advanced user can't deduce the choice of the method from the syntax. For example, the use of the expression
NeumannValue
imposeFiniteElement
, butLaplacian
not, though historically they appeared at the same time.
Here are some ways to find the answer to this question :
- some error messages may give the information
- after having done
sol=NDSolveValue[...]
, then ifsol["ElementMesh"]
gives a objectElementMesh[ blabla ]
,FiniteElement
has been used - one can do also
NDSolve`ProcessEquations[...]
instead ofNDSolve[...]
and examine the resulting object.
Is there something more friendly, above all for beginners who will use preferently the automatic choice ?