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.

9
votes
2answers
235 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
50 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
32 views

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

I have some simple code to generate a mesh over a rectangle. ...
1
vote
1answer
69 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
104 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
49 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
32 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
66 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
117 views

ToElementMesh of Region with Hole

When I try to mesh the following region it fails. Why? Is there a workaround? ...
13
votes
2answers
542 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
70 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
72 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
243 views

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

Given a surface region (MesgRegion netz2D), for example ...
3
votes
2answers
82 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
81 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
408 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. ...
18
votes
3answers
400 views
0
votes
0answers
29 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
51 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
42 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
51 views

Plotting a vector field embedded in a donut

I have the following code ...
3
votes
1answer
85 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
44 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
74 views

Transforming a 2D Mesh into a 3D object

So I have A 2D Mesh Region, for example ...
4
votes
1answer
86 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
123 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
333 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
44 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
53 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
169 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
5
votes
1answer
77 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
31 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
103 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
108 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
157 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
128 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
69 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
51 views

Understanding BoundaryMeshRegion error

I am trying to calculate the difference between two Cuboids: ...
1
vote
0answers
90 views

ElementMeshContourPlot and PlotLegend [closed]

Does anybody know why ElementMeshContourPlot ignored PlotLegends->Automatic? I have used the useful topic about Von Mises stress but I vould like a colored scale on the right of the plot. With ...
3
votes
1answer
95 views

ImageMesh for continuous 3D images

I have a 3D image containing distance fields, and would like to produce a mesh region from a contour at a fixed level. I found two options for this ImageMesh[], ...
4
votes
1answer
123 views

MeshRefinementFunction for region gives error

I would like to refine a mesh within a given path/volume, that is specified by the MeshRefinementFunction option given in ToElementMesh[]. For starting i took a simple 3D MeshRegion of a Tetrahedron <...
7
votes
4answers
347 views

Recalculate line coodinates

I have the following line: ...
4
votes
1answer
83 views

Error in Mesh Region during concave hull

I have the following data: Data.csv It crates the following image: Im trying to make a concave hull so that I can create an outline of the region. I have tried to use all versions of the ...
6
votes
2answers
124 views

Inconsistent mesh generation from BoundaryDiscretizeRegion and ToBoundaryMesh at creases

I'm trying to use BoundaryDiscretizeRegion and/or ToBoundaryMesh to generate polygonal models for 3d printing, but I'm having ...
2
votes
1answer
51 views

Difficulty with making the color gradient in the Parametric3D plot

I am making a parametric 3D plot representing a graphical solution of a nonlinear equation. This explains, why the expression is so heavy. I would like to plot it with the color gradient such as "...
7
votes
2answers
187 views

ToElementMesh ignores Boundaries and MeshRefinemet

I'm building a mesh of a pit storage in Mathematica which I then export to another FEM-software. I follow the workflow for creating a ElementMesh from the documentation, but it won't work in the way ...
0
votes
1answer
89 views

How to increase the thickness and change colors of the edges in a mesh?

Consider 10 random points as pts = RandomReal[{-1, 1}, {10, 3}]; The edges of the polyhedron formed by these points can be visualized as ...
7
votes
2answers
128 views

MomentOfInertia for Polyhedra incorrectly computed?

The moment of inertia for Regions seems to be wrongly calculated. Simple example: ...