WOLFRAM

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 all

Basic Examples  (2)Summary of the most common use cases

Discretize a Disk so that the triangles near the center are smaller:

Out[2]=2

Discretize a Rectangle so that the triangles in the first quadrant are smaller:

Out[1]=1

Scope  (4)Survey of the scope of standard use cases

MeshRefinementFunction specifies a function to determine if further refinement is needed:

Further refinement is performed on triangles for which the function returns True:

Out[2]=2

Using If makes it possible to refine triangles satisfying an implicit equation:

Out[2]=2

See the boundary between large and small triangles:

Out[3]=3

MeshRefinementFunction can be used with TriangulateMesh:

Out[1]=1

Triangulate it with smaller triangles near the lower-left corner:

Out[2]=2

MeshRefinementFunction can be used with DiscretizeRegion:

Out[1]=1

Discretize it with smaller triangles further away from the center:

Out[2]=2
Wolfram Research (2014), MeshRefinementFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshRefinementFunction.html.
Wolfram Research (2014), MeshRefinementFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshRefinementFunction.html.

Text

Wolfram Research (2014), MeshRefinementFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshRefinementFunction.html.

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.

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

Wolfram Language. (2014). MeshRefinementFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshRefinementFunction.html

BibTeX

@misc{reference.wolfram_2025_meshrefinementfunction, author="Wolfram Research", title="{MeshRefinementFunction}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshRefinementFunction.html}", note=[Accessed: 31-May-2025 ]}

@misc{reference.wolfram_2025_meshrefinementfunction, author="Wolfram Research", title="{MeshRefinementFunction}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshRefinementFunction.html}", note=[Accessed: 31-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_meshrefinementfunction, organization={Wolfram Research}, title={MeshRefinementFunction}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshRefinementFunction.html}, note=[Accessed: 31-May-2025 ]}

@online{reference.wolfram_2025_meshrefinementfunction, organization={Wolfram Research}, title={MeshRefinementFunction}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshRefinementFunction.html}, note=[Accessed: 31-May-2025 ]}