# Questions tagged [mesh]

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

653 questions
Filter by
Sorted by
Tagged with
343 views

### Problem while exporting PDF vs PNG

I have the following RegionPlot (which code I don't present since it comes from a long expression): When I right click on it (within the notebook) and try to save ...
170 views

### 3D FEM Mesh - Accessing values of individual boundary elements

I have 3D mesh and calculate the heat equation using NDSolve. I want to access the temperature values on the individual boundary elements to solve another problem (...
82 views

### FEM Mesh - how to get elements belonging to ElementMarker

I want to get a list of all boundary elements belonging to a certain ElementMarker of a boundary mesh. This code creates a simple mesh and allows to inspect the <...
71 views

### FEM Meshrefinement for 1D Interval and Elements of order 2

I would like to create a 1D mesh of the intervall (-pi/2,pi/2) for solving a DE with FEM, with more elements close to +-1 - these elements should be of order 2, since order 1 elements yield too low ...
64 views

### 3D FEM - How to use element markers for boundary integration

I am having trouble integrating over some curved boundaries and was thinking about using the element markers of the boundary mesh for integration rather than conditionals. Is it possible to use ...
123 views

### NURBS model from a entire mesh

I have a mesh in STL file format and imported it into Mathematica. data=Import["mesh.stl"]; or ...
44 views

### Mesh Control Problem

I am having trouble combining two graphical objects. The problem has to do with controlling mesh lines. The simplest failing example is combining a circle graphics primitive with a RegionPlot. Either ...
68 views

### Custom mesh to help with a Fokker Planck eqn (refined rectangular mesh?)

Physicist here, new to SE and fairly new to MMA. I'm looking to solve a Brownian motion problem with inertia (m ≠ 0) and a velocity dependent diffusion coefficient, which in dimensionless units and ...
62 views

### Solving differential equation system with FEM when the equations depend on the mesh cell size

I am trying to implement Large eddy simulation with FEM for solving air flow simulation using Smagorinsky sub-grid stress model. In order to implement this there is a parameter (filter size) in the ...
247 views

### Smoother boundaries between components of segmented image

I'd like to use boundaries between components of a segmented image to create a mesh for finite elements, as described in Mesh for Images for three materials and meshes with multiple regions from 2D ...
52 views

### Two figures in same graph, how to add mesh to figure 1 but not figure 2?

I plot two figures on the same graph. The following code adds mesh to both figures. But how do I add mesh to the first figure only (not to the second figure)? ...
583 views

### Mesh from Images for three materials

I want to mesh a figure which contains three different materials (organic-based materials and polymers) using Mathematica. Namely: Black color: material A White color: material B Grey color: material ...
208 views

### How to create a 2D mesh along a specified path?

I am trying to create a mesh along specific lines connecting specific points. Here I used Subdivide to create n steps along the ...
103 views

### Parametric Plot: different coordinates for texture and mesh

I try to create a parametric plot which maps from the complex unit circle to a different region in the complex plane. That works fine but I have one problem: I want to see the images of a mesh with ...
94 views

### How to create a 2D mesh and obtain all the coordinates and connectivity

I know this is a really amateur question, but I´m kind of new in here. Though I´ve been trying for the last few days I simply cannot convert a set of points (well actually a region) to a mesh. But ...
127 views

### 3D FEM Mesh problem - either bad mesh or inaccurate geometry

I am having trouble obtaining a good 3D mesh. I have tried lots of stuff, either resulting in a bad mesh or inaccurate geometry. My geometry consists of a cuboid with a quarter cylinder cut out on a ...
109 views

### Lighting/Mesh problem after GeometricTransform

This is probably a silly question but... Context I have gathered from this site Functions to draw sets of concentric 3D rings as follows: ...
132 views

### MeshTools' CylinderMesh fails in MMA version 12.3.1

I cannot run the CylinderMesh function of MeshTools in Mathematica version 12.3.1. ...
104 views

### 3D meshing of cyllindrical domain into hexahedral elements

I need a solution for generating a hexahedral mesh for a cyllindrical domain in Mathematica/AceFEM. Ideally, it should be close to cyllindrical symmetry not very far from the center. The best option ...
113 views

### What does "TetGenTetrahedralize: Tetrahedralize returned an error, 2. mean? Also error number 1,2,3...?

regioncalc5 = ToElementMesh[regioncalc4, MeshRefinementFunction -> ff] TetGenTetrahedralize: Tetrahedralize returned an error, 2.
76 views

### Face vertices of Polyhedron objects are not actually coplanar?

I'm trying to draw "random" polyhedra with exactly $n$ faces. I figured the easiest way to do so was to get an "evenly-spaced" set of $n$ points on the sphere, get their ...
77 views

Foundation Input: unit circle The exercise deals with transformations of the unit circle, $(\cos \theta, \sin \theta)$. We start with the unit circle with Hue coloring over the angular range of $(-\pi,... 0answers 93 views ### Create mesh from point cloud I would like to create a smooth mesh from a point cloud. As an example, let's create a bunch of points from the Hénon-Heiles system ... 1answer 41 views ### MeshFunctions::invmeshf that resists other solutions I'm trying to base mesh on the slope of the function. That's why there is a Cross of two partial derivatives. ... 1answer 70 views ### How can I select both holes to get high density mesh? I'm new in Mathematica. I'm trying multiple methods to select both holes without success. Any help will be helpful. Thanks. ... 1answer 110 views ### Running out of RAM because of a loop I'm working with some Voronoi diagrams, and I want to find the perimeter and area of each polygon in it. I think I accomplish that, but I have a problem with RAM memory management. This is a ... 1answer 103 views ### Meshing Accuracy in 3d The Element Mesh Generation tutorial describes how good mesh accuracy is achieved through adjusting boundary nodes so they match the region boundary. This is illustrated with this example: ... 1answer 86 views ### How to generate an heterogeneous mesh I'd like to generate a mesh with a big variance in cell size. Something like I'd prefer not to rely on a vertex model and perhaps use something simpler, like ... 1answer 83 views ### Mesh refinement along grain boundaries I have again a mesh related question. I want to do simulations on a microstructure and therefore I have to mesh it. That works fine, but the refinement of the grain boundaries does not work and let &... 1answer 129 views ### Defining mesh size for NDSolve I want to see the effect of mesh size on the solution curves while simulating convection-diffusion - point sink via NDSolve FEM. In the following code (ref also related to this post): I'd like to know ... 4answers 2k views ### How can we find the longitude that cuts all the land on Earth in half? Mathematica has already a specific function, RegionCentroid, that can be utilized to calculate the geographic center of any region. As it has been discussed in here ... 1answer 74 views ### Does DelaunayMesh use exact computations? What is the treatment of non-generic cases? Computing Delaunay complexes can be sensitive to numerical instabilities, especially in higher dimensions. I would like to know how much I can rely on Mathematica's answers when using ... 2answers 133 views ### AceFem Error in SMTShowMesh I consider for a calculation a sphere embedded within a matrix. To plot the results and especially the behavior around the spherical inclusion I want to "cut" through the matrix. That seems ... 1answer 139 views ### Create a spherical Hex mesh from given surface points For my calculations I got two spherical meshes. One is a surface mesh of quadrilateral elements and the other is the corresponding "inner" hex mesh. The problem with the meshes is, that the ... 3answers 106 views ### How to make a 3D listplot with meshlines going only along one cartesian coordinate? I have an external python code that computes a bunch of data, which I read into Mathematica as a table, so: Import["Documents\Hubbard\Python\data.dat", "Table"]; These files are ... 0answers 43 views ### Export 3D Mesh without shading issues I can export a mesh to a .obj file such as with the following: ... 1answer 184 views ### FEM: how to redo a composed boundary mesh for better quality? Suppose you have region with 2 materials: one embedding material (matrix) containing some particles (... 1answer 96 views ### Export ComplexPlot3D as Mesh with Material If I generate a complexplot as follows: a1 = ComplexPlot3D[Log[z], {z, -5 - 5 I, 5 + 5 I}] I can export it to a 3D mesh (for use in external applications) with: <... 1answer 93 views ### "Mesh -> Full" Disables MeshFunction in ParametricPlot3D Here's my code ... 1answer 79 views ### Mesh with Prescribed Vertices Mathematica has documentation for triangulating regions bounded by curves using e.g. TriangulateMesh. This is very useful for the work that I (aspire to) do drawing pictures of complicated surfaces ... 3answers 334 views ### Voronoi diagram of two data sets My primary data is ... 2answers 132 views ### Bounded polygons in Voronoi diagram and calculating the areas and the number of sides of each polygon I have some data as ... 4answers 284 views ### Extrude 3D list with thickness n I have a 3 dimensional list of points which i would like to extrude in z coordinate with thickness n, i.e. z_{i} -> z_{i}+n for all points in z. There is a similar question concerning 2d list where ... 1answer 56 views ### Plotting fundamental domains of$\mathbb{Z}^{2}\$ with additional features [closed]

I'm trying to figure out how to plot a region that looks like this: The squares don't have to be painted like that, if I could have just light green, gray, light blue and light red it would be great. ...
85 views

### Solving PDE with prescribed rectangular mesh

Question: I want to solve a PDE using NDEigensystem. The region is a rectangle Rectangle[{0,-70}, {20, 70}]. How can I make a ...
85 views

### NDSolve with FEM works on my computer but not on another one I have

I have the following code: ...
32 views

### Finding points of intersections between contours and mesh functions in ContourPlot3D

I have this code example that finds plane of zero first derivatives - the intersections of these planes will give the locations of the local extrema. Or at least a good starting point to finding them. ...
84 views

### ContourPlot and MeshFunctions issue between versions 11.3 and 12.0

On Mathematica 11.3 This code produces the image below (a set of points that I am then using as a pattern for FindRoot): ...