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.

4
votes
3answers
224 views

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

Given a surface region (MesgRegion netz2D), for example ...
3
votes
2answers
71 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
73 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
397 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
346 views
0
votes
0answers
26 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
46 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
39 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
45 views

Plotting a vector field embedded in a donut

I have the following code ...
3
votes
1answer
81 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
66 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
43 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
67 views

Transforming a 2D Mesh into a 3D object

So I have A 2D Mesh Region, for example ...
4
votes
1answer
68 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
113 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
331 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
39 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
47 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
164 views

How to Interpolate a 3D MeshRegion?

If you were given some discrete MeshRegion called r (you don't know R): ...
5
votes
1answer
74 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
26 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
97 views

Sometimes Region can't build right region

During my work with NDSolveFEM I found strange behavior of function Region. ...
1
vote
1answer
53 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
82 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
142 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
111 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 ...
0
votes
0answers
47 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
44 views

Understanding BoundaryMeshRegion error

I am trying to calculate the difference between two Cuboids: ...
1
vote
0answers
88 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
88 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
110 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
71 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
121 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
48 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
173 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
75 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
126 views

MomentOfInertia for Polyhedra incorrectly computed?

The moment of inertia for Regions seems to be wrongly calculated. Simple example: ...
1
vote
0answers
58 views

Regions, Mesh Regions, and Graphics

This behavior seems inconsistent to me: ...
1
vote
1answer
92 views

Mesh does not have a valid dimension as a plotting domain in 11.0

In Version 11.0, it appears that one cannot plot over a mesh. The following code worked in Version 10.2: ...
1
vote
0answers
47 views

Options problem for 3D plots

If I'm not mistaken, the code below should produce two identical pictures of a torus. But it does not. The MeshStyle->Thick option seems to be ignored for the first. Obviously the second code ...
4
votes
1answer
191 views

Voronoi mesh from non-parametric surfaces for 3D printing

I am trying to make a Voronoi mesh from the Stanford Bunny surface for 3D printing, intended as a test case to make a Voronoi mesh from any arbitrary, non-parametric 3D surface. Related techniques ...
4
votes
0answers
77 views

Analyzing MethodOfLines

In this example the wave equation ...
4
votes
1answer
161 views

Projecting 3D Mesh Region onto 2D Plane

For vizualization purposes in a beamer presentation I would like to project a 3D MeshRegion like ConvexHullMesh[RandomReal[{-1, 1}, {50, 3}]] onto a 2D plane. How ...
4
votes
1answer
82 views

BooleanRegion with .stl files does not work

Im trying to use BooleanRegion[] on an .stl file. The imported .stl file is called pores and is of type MeshRegion (...
3
votes
1answer
98 views

Performing queries on mesh structure in a clean way

I have the following problem, which can be stated geometrically as follows: List all pairs of vertex coordinates in a mesh region of measure 2 (a surface consisting of triangles) where these points ...
8
votes
3answers
180 views

Trouble meshing a Corbino disc

I am trying to simulate current flow using FEM through this particular device (a Corbino disk) and I have difficulties generating the mesh for it. Here is the region: ...
3
votes
0answers
74 views

Finding the shortest distance of two points and an area

So I have a region defined by something like MeshRegion[{{0, 0}, {1, 1}, {2, 1/2}, {2, -1/2}}, {Line[{1, 2}], Line[{2, 3}], Line[{3, 4}], Line[{4, 1}]}], and two ...
10
votes
2answers
168 views

How to return the coordinates of the respective 3 vertexes of a DelaunayMesh's face?

I have a set of points pts1 and a point redPts as below:- ...
14
votes
3answers
572 views

Crop a Voronoi diagram and get a proper MeshRegion

How can I crop a VoronoiMesh (or any similar MeshRegion) to a non-rectangular region and receive the output as a ...