FEMDocumentation`
FEMDocumentation`

ToElementMesh

ToElementMesh[r]

generates an ElementMesh object from a region r.

ToElementMesh[r,{{xmin,xmax},}]

generates an ElementMesh object from a region r restricted to the bounding box [x_(min),x_(max)]x....

ToElementMesh[rules]

generates an ElementMesh object from a set of rules specifying coordinates and elements.

ToElementMesh[emesh]

generates a new ElementMesh object from an existing ElementMesh, MeshRegion, or BoundaryMeshRegion.

Details and OptionsDetails
  • ToElementMesh[r] generates an ElementMesh object that approximates a possibly symbolic region r.
  • The specification for regions r includes objects described by geometric regions and ImplicitRegion.
  • The region r should be a constant region for which ConstantRegionQ gives True.
  • To generate an approximation to the region r, ToElementMesh first calls ToBoundaryMesh.
  • In ToElementMesh[rules], the following rules should be given:
  • "Coordinates"->{c1,c2,}required to specify the coordinates to be c1, c2,
    "MeshElements"->{e1,}required to specify the elements in the mesh to be e1,
    "BoundaryElements"->{b1,}optionally specify the boundary elements in the mesh to be b1,
    "PointElements"->{p1,}optionally specify the point elements in the mesh to be p1,
  • For a 1D element mesh, "MeshElements" are LineElement. "BoundaryElements" and "PointElements" are, if specified, PointElement.
  • For a 2D element mesh, "MeshElements" can be TriangleElement and QuadElement. "BoundaryElements", if specified, are LineElement, and "PointElements" are PointElement.
  • For a 3D element mesh, "MeshElements" can be TetrahedronElement or HexahedronElement. "BoundaryElements", if specified, are TriangleElement and QuadElement, and "PointElements" are PointElement.
  • ToElementMesh has the same options as ToBoundaryMesh, with the following additions:
  • "CheckQuality"Automaticcompute a quality assessment
    "ElementMeshGenerator"Automaticfunction to generate an ElementMesh object from a boundary ElementMesh object
    "ImproveBoundaryPosition"Automaticimprove the position of the boundary nodes
    "MeshElementBlocks"1number of blocks of mesh elements
    "MeshElementConstraint"Automaticadditional constraints for mesh elements
    "MeshElementType"Automaticelement type used to mesh input
    "MeshOrder"Automaticorder of the element mesh
    MeshQualityGoalAutomaticspecify a mesh element quality goal
    MeshRefinementFunctionAutomaticcontrol element refinement
    "NodeReordering"Automaticreorder nodes to generate minimal bandwidth matrices
    "SteinerPoints"Automaticcontrol the insertion of Steiner points
    "RegionMarker"Nonespecify region markers
  • ToElementMesh[emesh,opts] may be used to modify an ElementMesh object emesh in various ways by specifying any of the options for ToElementMesh.
  • If ToElementMesh cannot generate an ElementMesh, then $Failed is returned.
  • Invoking ToElementMesh on an EmptyRegion will return an EmptyRegion.
  • Examples

    open allclose all

    Basic Examples  (4)

    Load the package:

    In[1]:=
    Click for copyable input

    Generate an element mesh for a disk:

    In[2]:=
    Click for copyable input
    Out[2]=

    Visualize the element mesh wireframe:

    In[3]:=
    Click for copyable input
    Out[3]=

    Generate an element mesh for the union of a disk and a rectangle:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=

    Specify an unbounded region with a bounding box:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=

    Specify the elements of an element mesh:

    In[1]:=
    Click for copyable input
    Out[1]=
    In[2]:=
    Click for copyable input
    Out[2]=

    Scope  (21)

    Options  (35)

    Properties & Relations  (1)

    Possible Issues  (8)

    Neat Examples  (2)

    See Also

    ElementMesh  ToBoundaryMesh  DiscretizeGraphics  DiscretizeRegion  BoundaryMeshRegion  MeshRegion  RegionUnion  RegionIntersection  RegionDifference  BooleanRegion  ImplicitRegion

    Tutorials