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

learn more… | top users | synonyms

4
votes
2answers
84 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
3
votes
1answer
94 views

How to calculate a Delaunay mesh nerve?

How to calculate a Delaunay mesh nerve? A Delaunay mesh nerve is a collection of triangles that surround a single triangle called the nerve nucleus. The triangles in a Delaunay mesh nerve either have ...
1
vote
2answers
127 views

How to find adjacent polygons of a specific polygon in a VoronoiMesh?

I have developed a code for VoronoiMesh. I am also able to find the polygon with highest number of adjacent polygons. How do I find the indices of the adjacent ...
1
vote
1answer
64 views

change color of the face in a 2D ConvexHullMesh [duplicate]

If I say tri = ConvexHullMesh[{{0, 1}, {1, 1}, {1, 0}}] a triangle is rendered in blue. How can I change that color? An answer to an earlier question suggested ...
3
votes
3answers
181 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 ...
4
votes
3answers
164 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 V10, and I've placed a ...
10
votes
1answer
122 views

how to enforce a symmetric solution with fem?

I'm solving the laplace equation in a domain with holes, and I need to compute the integral of the gradient on the boundary of these holes. For that I define a mesh and solve the laplace equation ...
6
votes
1answer
198 views

How to create an ElementMesh of a Sphere

I want to create an ElementMesh of a "sphere". To reduce the computational effort I want to use HexahedronElement; the ...
5
votes
1answer
80 views

how to create a FEM mesh with “RegionPlot” where the sample points are a function of the position

I need to resolve the diffusion equation in a domain with circular sources (holes). I've tried defining the whole region with holes but the result is very mesh-dependent and not symmetric, so at the ...
6
votes
2answers
82 views

How to scale values for ColorFunction in SliceContourPlot3D?

Trying to help out in the question, Finite Elements 3D, I came across this behavior of SliceContourPlot3D: ...
6
votes
1answer
162 views

Long running ToElementMesh with very “large” domains

This is fixed in version 10.3. I'm trying to solve a system of PDE over a large domain. This doesn't means I need to have a huge amount of mesh points and mesh elements to discretize the domain. ...
9
votes
2answers
379 views

Small circles at mesh nodes

How to show the (16 X 4) mesh intersection points by a tiny red dots? ParametricPlot[v { Cos[u], Sin[u]}, {u, 0, 2 Pi},{v,1,3}, Mesh-> {15,3} ]
8
votes
2answers
630 views

Function Interpolation with Automatic / Algorithmic Values Mesh

I have an underlying function f(x,y,z) that is computationally intensive, but is smooth and continuous. I'm needing to find the function values along a line in xyz. Currently, I'm calculating f at ...
3
votes
2answers
425 views

Different MeshStyle for different functions

By using Plot command I want to get one curve in form if circles and other like a solid line. ...
1
vote
2answers
268 views

Time-dependent mesh deformation

I want to display the result of a deformation with a mesh, but I solved the deformation with a time dependency. So I have two functions: uxsol[t,x,y] and ...
10
votes
2answers
362 views

create an (almost) hexagonal mesh on an ellipsoid

EDIT I edited the question in order to take into @Kuba's comment. I want to create this figure with Mathematica (in particular an almost hexagonal mesh on an ellipsoid; thanks to @Kuba I know this ...
0
votes
0answers
27 views

How can I efficiently select certain mesh elements based on measurement criteria?

I am trying to do some mesh cleaning based on element size, but I'm having a hard time seeing how to best use the MeshRegion data structure to accomplish it without ...
0
votes
0answers
25 views

Ordering of MeshCoordinates in MeshRegion and associated BoundaryMeshRegion

When generating a MeshRegion from a BoundaryMeshRegion and vice versa it would be advantageous if the two types of objects were ...
2
votes
1answer
99 views
8
votes
1answer
149 views

ParametricPlot MeshStyle bug in v10?

Bug introduced in 10.0.1 or earlier and fixed in 10.0.2.0 Original Post The documentation gives the following code and says "Use a red mesh in the x direction and a blue mesh in the y direction:" ...
5
votes
3answers
153 views

Simple triangular meshes of primitive shapes

I'd like to generate triangular meshes or a cylinder and sphere primitives as part of a lattice meshing program I am writing to experiment with Mathematica. Consider the following snippet: ...
2
votes
3answers
876 views

How to generate 2D FEM mesh in Mathematica?

To generate 3D mesh TetGen can be easily used. Are there similar functions (or a way to use TetGen) to generate 2d mesh? I know that such functionality can be easily implemented but I would like to ...
20
votes
2answers
568 views

Convert binary voxel image to geometric region

I have a binary voxel image which described a contiguous region in space. Example: ...
30
votes
4answers
4k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
2
votes
1answer
52 views

Extract arguments from MeshRegion created by STL import

I've been trying to extract points and polygons from a MeshRegion expression created by importing an STL file. At first I thought I could use a simple ReplaceAll as shown below: ...
4
votes
1answer
161 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, ...
5
votes
3answers
142 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 ...
2
votes
2answers
65 views

mesh vertex coloring

So I created a mesh like this: mesh2 = ToElementMesh[FullRegion[2], {{1, 10}, {1, 10}}, MaxCellMeasure -> 1.]; and want to plot it, coloring the squares: ...
7
votes
2answers
141 views

How do I get ConvexHullMesh to return polygons instead of triangle as surface mesh?

I would need to identify the types of regular polygons forming the surface of a convex hull of 3D points. If I e.g. take the following example of a regular polyhedron ...
0
votes
1answer
85 views

How to add Polygons (using existing Lines and Points) to MeshRegion?

I have a MeshRegion N with Points and Lines, but without Polygons. That means that MeshCells[N, 2] returns ...
5
votes
1answer
54 views

Efficient way to get adjacency information from MeshRegion

What is the most efficient way to get adjacency information from a MeshRegion, i.e. some efficient representation of which vertex is connected to which other one? ...
3
votes
1answer
91 views

Repeated interpolation for 3D unstructured grid -> Optimization

Trying to perform mesh-to-mesh 3D interpolation on unstructured grid. Mesh size is about 200k nodes. Painful thing that interpolation shoud be repeated ~1000 times (different thermal map) on the same ...
2
votes
2answers
94 views
2
votes
0answers
72 views

ListPlot3D: generating mesh lines at hard-coded locations

I am plotting a surface specified with a set of {x,y,z} coordinates with ListPlot3D. This data set surface does not extend ...
0
votes
1answer
149 views

Improving NDSolve computation speed for 3D stationary PDE

Continuing my last question, I am trying to solve 3D Schrodinger equation (with mass equals to 1) and with no potential (I will add a potential later). The analytical solution for this equation is ...
0
votes
0answers
111 views

Convert 3D array to mesh for CAD/ABAQUS?

I am new to both finite element meshes and exporting to meshes, but I am struggling with the appropriate thing to do to convert my array of filled/empty nodes into a mesh for FEM. I created a ...
11
votes
2answers
159 views

Integration of a PDE solution over a custom-defined subdomain

Preamble: In my previous question I raised a problem of a custom-chosen integration of the solution of a PDE. In that case it was an integration along a line lying within the PDE domain. The solution ...
3
votes
1answer
116 views

Increasing NDSolve computation range for 3D stationary PDE

I am trying to solve 3D Schrodinger equation (with mass equals to 1) and with no potential (I will add a potential later). My goal is to set boundary conditions on the outer boundary of a sphere and ...
0
votes
0answers
95 views

How to get an element mesh from a region?

I've been exploring a new 3D solid commonly called the "Chestahedron" (7 faces of equal area). I wanted to find the centroid, so turned to Mathematica and found it!:) Other things of interest turned ...
7
votes
2answers
169 views

Poor/wrong sampling in 1D DiscretizeRegion of splines?

Bug introduced in 10.1 and persisting through 10.2 or later Context In relation to this question I have would like to use splines to define a ...
3
votes
3answers
89 views

List connectivity of points in discretized mesh

I'm trying to automate the extraction of the points and a compatible connectivity list for meshes created using the DiscretizeRegion or similar method. If I create ...
3
votes
2answers
242 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 ...
11
votes
1answer
240 views

How to specify PDE Boundary condition on Bspline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a ...
4
votes
1answer
97 views

DelaunayMesh in a specified closed region

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 ...
22
votes
2answers
900 views

How can the {x,y,z} points that fall on the outer boundary of a set of values be selected and smoothly surfaced?

For a given set of x,y,z values, that may, or may not form a uniform shape, how can the center of the data cloud be found, and the surface points be located and a solid smooth surface created from ...
6
votes
0answers
103 views

Possible Bug with Options in DelaunayMesh

Update: It turns out after some testing, none of the Options work in DelaunayMesh when 3D point sets are involved. Original ...
3
votes
1answer
151 views

Surface Area of a Region inside a Region

I need to find the surface area of a region which is within another region. The regions I'm working with are fairly complex and so I'm looking for a general solution, but I'll use a cylinder and ...
0
votes
1answer
85 views

Boundary discretize region of ellipsoid returns a three dimensional region

I need to integrate a rather complicated function on an ellipsoidal surface, specifically a prolate spheroid surface. Im using the mathematica 10 feature of discretize the regions in mesh and pass ...
8
votes
2answers
158 views

Mesh Problems with MatrixPlot

I've come across some weird behavior in 10.1 when trying to use Mesh with MatrixPlot. In the example below, when specifying Mesh, I only get one line along the X axis at 100 instead of lines at {100, ...
2
votes
2answers
168 views

Extracting points from the MeshFunctions of Plot3D

I am trying to extract the points from the mesh lines of a 3D plot. (Not my actual function.) ...