MeshRefinementFunction
is an option for DiscretizeRegion and related functions that specifies a function to indicate whether mesh cells should be refined or not.
Details
- With MeshRefinementFunction->f, the function f[vlist,m] is applied to each simplex created, where vlist is a list of the vertices and m is the measure. If f[vlist,m] returns True, the simplex will be refined.
Examples
open allclose allBasic Examples (2)
Scope (4)
MeshRefinementFunction specifies a function to determine if further refinement is needed:
Further refinement is performed on triangles for which the function returns True:
Using If makes it possible to refine triangles satisfying an implicit equation:
See the boundary between large and small triangles:
MeshRefinementFunction can be used with TriangulateMesh:
Triangulate it with smaller triangles near the lower-left corner:
MeshRefinementFunction can be used with DiscretizeRegion:
Discretize it with smaller triangles further away from the center:
Text
Wolfram Research (2014), MeshRefinementFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshRefinementFunction.html.
CMS
Wolfram Language. 2014. "MeshRefinementFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshRefinementFunction.html.
APA
Wolfram Language. (2014). MeshRefinementFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshRefinementFunction.html