# Questions tagged [mesh]

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

443 questions
Filter by
Sorted by
Tagged with
640 views

### Region Intersection for MeshRegion objects embedded in 3D

How can I create a logical intersection of MeshRegion objects that are three-dimensional? The RegionIntersection function will ...
438 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. ...
122 views

### Cell-adjacency Graph of a Square Mesh

Consider the list of points pts = {{1, 1}, {1, 2}, {2, 1}, {2, 2}} I want to use them to define a 2x2 square mesh using ...
171 views

### Level sets of a parametric plot (3D)

I am having difficulty getting the level sets of a 3D parametric plot. I have a parametrized 3D surface that I suspect is self-intersecting and one way to see this visually is by plotting the level ...
263 views

### NMinimize fails on Mesh?

Context I want to identify the minimum of a solution of a PDE found on a mesh. Problem I do not understand why NMinimize fails on a mesh? As a test case, ...
174 views

### Volume of HexahedronElement with non-coplanar faces

Bug fixed in Version 12.0 I would like to calculate the volume of ElementMesh made of HexahedronElement. Even though ...
1k views

### Plot a vector field over a line

This seemingly simple problem is giving me some trouble. I need to plot a vector field on a line, and for that I'm following what I found here. I try to create a mesh that contains two points and just ...
626 views

### Transforming a region obtained with RegionPlot

I have a region r0, obtained from an interpolated function, with the use of RegionPlot. Let's call this function under the ...
144 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 ...
881 views

### Generating Meshes with Conforming Boundaries for FEM

I would like to solve a PDE on an annulus with some boundary condition that relates the inner circle to the outer circle. (For example, periodicity along radial lines). If I use a finite element ...
78 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 [...
112 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: ...
302 views

### Plot the solution over the deformed mesh

I'm solving a linear elasticity problem and trying to plot a displacement/stress fields over the deformed mesh instead of the undeformed one. The deformed (red) and undeformed (black) meshes look like:...
1k views

### Different MeshStyle for different functions

By using Plot command I want to get one curve in form of circles and other like a solid line. ...
104 views

### How to draw individual mesh lines in ArrayPlot

Consider the following ArrayPlot. ...
65 views

### Plotting a vector field embedded in a donut

I have the following code ...
189 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 ...
85 views

### Color a mesh using ListDensityPlot

I have a list of data and I plot using ListDensityPlot: ...
216 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 ...
1k views

### Explanation about RegionFunction and MeshFunctions?

In the link, ParametricPlot3D, consider the example(Variation on the Spheres) given in the Neat Examples section. Can someone please explain how ...
108 views

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...
101 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 ...
150 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 <...
293 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 ...
103 views

### mesh element id style

I need help to make the elements id visible in the meshing code ...
183 views

### How to get a larger triangle when we discretize a sphere?

In order to solve this problem,I want to get larger triangles (Of course less amount). But I don't know how to do this. I have tried MaxCellMeasure and ...
98 views

### Disassambling a boundary mesh into pieces and building it back again fails. Why?

I have just a misunderstanding of a sort. What I want is (1) to build a boundary mesh, (2) then to disassemble it into a list of the boundary points, and (3) to further assemble it back starting from ...
62 views

### Keep mesh of triangulation under complex valued transformation

I try to make a quick tool for "plotting" complex valued functions. Therefore I generate a Table of complex valued points lying in the complex plane building a ...
47 views

### Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ...
75 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 ...
81 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: ...
96 views

### Transforming a 2D Mesh into a 3D object

So I have A 2D Mesh Region, for example ...
334 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 ...
244 views

### How to create a neighboring list for a given triangulation and find the triangle and construct the tile?

I am new to Mathematica and I am currently in need of some help with creating a neighboring list of triangles for a given triangulation and finding the path to the triangle containing the random point ...
99 views

### duplicated vertices in mesh generation

I want to generate a MeshRegion from ParametricPlot3D, e.g. the hemisphere (the PlotPoint is used to get small numbers of vertices) ...
319 views

### Stop ListContourPlot from interpolating beyond the data points

I am using listcontourplot to show my 3D data points but It is interpolating between faraway points and it is changing the outline of the shape. this is what I want to see: and this is what I have: ...
141 views

### How can I construct the derivative matrix for an irregular domain?

I wish to construct the derivative matrix corresponding to an irregular set of points. For example, I have the following grid consisting 16 nodes in the 2D plane: ...
147 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 ...
333 views

### Writing loops for triangle elements

I'm kind of new to using Mathematica, so any help is great. I'm trying to write a program that will create a list or matrix that will give each small triangle's point numbers. For example if given ...
70 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 ...
118 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 ...
106 views

### Speedup DiscretizePDE when InitializePDECoefficients contains Interpolation functions

I work on FEM in Mathematica and want to speed up the computation when dealing with very fined mesh (i.e., a huge number of DOF). I found that a very much longer time is consumed when the ...
324 views

### Curved mesh boundary from space curve

This is a follow-up question to an earlier question. Question: Given a general space curve xy[t_] = {x[t], y[t]}, how can a region be generated to yield a mesh ...
964 views

### Generating mesh from region - possible bug

I want to perform a calculation over a region that is an isosceles triangle with a circular segment attached to the base. The region generalises a circular sector, where the apex of the triangle is ...
207 views

### Problem with MeshOrderAlteration to create a 2nd order ElementMesh

After working on this 2D domain, I'm trying to reproduce the same ideas to create a mesh of a sphere composed of QuadElement, instead of more simple and common <...
133 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 (...
261 views

### Intersection of sphere and region below a plane-DiscretizeRegion was unable to discretize the region ImplicitRegion

I am trying to create a geometric object represented by the intersection of a sphere and the space below a plane using ImplicitRegion. When I use the sphere alone, it works. When I use the plane alone,...
116 views

### Finite element mesh coordinate lies outside solution interpolation function

I solve a finite element problem and then want to look at values at mesh nodes for further calculations. Unfortunately the solution interpolation function identifies some mesh coordinates as being ...