returns a method data object for the method specified by m according to variable data vd and solution data sd.


  • InitializePDEMethodData initializes the PDE discretization method m.
  • InitializePDEMethodData computes and stores data such as geometry data.
  • The Automatic method for InitializePDEMethodData is the finite element method and the initialized data is returned as a FEMMethodData object.
  • Variable data vd and solution data sd are corresponding lists of variables and values. Templates for vd and sd may be generated using NDSolve`VariableData and NDSolve`SolutionData, and components may be set using NDSolve`SetSolutionDataComponent.
  • The "Space" component of vd and sd should be set to the spatial variables and the spatial mesh represented as an NumericalRegion object, respectively.
  • The "DependentVariables" component of vd should be set to the list of unknown function names without arguments.
  • For time-dependent problems, the "Time" component of vd and sd should be set to the temporal variable and the initial time, respectively.
  • In InitializePDEMethodData[vd,sd,m], the method m may be specified by mname or {mname,mopts}, where mname is the method name and mopts are method specific options. Currently only the "FiniteElement" method is supported.
  • InitializePDEMethodData[vd,sd] uses the "FiniteElement" method by default.
  • The "FiniteElement" method accepts the following options:
  • "IntegrationOrder"Automaticsets the element integration order
    "InterpolationOrder"Automaticsets the order of interpolation for each dependent variable
    "MeshOptions"Automaticspecifies options for mesh generation
    "PrecomputeGeometryData"Automaticprecomputes geometry data
  • With an ElementMesh having "MeshOrder" p, the "InterpolationOrder" can be at most p and "InterpolationOrder"->Automatic defaults to the order p. Multiple dependent variables may have a different interpolation order; at least one interpolation order needs to be set to the maximum mesh order p.
  • The "IntegrationOrder" is the order of accuracy used to integrate the finite element operators. For "InterpolationOrder"->2, the "IntegrationOrder" defaults to fourth order and for "InterpolationOrder"->1, the "IntegrationOrder" defaults to second order.
  • For the "FiniteElement" method, if the NumericalRegion does not contain an ElementMesh, then one is created automatically using ToElementMesh, with the options given in the setting of "MeshOptions".


open all close all

Basic Examples  (1)

Load the finite element package:

Click for copyable input

Set up a NumericalRegion:

Click for copyable input

Set up variable and solution data:

Click for copyable input

Initialize the partial differential equation data:

Click for copyable input

Options  (5)