FEMDocumentation`
FEMDocumentation`

ToBoundaryMesh

ToBoundaryMesh[r]

generates a boundary ElementMesh object from the boundary of a region r.

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

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

ToBoundaryMesh[rules]

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

ToBoundaryMesh[emesh]

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

Details and OptionsDetails
  • ToBoundaryMesh[r] generates a boundary ElementMesh object that approximates the boundary of the possibly symbolic region r. In a boundary ElementMesh, the "MeshElements" are set to Automatic and can be computed by using ToElementMesh.
  • The specification for regions includes objects described by geometric regions and ImplicitRegion.
  • The region r should be a constant region for which ConstantRegionQ gives True.
  • In ToBoundaryMesh[rules], the following rules should be given:
  • "Coordinates"->{c1,c2,}required to specify the coordinates to be c1, c2,
    "BoundaryElements"->{b1,}required to 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 boundary element mesh, "BoundaryElements" are PointElement.
  • For a 2D boundary element mesh, "BoundaryElements" are LineElement.
  • For a 3D boundary element mesh, "BoundaryElements" can be TriangleElement and QuadElement.
  • ToBoundaryMesh[emesh] may be used to modify an ElementMesh object emesh in various ways, including extracting the boundary and adding markers.
  • ToBoundaryMesh has the following options:
  • AccuracyGoalInfinitydigits of accuracy sought
    "BoundaryGroupingThreshold"Automaticcontrol the grouping of boundaries by normal direction
    "BoundaryMarkerFunction"Nonefunction to compute markers for boundary elements
    "BoundaryMeshGenerator"Automaticfunction to generate boundary ElementMesh
    "CheckIntersections"Automaticcontrol testing for intersecting boundaries
    "DeleteDuplicateCoordinates"Truedelete duplicate coordinates
    "IncludePoints"{}points to be included and considered part of the boundary
    "MaxBoundaryCellMeasure"Automaticcontrol the size of boundary elements
    MaxCellMeasureAutomaticcontrol the size of mesh elements
    "MeshOrder"Automaticorder of the element mesh
    "MessageHead"Automaticsymbol for messages
    "PointMarkerFunction"Nonefunction to compute markers for point elements
    PrecisionGoalAutomaticdigits of precision sought
    "RegionHoles"Automaticspecify region holes
  • With MaxCellMeasure->m, the measure of the cells created in the region dimension d will be at most m. The measure for the d-1-dimensional boundary representation cells will by default be chosen to be compatible with good quality d-dimensional cells with measure m. Limits for specific dimensions may be specified by using MaxCellMeasure->{"Volume"->v,"Area"->a,"Length"->l}.
  • With AccuracyGoal->a and PrecisionGoal->p, an attempt will be made to keep the maximum distance between the region r or the discretized region dreg and any point in RegionSymmetricDifference[r,dreg] to less than , where is the length of the diagonal of the bounding box.
  • ToBoundaryMesh[bmesh,opts] or ToBoundaryMesh[emesh,opts] may be used to modify a boundary ElementMesh object bmesh or extract the boundary from a full ElementMesh object emesh in various ways by specifying any one of the options to ToBoundaryMesh.
  • If ToBoundaryMesh cannot generate an ElementMesh, then $Failed is returned.
  • Invoking ToBoundaryMesh on an EmptyRegion will return an EmptyRegion.
  • Examples

    open allclose all

    Basic Examples  (4)

    Load the package:

    In[1]:=
    Click for copyable input

    Create a boundary element mesh of a Disk:

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

    Visualize the boundary mesh:

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

    Convert the boundary element mesh to a full mesh:

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

    Create a boundary mesh of a union of a Disk and a Rectangle:

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

    Visualize the boundary mesh:

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

    Create a boundary mesh by explicitly specifying the boundary elements:

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

    Visualize the boundary mesh:

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

    Create a full element mesh from the boundary mesh and visualize the resulting element mesh:

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

    Get a discretized boundary representation for a cylinder:

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

    Scope  (14)

    Options  (23)

    Possible Issues  (3)

    See Also

    ElementMesh  ToElementMesh  DiscretizeGraphics  DiscretizeRegion  BoundaryMeshRegion  MeshRegion  RegionUnion  RegionIntersection  RegionDifference  BooleanRegion  ImplicitRegion

    Tutorials