Questions tagged [mesh]

Questions on the use and creation of meshes including the use of MeshRegion, ElementMesh, and TetGenLink.

Filter by
Sorted by
Tagged with
5
votes
1answer
129 views

Area of an Annulus (MeshTools<>NIntegrate)

In a very simple example I try to describe an annulus using MeshTools package mesh2D = AnnulusMesh[{0, 0}, { 1 , 2 }, {-Pi, Pi}, {36, 10}]; The area given ...
10
votes
2answers
306 views

Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
10
votes
5answers
518 views

Grainy 2D RegionIntersection Plot: How can I make it smoother?

I have the following code to display three coloured disks and their coloured intersections. However, the result does not appear to have been anti-aliased enough. How can I make it smoother? ...
2
votes
2answers
57 views

Select Part of a boundary mesh

I would like to pick a part of a boundary mesh, for example bm=BoundaryMesh[Cuboid[]] Is it possible to select the part(side) ...
0
votes
1answer
63 views

How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
8
votes
2answers
134 views

How to mesh a region with inclusions touching the boundary

Suppose you have a region composed of two materials. You define the inclusions of material 1 through, e.g., disks, ellipsoids, ...
4
votes
1answer
100 views

Adaptive Meshrefinement NDSolve&FiniteElements

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...
2
votes
1answer
30 views

Draw Lines on 3D Plot at certain coordinate

Following this example, I though it would be as easy as this: ...
0
votes
1answer
74 views

Nonatomic expression expected at position 1 in First[None]

This is a follow-up question to an earlier question:Solving a system of PDEs on a piecewise polynomial domain. I tried to solve the system of equations from one of my previous post with the different ...
6
votes
3answers
457 views

Compare FEM mesh with the mesh created within Mathematica

This is a follow-up question to an earlier question: Make uniform mesh with quad elements Question: How to solve system of equations with NDsolve on the mesh created in Ansys in order to compare it ...
15
votes
3answers
275 views

Computing the surface area and volume of molecules

Here is a somewhat difficult problem I've had for a long while. Space-filling models of molecules can be easily generated by ChemicalData[], ...
0
votes
1answer
63 views

BoundaryDiscretizeRegion Plots does not work with ParametricPlot3D

I am trying wit this data ...
3
votes
3answers
368 views

Nearly equally spaced 3D-mesh

How to mesh a volume (3D region) with nearly equaly spaced vertices? Example: Disk with radius 50 and height 15 ...
3
votes
1answer
82 views

Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
1
vote
1answer
56 views

Blunt edges of an octahedron by Region

Why does the octahedron constructed by the following code have blunt edges ? Region[ImplicitRegion[Abs[x] + Abs[y] + Abs[z] <= 1, {x, y, z}]] How to improve it?...
2
votes
2answers
133 views

How to extrude a planar mesh to a volume slice?

Is there an easy way to extrude a planar 2D-mesh to a volume slice? ring = RegionDifference[Disk[{0, 0}, 1], Disk[{0, 0}, 1/2]]; DiscretizeRegion[ring] The ...
3
votes
1answer
88 views

Mesh a hollow cylinder

Questions seems to be simple answerde, but in Mathemtica v11.0.1 I didn't find a solution ...
4
votes
1answer
90 views

control FEM grid size for 1D regions

I need to manage the mesh size for finite element method solution to a differential equation, where properties change over two regions. This is for one dimension. I created a boundary mesh of three ...
3
votes
1answer
79 views

RegionUnion works but RegionIntersection does not

I am trying to create an Alberti's window figure as described in this question, in which a (three-dimensional) polyhedron (e.g., dodecahedron) is projected onto a (two-dimensional) plane. I realized ...
2
votes
1answer
63 views

Unwanted mesh line in spherical plot

I am trying to create a spherical colour plot on which the mesh will rotate with manipulating the \phi1 variable. I read this solution and gave it a try with the following code: ...
1
vote
0answers
42 views

Combining MeshRegions of generated 3D shapes and RandomPolygons

I am interested in generating 3D a joint BoundaryMeshRegion or a MeshRegion from different shapes and polygons. This works for <...
8
votes
2answers
223 views

Make uniform mesh with quad elements

I have the following code that generates a finite element mesh with triangular elements which by using command ToQuadMesh I convert to the quadrilateral elements, but I am not able to make the uniform ...
1
vote
2answers
91 views

How to sample numerically a function using a mesh-grid function in 3D?

I am working on a problem where I want to sample a scalar function f[x,y,z]. The problem is how to obtain a mesh-grid in 3D (A grid of points in x,y, and z). In order to study this function. Of ...
1
vote
0answers
102 views

Calculate the intersection points of a line and a parametrically defined 3D surface

Thanks to Henrik Schumacher for advice to simplify the sample code: I would be grateful for any pointers on the following issue. A line from an external point intersects the surface at 2 points (...
1
vote
1answer
108 views

How to solve wave equation with finite elements when material properties vary continuously over a region

I am solving the one-dimensional wave equation over regions where the bulk modulus (and thus the wave speed) vary continuously over a region. The current version seems to assume that the material ...
6
votes
2answers
95 views

How to refine a linear FEM mesh in three regions?

I am trying to solve the one-dimensional wave equation with a frequency dependent source function over three intervals with varying velocity. I need to refine the mesh over the low velocity regions ...
5
votes
2answers
129 views

Automatic solution to label boundary elements with BoundaryMarkerFunction

Preparations Mathematica 11.3, Windows. Let us say I have a rectangular region with 10 little holes inside. Their coordinates are given by positionList. The ...
1
vote
0answers
46 views

Non-convex hull mesh from 3d points [duplicate]

I am trying to create a 3d mesh object from list of points, but the only options I see in Mathematica are ConvexHullMesh and ...
3
votes
1answer
68 views

Signed cell adjacency matrices (boundary operators)

In How to obtain the cell-adjacency graph of a mesh? there are some great answers that show how to obtain the cell adjacency matrix of a mesh. How would one generalize these to incorporate the ...
5
votes
2answers
135 views

Adjacent faces in a discrete mesh

I have a MeshRegion R and I want to extract all pairs of adjacent faces efficiently. The way that I've been computing this is demonstrated below: ...
3
votes
3answers
117 views

RegionMember does not work with RandomPolyhedron or Polyhedron object

According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function ...
6
votes
2answers
202 views

Extracting points from 3D plot that lie along an arbitrarily oriented line

Starting from i.e. the following 3d plot: d = RandomReal[1, {100, 3}]; ListPlot3D[d] Is it possible to extract points that lay along an arbitrarily oriented line,...
1
vote
1answer
78 views

Set maximum space between elements in 3D mesh

A region in 3D space has been discretized to obtain a list of points. The resulting ListPointPlot3D plot is: I will like to obtain a mesh from these points, but ...
4
votes
1answer
43 views

Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ...
6
votes
1answer
156 views

Given a cell in a Voronoi diagram, which point did it come from? [duplicate]

Given a set of points pts = Table[{RandomReal[], RandomReal[]}, {i, 1, 10}]; and their Voronoi diagram ...
1
vote
1answer
70 views

Mesh quality error with interpolation of table

I am trying to interpolate a table of the following form. {{x1,y1,z1},{x2,y2,z2}...} Where z depends on x and y, and x ranges from 0.01 to 1 in steps of 0.01, ...
4
votes
1answer
76 views

Find surrounding vertices (simplexes) of a given point for DelaunayMesh

Generating a Delaunay triangulation of some random points: pts = RandomReal[{-1, 1}, {50, 2}]; dm = DelaunayMesh[pts]; HighlightMesh[dm, Style[0, Black]] gives [...
0
votes
0answers
82 views

Create a tube from a section of a sphere using mesh

How does one make a meshed tube starting from a section of a sphere and later edit the tube's section parametrically.
4
votes
1answer
72 views

Difficulty in specifying mesh refinement

I am trying to give a region within a 3D volume a finer mesh than the rest of the volume. My problem is more complicated but here is a minimum working example. I define a 3D cuboid and try and have a ...
1
vote
1answer
64 views

Mesh mixes up markers in multiple curves

Following is my code: ...
4
votes
1answer
68 views

Make MeshRegion/BoundaryMeshRegion work as a graphics primitive in M11

Mathematica 12 has the nice feature that MeshRegion and BoundaryMeshRegion objects render nicely when included as a primitive in ...
5
votes
1answer
48 views

RandomPoint returns compiler errors on RegionIntersection of two Meshs?

Consider the intersection of two ConvexHullMesh's, m1 and m2. ...
4
votes
1answer
96 views

How to draw individual mesh lines in ArrayPlot

Consider the following ArrayPlot. ...
3
votes
1answer
77 views

Creating a mesh from a very thin layer

I have the following code which works just fine: ...
5
votes
2answers
129 views

Holes in ElementMesh with ToElementMesh of ImplicitRegion

I am trying to plot a function in a region below a level curve of the function and within a cell. I have been doing this by calculating an ElementMesh using ...
8
votes
2answers
398 views

Catmull-Clark and Doo-Sabin Subdivision Implementations

I want to work on subdivision surfaces. Unfortunately, I don’t have any source code to start with. I need some Mathematica codes for applying Catmull-Clark and Doo-Sabin methods. I would like to ...
2
votes
1answer
104 views

Meshing control of NDEigensystem

I have to solve an Eigenvalue problem originating from the Electrodynamics. It is a 2-D problem with a rectangular region. More specifically, there is a hole on a rectangle made by magnetic material. ...
3
votes
1answer
44 views

Is there a way to automatically use triangular elements in ToElementMesh [closed]

I have some simple code to generate a mesh over a rectangle. ...
1
vote
1answer
90 views

Converting .STL from Shell to Solid for stress analysis of wing

I'm new to Mathematica as this is the first class I've had to used it in my undergrad time as an aerospace engineer. Anyway, I have run into a problem that I can't figure out. I have created .STL's of ...
2
votes
1answer
119 views

Finding the tangents of the function in each mesh

I have a 2D graphic which contains a table of curves within a circular region. ...