ToNumericalRegion[r]
generates a NumericalRegion object from a region r.
ToNumericalRegion[r,{{xmin,xmax},…}]
generates a NumericalRegion object from a region r restricted to the bounding box
.
ToNumericalRegion[emesh]
generates a NumericalRegion object from an ElementMesh object.
ToNumericalRegion
ToNumericalRegion[r]
generates a NumericalRegion object from a region r.
ToNumericalRegion[r,{{xmin,xmax},…}]
generates a NumericalRegion object from a region r restricted to the bounding box
.
ToNumericalRegion[emesh]
generates a NumericalRegion object from an ElementMesh object.
Details and Options
- ToNumericalRegion[r] generates a NumericalRegion object that keeps the original representation of the region r together with ElementMesh approximations that may be computed later.
- The specification for region r is similar to the one given for ToElementMesh.
- The region r should be a constant region for which ConstantRegionQ gives True.
- ToNumericalRegion has the following options:
-
"MessageHead" Automatic symbol for messages - Setting the option from NDSolve and related functions is explained in NDSolve Finite Element Options.
Examples
open all close allBasic Examples (7)
Needs["NDSolve`FEM`"]Create a numerical region of a disk:
nr = ToNumericalRegion[Disk[]]nr["Bounds"]Create a numerical region of a full region in two dimensions with a bounding box:
ToNumericalRegion[FullRegion[2], {{2, 3}, {-2, 3}}]Create a numerical region of an empty region in two dimensions:
ToNumericalRegion[EmptyRegion[2]]Create a numerical region of a disk and extract the predicates and the predicate variables:
nr = ToNumericalRegion[Disk[]]
nr["Predicates"]
nr["PredicateVariables"]Create a numerical region of a full region in two dimensions:
nr = ToNumericalRegion[FullRegion[2], {{-1, 1}, {-1, 1}}]Extract the ElementMesh:
nr["ElementMesh"]Create an ElementMesh with ToElementMesh:
mesh = ToElementMesh[nr]The ElementMesh field is now populated:
nr["ElementMesh"]The boundary ElementMesh is now also populated:
nr["BoundaryMesh"]Clear the meshes and constraints:
nr["ClearCache"]{nr["ElementMesh"], nr["BoundaryMesh"], nr["Constraints"]}Create a numerical region of a full region in two dimensions:
nr = ToNumericalRegion[FullRegion[2], {{-1, 1}, {-1, 1}}]Initially, boundary and element meshes are not populated:
{nr["BoundaryMesh"], nr["ElementMesh"]}mesh = ToBoundaryMesh[nr]The boundary mesh is now populated:
{nr["BoundaryMesh"], nr["ElementMesh"]}mesh = ToElementMesh[Disk[{1 / 2, 0}, 1]]Define a NumericalRegion based on the mesh:
nr = ToNumericalRegion[mesh]Retrieve the predicate and the symbolic region of the NumericalRegion:
{nr["SymbolicRegion"], nr["Predicates"]}Retrieve the bounding box and variables:
{nr["Bounds"], nr["PredicateVariables"]}nr["ElementMesh"] === meshThere is no boundary mesh associated:
nr["BoundaryMesh"]Generalizations & Extensions (1)
Create a numerical region of a full region in two dimensions:
nr = ToNumericalRegion[ImplicitRegion[True, {{x, -2, 2}, {y, -2, 2}}]]Set up variable and solution data:
vd = NDSolve`VariableData[{"DependentVariables", "Space"} -> {{u}, {x, y}}];
sd = NDSolve`SolutionData[{"Space"} -> {nr}];Initialize the coefficients and boundary conditions that have a discontinuity:
coeff = InitializePDECoefficients[vd, sd, "DiffusionCoefficients" -> -{{If[x ^ 2 + y ^ 2 ≤ 1, 10 IdentityMatrix[2], IdentityMatrix[2]]}}];
bcdata = InitializeBoundaryConditions[vd, sd, {{DirichletCondition[u[x, y] == 0., x == -2 && -1 ≤ y ≤ 1]}}];Inspect the constraints introduced by the PDE coefficients and boundary conditions:
nr["Constraints"]Visualize the boundary mesh with the autogenerated internal boundary along the discontinuity:
ToBoundaryMesh[nr]["Wireframe"]ToElementMesh[nr]["Wireframe"]Text
Wolfram Research (2014), ToNumericalRegion, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ToNumericalRegion.html (updated 2020).
CMS
Wolfram Language. 2014. "ToNumericalRegion." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/FEMDocumentation/ref/ToNumericalRegion.html.
APA
Wolfram Language. (2014). ToNumericalRegion. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/ToNumericalRegion.html
BibTeX
@misc{reference.wolfram_2026_tonumericalregion, author="Wolfram Research", title="{ToNumericalRegion}", year="2020", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/ToNumericalRegion.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tonumericalregion, organization={Wolfram Research}, title={ToNumericalRegion}, year={2020}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/ToNumericalRegion.html}, note=[Accessed: 15-June-2026]}