When FiniteElement method is used, the differential equations will first be transformed to certain standard form (named as formal PDE in recent FEM document), and it turns out to be critical to check what the standard form is when analyzing various issues related to FEM. Here are some examples:
Position of discontinuous coefficient influences the solution of PDE
How to input Robin boundary conditions for nonstandard Laplace equation?
Sign of conservative convection coefficient in a formal (Inactive) PDE
Stress analysis in axisymmetric bodies
The coefficient of formal PDE is available from PDECoefficientData, but its output is just hard to read. For example, with
{state} = NDSolve`ProcessEquations[
With[{u = u[x, y]}, {-2 D[u, y, y] - 3 D[u, x, x] == 1,
DirichletCondition[u == 0, True]}],
u, {x, 0, 1}, {y, 0, 1}];
data = state["FiniteElementData"]["PDECoefficientData"];
data["All"]
(* {{{{1}}, {{{{0}, {0}}}}}, {{{{{3, 0}, {0, 2}}}}, {{{{0}, {0}}}}, {{{{0,
0}}}}, {{0}}}, {{{0}}}, {{{0}}}} *)
at hand, can you tell what's what? Can you label $d$, $c$, $\alpha$, etc. in the formal PDE
$$d\frac{\partial }{\partial t}u+\nabla \cdot (-c \nabla u-\alpha u+\gamma ) +\beta \cdot \nabla u+ a u -f=0$$
with corresponding values, without doubt?
Can we have a function that shows the formal PDE of FiniteElement in a easy-to-read way? A possible (but not necessary of course) input-output in my mind:
showFormalPDE@With[{u = u[x, y]}, -2 D[u, y, y] - 3 D[u, x, x] == 1]
(* -1 + Inactive[Div][(-{{3, 0}, {0, 2}}.Inactive[Grad][u[x, y], {x, y}]), {x, y}] == 0 *)

NDSolve\FEM`GetInactivePDE ` is built-in in v12.2. (There's no separate document page for it though. ) – xzczd Apr 29 '21 at 06:21GetInactivePDEin this post handleNDSolve\StateData`, feel free to roll back if you don't like it :) . – xzczd Apr 30 '21 at 13:25(-{{x, 0}, {0, 1}} . Grad [U[x, y], {x, y}]). Is this conclusion correct? Thanks! – Ulrich Neumann May 16 '22 at 14:08NeumannValue. – user21 May 17 '22 at 11:22NeumannValueI 'm trying, in vain, to verify this result. Please read my question. – Ulrich Neumann May 18 '22 at 09:47GetInactivePDE:c = IdentityMatrix[2]; α = {x, y}; γ = {y, x^2}; ipde = Inactive[Div][Inactive[Plus][-c . Inactive[Grad][u[x, y], {x, y}], Inactive[Times][-α, u[x, y]], γ], {x, y}] == 0; {state} = NDSolve`ProcessEquations[{ipde, DirichletCondition[u[x, y] == 0, True]}, u, {x, y} ∈ Disk[]]; NDSolve`FEM`GetInactivePDE@state, the $(-c ∇u-α u+γ)$ term should be placed in a single $∇·$. – xzczd Jul 28 '22 at 05:12NeumannValues are different, and one of the most important usage ofGetInactivePDE(in my view) is helping one to decide the correctNeumannValue. – xzczd Aug 15 '22 at 11:05Inactive[ Div][-c . Inactive[Grad][u[x], {x}] - \[Alpha]* u[x] + \[Gamma], {x}] == Inactive[Div][-c . Inactive[Grad][u[x], {x}], {x}] + Inactive[Div][-\[Alpha]*u[x], {x}] + Inactive[Div][\[Gamma], {x}] == NeumannValue– user21 Aug 15 '22 at 11:14TimesisInactived, the situation is different, I elaborate the issue in this answer: https://mathematica.stackexchange.com/a/271385/1871 – xzczd Aug 15 '22 at 11:19