FEMDocumentation`
FEMDocumentation`

FEMMethodData

FEMMethodData[]

represents data that is used for the finite element method.

Details

  • FEMMethodData[] is created by InitializePDEMethodData.
  • FEMMethodData[] can be extracted from NDSolve`StateData objects generated by NDSolve`ProcessEquations using the "FiniteElementData" and "MethodData" properties.
  • In standard output format, only the degrees of freedom, the interpolation order for each dependent variable, and the integration order are shown.
  • FEMMethodData objects are used as input for DiscretizePDE and DiscretizeBoundaryConditions.
  • FEMMethodData[][prop] gives the property prop of the FEMMethodData object. The following properties may be given:
  • "DegreesOfFreedom"degrees of freedom of system matrices
    "ElementMesh"element mesh
    "IncidentOffsets"offsets where incidents start for each dependent variable
    "Incidents"the mesh incidents
    "IntegrationOrder"the order with which each dependent variable is integrated
    "InterpolationOrder"the interpolation order for each dependent variable
    "Properties"list of properties
    "SolutionData"solution data
    "TotalDegreesOfFreedom"sum of degrees of freedom, hanging nodes degrees of freedom, and additional constraints
    "VariableData"variable data

Examples

open allclose all

Basic Examples  (1)

Load the finite element package:

Set up a NumericalRegion:

Set up variable and solution data:

Initialize the partial differential equation data:

This is equivalent to choosing "FiniteElement" for Method:

Scope  (14)

"DegreesOfFreedom"  (1)

Extract the degrees of freedom from the initialized FEM method data:

"ElementMesh"  (1)

Extract the ElementMesh from the initialized FEM method data:

"IncidentOffsets"  (3)

Extract the incident offsets:

The incidents of the first dependent variable range from the first offset plus one to the second offset.

Set up two dependent variables:

Extract the incident offsets:

The incidents of the first dependent variable range from the first offset plus one to the second offset. The second dependent variable's incidents range from the second offset plus one to the third offset.

Set up two dependent variables:

Set up solution data:

Initialize the PDE method data with an explicit interpolation order for each dependent variable. Extract the incident offsets:

The incidents of the first dependent variable range from the first offset plus one to the second offset. The second dependent variable's incidents range from the second offset plus one to the third offset.

"Incidents"  (2)

Extract the incidents:

The maximum incident is the last incident offset:

Set up two dependent variables:

Extract the incident offsets:

"IntegrationOrder"  (1)

Extract the integration order:

"InterpolationOrder"  (3)

Extract the interpolation order:

Set up two dependent variables:

Extract the interpolation order:

Set up two dependent variables:

Set up solution data:

Initialize the PDE method data with an explicit interpolation order for each dependent variable. Extract the interpolation order:

"SolutionData"  (1)

The solution data is the same as the initial solution data:

Extract the numerical region from the solution data:

"TotalDegreesOfFreedom"  (1)

If the ElementMesh has hanging nodes, the total degrees of freedom are the degrees of freedom plus the hanging nodes degrees of freedom:

"VariableData"  (1)

The variable data is the same as the initial variable data:

Properties & Relations  (2)

Extract the state data from the NDSolve`StateData object:

Extract the finite element method data from the NDSolve`StateData object:

Set up two dependent variables:

Initialize the PDE method data with an explicit interpolation order for each dependent variable and node reordering switched off:

Create a SparseArray from the incidents and visualize populated positions: