Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mesh]

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

1
vote
0answers
30 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
57 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
72 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
57 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
59 views

Mesh mixes up markers in multiple curves

Following is my code: ...
4
votes
1answer
48 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
46 views

RandomPoint returns compiler errors on RegionIntersection of two Meshs?

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

How to draw individual mesh lines in ArrayPlot

Consider the following ArrayPlot. ...
2
votes
1answer
57 views

Creating a mesh from a very thin layer

I have the following code which works just fine: ...
5
votes
2answers
103 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 ...
9
votes
2answers
279 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
78 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
35 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
76 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
114 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. ...
5
votes
1answer
54 views

Mesh cell count for Voronoi mesh too low

I was trying to solve this question out of interest and thought perhaps creating a Voronoi mesh, cropping it to a circle, and colouring the mesh cells might work. However, if I ask ...
1
vote
1answer
35 views

Uneven distribution of nodes by ToElementMesh[]

We are using FEM package to generate mesh in a circular sector. Somehow mesh becomes dense in upper right corner. Is there any way to circumvent this uneven distribution? ...
4
votes
1answer
70 views

VoronoiMesh with custom distance function

I'm failing at reading the documentation. Is there a way to specify the distance function used by VoronoiMesh? As a stripped down example say I have a rank-1 lattice such as: ...
10
votes
2answers
131 views

ToElementMesh of Region with Hole

When I try to mesh the following region it fails. Why? Is there a workaround? ...
13
votes
2answers
564 views

Meshing the cow

As a simple example for applying stl-files I took "cow" out of MMA example data. I'm able to discretize the Graphic without problems ...
2
votes
1answer
75 views

Colorize mesh according to the nodepoint colors

Given a set p of points (2D), each with a unique color c, I can mesh these points easily ...
1
vote
2answers
82 views

Trouble with Calculating Area of Parametric Region

This question stems from an attempt to solve the following question: How to calculate specific area on surface of sphere? First, I parametrize a circular loop: ...
5
votes
3answers
246 views

How to create “Volumemesh” from closed “surfacemesh”?

Given a surface region (MesgRegion netz2D), for example ...
3
votes
2answers
88 views

Making NDSolve choosing by itself a spatial meshing leading to correct integrated results

In a previous post, I was asking how to force a fine spatial meshing in NDSolve using the FiniteElement method. The solution was ...
4
votes
3answers
85 views

Forcing at least $n$ spatial steps in solving a 1D spatio-temporal PDE problem with NDSolve

I want to solve the telegraph equation with a spatial discretization forced at 200 points. I tried: ...
4
votes
2answers
414 views

How would I define a region with multiple holes?

I would like to define a region consisting of a polygon with eight holes in it. This is essentially a stamped piece of metal with eight holes. ...
19
votes
3answers
417 views
0
votes
0answers
31 views

Using a mixture of QuadElement and TriangleElement in ElementMesh

TL;DR Is it possible to have a ElementMesh made of a mixture of a TriangleElements`` andQuadElements` Setup I've got the ...
5
votes
1answer
57 views

How to not show line mesh elements

Let's say I make a mesh from a collection of random points: SeedRandom[1234] points = RandomReal[1, {20, 2}]; mesh = VoronoiMesh[points] For the purposes of my ...
0
votes
1answer
44 views

How can I check to see if two cylinders overlap?

Is there a simple way for me to determine if a cylinder a and cylinder b overlap in the 3D space? I have spent a few hours ...
4
votes
1answer
53 views

Plotting a vector field embedded in a donut

I have the following code ...
3
votes
1answer
88 views

Creating a domain for NDSolveValue via ParametricRegion

A circular arc $R_2$ can be defined parametrically as $R_2 = \langle x(s),y(s) \rangle : s\in[-s_0,s_0]$ (see code below for specific $x,y$ definitions) where $s_0$ is given (I must make the arc this ...
0
votes
1answer
70 views

Understanding Energy Function [closed]

I am trying to implement as rigid as possible mesh interpolation solution provided in this article called "As-Rigid-As-Possible Surface Morphing" http://citeseerx.ist.psu.edu/viewdoc/download?doi=10....
2
votes
1answer
46 views

How to extract argument of MeshRegion-Object? [duplicate]

Consider examplary a MeshRegion-Object test = MeshRegion[{{0, 0}, {1, 0}, {2,1/2}, {2, -1/2}}, {Line[{1, 2}], Line[{2, 3}],Line[{3, 4}],Line[{4, 2}]}]; Looking ...
4
votes
1answer
79 views

Transforming a 2D Mesh into a 3D object

So I have A 2D Mesh Region, for example ...
4
votes
1answer
101 views

Multiple Boundary Conditions for NDSolve in mesh with multiple interfaces

Here is my problem: I want to solve a Laplacian equation in a 2D geometry with multiple interfaces, each interface presenting a different boundary condition. As for an example, I am working on a ring ...
9
votes
2answers
140 views

Distinguish between inner and outer boundary in MeshRegion

For example, this is a 2D MeshRegion with one (or more) holes in it: ...
9
votes
2answers
342 views

Picking mesh elements that are not on the border of the mesh

As an example, let's say I use a set of random points to create a Voronoi mesh pts = RandomReal[{-1, 1}, {100, 2}]; VoronoiMesh[pts, {-1, 1}] and get something ...
0
votes
0answers
45 views

How to get a “smoother” curve for a “discrete”-type curve?

A very interesting problem from here. I got the algebra in less than a minute with all 6 solutions (integers). But was puzzled a bit that the graph only gives 4. As now I have waken up and tried it ...
2
votes
1answer
56 views

Information concerning undocumented function “Region`Mesh`MeshNearestCellIndex[r ]”

I'm looking for further information of the undocumented function Region`Mesh`MeshNearestCellIndex[r] (Thanks to Henrik Schumacher!) The function considers a ...
12
votes
2answers
175 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
5
votes
1answer
83 views

How to set a NeumannValue on a given ElementMarker on the boundary of a mesh?

How can one apply a NeumannValue on an ElementMarker on the boundary of an ElementMesh for a ...
0
votes
1answer
34 views

DelaunayMesh error : EmptyRegion

What is wrong with the following list of points? When I apply DelaunayMesh[listPoints] I get the error ...
6
votes
3answers
113 views

Sometimes Region can't build right region

During my work with NDSolveFEM I found strange behavior of function Region. ...
1
vote
1answer
56 views

Mapping a boundary value problem: Jacobian in NDSolve and refining mesh close to a point

I would like to solve the (oversimplified!) BVP $u''(x)-u(x)=0,\qquad x\in[0,\infty)$ with the condition $u(0)=1$. I thought to remap this into the BVP problem $D[J^{-1}(\xi)u(\xi)]-J(\xi)u(\xi)=0, ...
3
votes
1answer
146 views

How to control boundary markers for overlapping FEM meshes?

I am trying to create FE meshes from vector or bitmap images and have come across the following issue. This is best shown using the following simplified code. ...
4
votes
1answer
172 views

How to create meshes with multiple regions from 2D images?

I would like to import 2D images to Mathematica and to use them to create meshed regions which can then be used for FEM. I create the images in Adobe illustrator so can either import a vector based ...
4
votes
2answers
147 views

How to make a frustum of a cone

For finite element purposes I need a frustum of a cone with a finite wall thickness, i.e. a tapered pipe. To make a cone is easy ...
1
vote
1answer
74 views

How to create surface mesh from a given 2D mesh toplogy?

I would like to convert a very easy(examplary) mesh(2D) ...
0
votes
0answers
62 views

Understanding BoundaryMeshRegion error

I am trying to calculate the difference between two Cuboids: ...