# Questions tagged [mesh]

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

689 questions
Filter by
Sorted by
Tagged with
75 views

### Is it possible to solve a differential equation with a user-defined variable mesh in NDSolve?

For some differential equations, its solution may evolve to a cusp, for example, singular behavior. One may want to introduce additional mesh points near the cusp to accurately follow the solution ...
325 views

### How to generate a mesh in an area with curves inside

I would like to know how to generate a mesh inside an area, and be able to find the original curve outline inside the area from the mesh. For example: There is a rectangle inside which there is a ...
• 83
151 views

### For "RegionPlot", how to fill lines, points, or grids in different areas?

For "RegionPlot", how to fill lines, points, or grids in different areas? I have tried "Mesh", but it fills all region in same mesh. I want to get the result just like this picture,...
• 41
212 views

### Quarter a given triangular meshregion

For a given , examplary simple, triangular meshregion ...
• 36.4k
128 views

### How to do boolean operations between a large amount of regions

I want to do boolean operations between a large amount of regions. For convenience, I consider a simplified problem. The problem is as follows, digging out a large number of small hemispheres on the ...
• 165
84 views

### How to detect neighbours of a MeshRegion?

For a given triangle meshRegion(examplary) \[CapitalDelta]reg ...
• 36.4k
233 views

### Controlling the discretization of a Tube around a ParametricPlot3D

I am playing around with using Tube as an option under PlotStyle for a ParametricPlot3D ...
• 9,756
1 vote
49 views

### Problem with Mesh in Contour Plot

So I was using ContourPlot to plot an equation and I want to highlight the sampling points of the contour plot. So as written in the Mathematica documentation, I tried using ...
• 21
221 views

### Stretching a mesh

Imagine I want to stretch a mesh with a 'rubberband-type' effect. That is, upon and elastic stretch from both side edges, the mesh centres simply scale as follows where the points are seeds for ...
• 4,138
154 views

### Mesh generation for a discrete set of points in ListContourPlot?

Given a (possibly disjoint) region, defined by a discrete set of points, how can I use ListContourPlot[] together with Mesh to ...
1 vote
81 views

### ArrayPlot3D mesh customization

I am trying to visualize a few 2D arrays in ArraryPlot3D. I think I have made it work, however, there is a minor detail on the mesh of the plot I want to improve. For example, this is what the current ...
• 53
196 views

### How to order the coordinates generated by ToBoundaryMesh counterclockwise?

The following code works for polygons. A square 4x4 is tried here: ...
141 views

### How to combine several surfaces into a solid and compute its volume?

plot1 is taken from the BSplineSurface document. I add two Disk ...
88 views

### Coordinates of mesh generated by Mathematica-FEM

MeshCoordinates function yields more nodal coordinates than expected. Can I extract the coordinates of vertices only. Here is an example of a square region with a course mesh to explain the problem. I ...
82 views

### The element mesh has insufficient quality

I am quite new at FEM. I was trying to create a triangular mesh of a rectangular region. I wanted to do something very basic: Discretize the domain using squares and then subdivide each square into ...
• 117
71 views

### How to get mesh-information from Plot3D

In a simple example Plot3D shows a triangular mesh: pic = Plot3D[Sin[x] Sin[y], {x, 0, 1}, {y, 0, 1}, Mesh -> All] I know ...
• 36.4k
101 views

### 2nd Order Regular Triangular Mesh on Rectangular domain

I want to create a mesh of 6 noded triangular elements ( 2 nd order element) on a rectangular domain as shown. (0,0) can be seen at left bottom corner with the whole mesh in the positive quadrant. I ...
198 views

### Smooth refinement for a merged 2D mesh

Thanks to @user21 response and FEMAddOns I have been able to create a multi-region mesh. I am trying to make a smooth transitional mesh refinement with respect to a ...
• 1,554
104 views

### How to visualize an externally calculated FEM solution

I am trying to make animations of results of a FEM solver from an external model. Basically, I am pre- and post-processing in MMA. As a simple example, let's say I have a mesh such as: ...
• 1,554
83 views

### Finite Element Mesh generation with varying element order

I am trying to do a finiteElement Simulation of the Sun - Earth system for some modified gravity model in cylindrical coordinates. I find that 2nd order elements approximate the gravitational field ...
• 75
175 views

I have created the following mesh for a slope stability problem: ...
• 2,760
29 views

### Meshgrid Visible in RegionPlot when Saving Figure as PDF [duplicate]

I have a region and a contour plot. My goal is to superimpose them to compare them. So, I used the Opacity[] on the region plot function but when I save the figure ...
69 views

### Error calculating RegionDifference of two disk sectors

I am trying to implement an exercise that should be straightforward. I have two sectors of disks (in blue and orange below) with an overlap. I am trying to calculate their Region Difference, but it ...
• 473
99 views

### RegionIntersection for big mesh, AnatomyData["skin","MeshRegion"]

I want to cut a human in half. Say skin=Entity["AnatomicalStructure","Skin"]. So, ...
• 2,648
252 views

### How can I create a mesh of closed shape?

I have this hexagon that defined according to these points ...
• 2,975
113 views

### How to just set MeshStyle but don't change the BoundaryStyle?

This is my code: ...
• 23.2k
56 views

### Disappearing level curves on ParametricPlot3D

The mesh of level curves on ParametricPlot3D[] does not work for some functions. For many functions it works normally, e.g.: ...
• 365
50 views

### TriangulateMesh failed at this kind mesh

mesh = ImageMesh@ImageResize[imgB, 512] TriangulateMesh or DiscreteRegion failed at mesh,...
• 8,085
78 views

### FEM in 3D: assigning proper mesh for NDSolveValue

I am trying to compute electric potential in a simple 3D geometry containing (in a simplied version) 3 conductive rings (2 outer rings at 0 V, and the inner at 1 V) in different planes and I don't get ...
• 33
49 views

### Umbilic torus - Export to stl format produces bad mesh in MeshLab

I am interested to 3d print the following structure from this link. I assigned FaceForm and Thickness to check check for orientations and to give some thickness for printing. The resulting stl is ...
• 175
1 vote
64 views

### I need to make a Hexolnikov grid from a 2-D array AND in the row and column refer to the corresponding hexagon by painting over it

I'm new to mathematika. I need to access the hexagon by the index of the two-dimensional array that I set. This hexagon needs to be painted over, I was able to find how to set the grid only with a one-...
117 views

### Avoiding Concave Polygons

In a vertex model, vertices in a lattice are modelled by a set of ODEs. A T1 transition is the following: when a certain edge becomes small enough (given a threshold), two cells stop being connected, ...
• 4,138
619 views

### Problem with exporting RegionPlot as PDF

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 ...
• 4,138
208 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 (...
• 563
104 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 <...
• 563
87 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 ...
• 75
98 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 ...
• 563
150 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 ...
95 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 ...
79 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 ...
• 31
73 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 ...
234 views

### Modified Heat Transfer in Fluid Flow

I am trying to simulate Modified Heat Transfer in Fluid Flow (based on Buoyancy-Driven Flow in a Square Cavity ). The modified heat transfer takes the form: with the solid volume fraction: The ...
• 1,624
304 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 ...
• 1,110
1 vote
55 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)? ...
• 39
646 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 ...
• 91
214 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 ...
• 2,975
117 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 ...
134 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 ...
153 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 ...
• 563