Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Merge multiple regions into a single boundary mesh
ResourceFunction["BoundaryMeshUnion"][{region1,region2,…}] generates an ElementMesh object that combines the boundaries of multiple regions into a single unified mesh. | |
ResourceFunction["BoundaryMeshUnion"][{{region1,"BoundaryMarker"→value1},{region2,"BoundaryMarker"→value2}…}] assigns specified boundary markers (value1,value2, …) to each corresponding region. | |
ResourceFunction["BoundaryMeshUnion"][{{region1,"BoundaryMarker"→value1,opts1},{region2,"BoundaryMarker"→value2,opts2}…}] generates a unified boundary ElementMesh, assigning specified boundary markers (value1,value2, …) to each corresponding region. Each optsi can include any option from Options[ToBoundaryMesh]. |
Combine rectangular and circular boundaries:
In[1]:= | ![]() |
Out[3]= | ![]() |
Define boundaries with custom markers:
In[4]:= | ![]() |
Out[6]= | ![]() |
Define boundaries with custom markers and point inclusions:
In[7]:= | ![]() |
Out[9]= | ![]() |
Create a mesh with custom markers and custom density:
In[10]:= | ![]() |
Out[12]= | ![]() |
Overlapping boundaries may have incorrect PointElement markings:
In[13]:= | ![]() |
Out[14]= | ![]() |
Visualize the boundary mesh:
In[15]:= | ![]() |
Out[15]= | ![]() |
Solve the Laplace equation in a non-trivial geometry:
In[16]:= | ![]() |
Out[19]= | ![]() |
Set up boundary conditions:
In[20]:= | ![]() |
Out[23]= | ![]() |
Solve it and visualize the result:
In[24]:= | ![]() |
Out[25]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License