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

learn more… | top users | synonyms

14
votes
3answers
353 views

How to convert a surface into a solid

Context I am interested in converting surfaces into solids (so I can make a 3D mesh out of them using ToElementMesh) Say I have the following cool surface ...
6
votes
1answer
131 views

Smoothing out data points in a ListDensityPlot

I stumbled upon this problem when I was trying to make some nice smooth ListDensityPlots of my numerical data. In short, my problem is that I let Mathematica plot two copies of basically the exact ...
4
votes
4answers
263 views

Colouring points in a Delaunay Mesh by the number of nearest neighbours

I apologise if this is a repeated question, but I've searched for a while and can't find anything. I'm doing some molecular dynamics simulations using Mathematica 10, and I've placed a ...
3
votes
1answer
90 views

How to specify a mesh in plotting options [closed]

I have a very simple question: Imagine I have solved a PDE on a mesh and want to display the solution on the same element mesh that was passed to NDSolve. I have ...
0
votes
1answer
58 views

Adjusting VoronoiMesh size

How it is possible to extend VoronoiMesh to the whole ListPlot in the following example? ...
6
votes
2answers
335 views

Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
3
votes
1answer
59 views
1
vote
1answer
46 views

Why is the solution of NDSolveValue asymmetric when the regions it's solving over are symmetric?

I am creating a mesh over a 3D region and then using NDSolveValue to try and solve for a function over that mesh. The structure is fairly simple, just two polygon squares inside of a big cube. I ...
4
votes
1answer
43 views

How do I change nodal coordinates in a 2D mesh without changing anything else?

I have a 2D mesh that I generated via ToElementMesh. It discretizes a square domain with a small hole whose shape comes from a parametric B-spline. I now want to ...
1
vote
0answers
48 views

How to label vertices on a mesh with user defined values?

I am trying to write a code to estimate geometric properties (i.e. Mean Curvature, Gaussian Curvature, Principle Curvatures) on a triangulated mesh. I would like to save the calculated data as a set ...
6
votes
3answers
208 views

Can one use MeshRefinementFunction to obtain a nonobtuse triangulation?

I have a planar convex polygonal region Rc. I would like to triangulate it such that every triangle is nonobtuse. I was hoping that the ...
0
votes
1answer
54 views

Writing PDE boundary conditions with derivatives, More general than Neumann

I am solving 2D Laplace equations on f[x,y] with boundary conditions SomeVector[x,y].Grad[f] == 0 This is more general than Neumann. Is there a way to set such boundary conditions for a curved ...
8
votes
0answers
82 views

Why isn't ToElementMesh figuring out what my boundary is in 3D?

I am trying to change the element mesh for a FEA application I'm doing. I thought I understood it, when I did it in 2D. Here's my shape: ...
4
votes
0answers
46 views

What is the difference between getting a boundary mesh from ToBoundaryMesh vs doing it with ToElementMesh?

I am trying to figure out how to define and use meshes for FEM and NDSolve. I've figured out that if I want more resolution near my boundaries, I can use ToBoundaryMesh to first create the boundary ...
3
votes
1answer
42 views

Is there a way to make MaxCellMeasure and MaxBoundaryCellMeasure comparable?

I'm trying to learn a little about meshes used for FEA and such. It seems like a good strategy if you are creating a mesh for a region is to use a finer mesh near features than the mesh used over ...
7
votes
3answers
250 views

Lloyd relaxation on VoronoiMesh

How can we apply Lloyd's relaxation algorithm to a VoronoiMesh? Thanks. UPDATE Thanks a lot KennyColnago for your answer. Based on Simon Woods suggestion of ...
5
votes
1answer
73 views

Are the triangles in DelaunayMesh oriented ccw?

MeshCells[R, 2] returns the triangles from R=DelaunayMesh[pts], where pts is a list of 2D ...
3
votes
1answer
61 views

How can I plot a “slice” of the mesh for a 3D plot?

I'm using NDSolveValue to solve the Laplacian equation for this geometry: I want to view the mesh that NDSolveValue is using, so I do the following: ...
6
votes
2answers
406 views

How to color the triangles of a mesh?

Given a mesh, I want to assign each triangle a color. I tried to do it in this way: ...
4
votes
1answer
106 views

How do you refine the elements of a 3D mesh?

Response to Answer below. Original Question: I am trying to refine a 3D mesh in a certain region. This seems relevant but does not work for me. I start by making the region which consists of a box ...
1
vote
0answers
56 views

Why is MeshRegion atomic?

I wanted to make some changes inside a MeshRegion today and found that unlike Graphics objects, it can't be done directly ...
0
votes
1answer
87 views

Concerning the default coloring made by Plot3D in 10.4 [closed]

Recently, I have installed Mathmatica 10.4, but I found out that when I use Plot3D, it gives me a mesh. In order to add color, I have to explicitly set ...
3
votes
2answers
97 views

Assigning Element Markers to 3D FEM Mesh

I have created a 3D graphic using GraphicsComplex and then use ToElementMesh to generate a 3D Mesh that I want to solve a PDE on, but I cannot figure out how to apply ElementMarkers to the Boundaries. ...
1
vote
0answers
36 views

Find best convex approximation of an “almost convex” function

I've got values of a function of two variables at integer points inside a rectangle, that is, a rectangular table $f(i,j)$, $1\leqslant i\leqslant m$, $1\leqslant j\leqslant n$. The function is very ...
8
votes
2answers
137 views

How to assign Element marker at boundary edges

How to assign marker at the boundary edges as 1, 2, 3, 4 respectively and set all of the inside elements of region as 0? for example: Code: ...
8
votes
0answers
82 views

Defining a MeshRegion from a list of points and Polygons with duplicate points does not work in 10.4

Bug introduced in 10.4 and persists through 10.4.1 This code produces a MeshRegion in versions 10.0 through 10.3.1, ...
12
votes
1answer
171 views

How to access FEM shape functions

A couple of days ago I asked here about surface meshes and plotting on surfaces. Now I have another question: How can I access the surface or boundary element shape functions? I would like to ...
5
votes
2answers
160 views

How to create a surface mesh embedded in 3D?

I am working on a problem where I want to optimize current densities on 2D surfaces embedded in 3D to generate magnetic fields. The current density on a surface can be written as a scalar function ...
12
votes
1answer
161 views

RegionNearest and neighborhoods

In this previous question we see that RegionNearest isn't quite as 'capable' as Nearest for some things. Similarly, I need to ...
2
votes
1answer
84 views

Plot a revolution surface, with two cross sections to show its shape

I'm having trouble plotting a revolution surface with intersections. What I have done is shown in the figure, with the help of SphericalPlot3D: . But I can't plot ...
3
votes
1answer
103 views
11
votes
2answers
275 views

How to mesh a region using adaptive cubic elements

Assume a list of {x,y,z} coordinates. The coordinates are arranged in a regular fashion through a fixed raster size (called ...
1
vote
0answers
56 views

Handling Self-Intersecting Regions

I am trying to test various parametric regions of a function for membership of the origin (point {0,0}). I generate the boundary by creating four parametric boundary curves, and then use RegionMember ...
1
vote
1answer
66 views

Angles inside of Voronoi mesh cells

How can I determine the angles belonging to the vertices of each interior Voronoi mesh cell? ...
3
votes
2answers
146 views

Connecting the points surrounding the adjacent polygons

I'm trying to connect the points surrounding the adjacent polygons. I know how to find the adjacent polygons on a Voronoi mesh. However, I'm unable to adjacent of the adjacent polygons. What I'm ...
3
votes
4answers
142 views

Invalid region for small angles. To Element Mesh. Finite element method

I would like to mesh the region below in order to use it for a calculation by means of NDSolve. Could anyone help me to discretize this region for NDSolve using. Thank you very much. ...
5
votes
3answers
307 views

Removing cells from Voronoi mesh if they exceed a certain area or circumference

I start with the example in Finding the perimeter, area and number of sides of a Voronoi cell with RunnyKine's answer: ...
0
votes
0answers
25 views

Discretization of a region for NDSolve using [duplicate]

I would like to mesh the region below in order to use it for a calculation by means of NDSolve. Could anyone help me to discretize this region for NDSolve using. Thank you very much. Needs["NDSolve<...
4
votes
2answers
143 views

Color code Voronoi cell areas depending on number of vertices

The following question is similar to Colouring points in a Delaunay Mesh by the number of nearest neighbours ... but I do not know how adapt this answer to my problem. I have the following image: ...
8
votes
2answers
323 views

DelaunayMesh in a specified closed region - creating a concave hull from a set of points

I have a list of discrete points wich I want to use as nodes for creating a 2D mesh. I used DelaunayMesh and it works fine. The problem that I have is that some elements/polygons are outside of the ...
0
votes
0answers
35 views

Is there a extend mesh generation program link with mathematica such as openfoam native blockmesh?

I have read the relative mesh tutorial in mathematica, and found that it mainly focused on finite element method with triangle and tetrahedron, so I wonder if it is possible to link a general extend ...
1
vote
2answers
113 views

Delete/Extract some certain data from a list?

These are some polygons for Voronoi mesh. ...
7
votes
4answers
505 views

Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polynom p ...
2
votes
0answers
92 views

ElementMesh (rendering?) issue

The appearance of the following ElementMesh is bad as you can see for example on the inside surface of the shell. The same problem happens converting to a ...
6
votes
0answers
135 views

Possible Bug with Options in DelaunayMesh

Bug introduced in 10.2 and persisting through 10.4 Update: It turns out after some testing, none of the Options work in ...
6
votes
1answer
173 views

Making a 2D hexagonal mesh

There are a lot of answers for how to make a hexagonal mesh on a 3D surface but nothing on how to make a hexagonal mesh on a 2D surface. Can any provide code on how to do so? I am new to mathematica, ...
3
votes
2answers
136 views

How to make the mesh to rotate with a surface in Manipulate?

Here's a Manipulate code to show a particular 3D surface, rotating uniformly in time. The point of this Manipulate box is to show that the surface do indeed rotate like a solid, so I can't "cheat" ...
5
votes
1answer
36 views

How to specify the text size of a vertex index in a 3D mesh using Labeled

My code takes a list of {x, y, z} vertices and displays a convex hull with each vertex labeled by its index in the list. Here is a minimal working example of the ...
2
votes
1answer
140 views

MeshRegion: How to take out a subregion

I have this application at hand: I need to find the Voronoi Regions of a finite set of point and then i have to find the center of mass of each of these Voronoi regions for a given mass distribution. ...