Questions tagged [mesh]

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

Filter by
Sorted by
Tagged with
4
votes
2answers
91 views

Automatic solution to label boundary elements with BoundaryMarkerFunction

Preparations Mathematica 11.3, Windows. Let us say I have a rectangular region with 10 little holes inside. Their coordinates are given by positionList. The ...
21
votes
1answer
597 views

Mismatch between Mathematica and COMSOL in 3D FEM problem

I would like to solve an advection-diffusion problem on a torus domain. There are three Dirichlet conditions: One at the inlet (concentration $c=0$), one at the outlet ($c=0.5$) and one at the wall ($...
50
votes
2answers
1k views

A geometric multigrid solver for Mathematica?

Cross posted to community.wolfram.com Mathematica ships a variety of linear solvers through the interface LinearSolve[A, b, Method -> method] the most ...
1
vote
1answer
44 views

Non-convex hull mesh from 3d points

I am trying to create a 3d mesh object from list of points, but the only options I see in Mathematica are ConvexHullMesh and ...
3
votes
1answer
59 views

Signed cell adjacency matrices (boundary operators)

In How to obtain the cell-adjacency graph of a mesh? there are some great answers that show how to obtain the cell adjacency matrix of a mesh. How would one generalize these to incorporate the ...
5
votes
2answers
127 views

Adjacent faces in a discrete mesh

I have a MeshRegion R and I want to extract all pairs of adjacent faces efficiently. The way that I've been computing this is demonstrated below: ...
3
votes
3answers
100 views

RegionMember does not work with RandomPolyhedron or Polyhedron object

According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function ...
6
votes
2answers
186 views

Extracting points from 3D plot that lie along an arbitrarily oriented line

Starting from i.e. the following 3d plot: d = RandomReal[1, {100, 3}]; ListPlot3D[d] Is it possible to extract points that lay along an arbitrarily oriented line,...
1
vote
1answer
68 views

Set maximum space between elements in 3D mesh

A region in 3D space has been discretized to obtain a list of points. The resulting ListPointPlot3D plot is: I will like to obtain a mesh from these points, but ...
7
votes
3answers
224 views

Visualising Finite Element Mesh in 3D with MeshRefinementFunction

How do you check that a MeshRefinementFunction is doing what you want in a 3D mesh where you only see the boundary mesh? I started by making a block with a hole as ...
9
votes
3answers
330 views

3D internal subregion

I'm trying to follow the documentation for Element Mesh Generation, but somehow I cannot understand it correctly. Here is a simplified version of my real problem. I'm trying to simulate the ...
12
votes
3answers
221 views

Trouble meshing a Corbino disc

I am trying to simulate current flow using FEM through this particular device (a Corbino disk) and I have difficulties generating the mesh for it. Here is the region: ...
29
votes
7answers
2k views

How to generate a mesh with quadrilateral elements?

I have the following code that generates a finite element mesh: ...
4
votes
1answer
39 views

Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ...
1
vote
1answer
58 views

Mesh quality error with interpolation of table

I am trying to interpolate a table of the following form. {{x1,y1,z1},{x2,y2,z2}...} Where z depends on x and y, and x ranges from 0.01 to 1 in steps of 0.01, ...
6
votes
1answer
141 views

Given a cell in a Voronoi diagram, which point did it come from? [duplicate]

Given a set of points pts = Table[{RandomReal[], RandomReal[]}, {i, 1, 10}]; and their Voronoi diagram ...
4
votes
1answer
67 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 [...
0
votes
0answers
76 views

Create a tube from a section of a sphere using mesh

How does one make a meshed tube starting from a section of a sphere and later edit the tube's section parametrically.
4
votes
1answer
65 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 ...
5
votes
1answer
126 views

Analyzing MethodOfLines

In this example the wave equation ...
1
vote
1answer
61 views

Mesh mixes up markers in multiple curves

Following is my code: ...
1
vote
3answers
245 views

Creating a MeshRegion object from a Graphics object

I am looking to convert a simple Graphics object that is defined by overlapping polygons into a MeshRegion object. For example, here is code that will create three overlapping triangles ...
8
votes
3answers
336 views

How to find ids in a curved line in a finite element mesh?

Previous discussion about this problem has already occurred in this link: How to get the node id in a specific coordinate in a finite element mesh? I have the following code that generates a finite ...
8
votes
3answers
317 views

How do I convert a mesh region back into a Graphics3D primitive?

The Graphics3D format has more styling options than mesh based graphics, so I was wondering if there was a way to convert mesh based objects such as region intersections and unions back into the ...
5
votes
1answer
47 views

RandomPoint returns compiler errors on RegionIntersection of two Meshs?

Consider the intersection of two ConvexHullMesh's, m1 and m2. ...
4
votes
1answer
55 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 ...
4
votes
1answer
84 views

How to draw individual mesh lines in ArrayPlot

Consider the following ArrayPlot. ...
3
votes
1answer
66 views

Creating a mesh from a very thin layer

I have the following code which works just fine: ...
5
votes
2answers
115 views

Holes in ElementMesh with ToElementMesh of ImplicitRegion

I am trying to plot a function in a region below a level curve of the function and within a cell. I have been doing this by calculating an ElementMesh using ...
9
votes
2answers
291 views

Catmull-Clark and Doo-Sabin Subdivision Implementations

I want to work on subdivision surfaces. Unfortunately, I don’t have any source code to start with. I need some Mathematica codes for applying Catmull-Clark and Doo-Sabin methods. I would like to ...
2
votes
1answer
85 views

Meshing control of NDEigensystem

I have to solve an Eigenvalue problem originating from the Electrodynamics. It is a 2-D problem with a rectangular region. More specifically, there is a hole on a rectangle made by magnetic material. ...
1
vote
1answer
77 views

How to create surface mesh from a given 2D mesh toplogy?

I would like to convert a very easy(examplary) mesh(2D) ...
4
votes
4answers
158 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 ...
3
votes
1answer
41 views

Is there a way to automatically use triangular elements in ToElementMesh [closed]

I have some simple code to generate a mesh over a rectangle. ...
1
vote
1answer
80 views

Converting .STL from Shell to Solid for stress analysis of wing

I'm new to Mathematica as this is the first class I've had to used it in my undergrad time as an aerospace engineer. Anyway, I have run into a problem that I can't figure out. I have created .STL's of ...
2
votes
1answer
115 views

Finding the tangents of the function in each mesh

I have a 2D graphic which contains a table of curves within a circular region. ...
5
votes
1answer
57 views

Mesh cell count for Voronoi mesh too low

I was trying to solve this question out of interest and thought perhaps creating a Voronoi mesh, cropping it to a circle, and colouring the mesh cells might work. However, if I ask ...
1
vote
1answer
39 views

Uneven distribution of nodes by ToElementMesh[]

We are using FEM package to generate mesh in a circular sector. Somehow mesh becomes dense in upper right corner. Is there any way to circumvent this uneven distribution? ...
2
votes
1answer
77 views

Colorize mesh according to the nodepoint colors

Given a set p of points (2D), each with a unique color c, I can mesh these points easily ...
19
votes
2answers
592 views

Smoothing 3D contours as post processing

Context Following this question (and great answer!), It would be nice to have a function which also smooths 3D contours plots once they have been done. There are various solutions which involve ...
37
votes
4answers
6k 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 ...
6
votes
3answers
343 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 ...
4
votes
1answer
72 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: ...
10
votes
2answers
137 views

ToElementMesh of Region with Hole

When I try to mesh the following region it fails. Why? Is there a workaround? ...
13
votes
2answers
573 views

Meshing the cow

As a simple example for applying stl-files I took "cow" out of MMA example data. I'm able to discretize the Graphic without problems ...
1
vote
2answers
87 views

Trouble with Calculating Area of Parametric Region

This question stems from an attempt to solve the following question: How to calculate specific area on surface of sphere? First, I parametrize a circular loop: ...
3
votes
1answer
186 views

Point relaxation inside of Chromaticity Plot 3D

I'm trying out the new ChromaticityPlot3D function in Mathematica and noticed I can extract the mesh of the output graph using ...
5
votes
3answers
252 views

How to create “Volumemesh” from closed “surfacemesh”?

Given a surface region (MesgRegion netz2D), for example ...
3
votes
2answers
92 views

Making NDSolve choosing by itself a spatial meshing leading to correct integrated results

In a previous post, I was asking how to force a fine spatial meshing in NDSolve using the FiniteElement method. The solution was ...
3
votes
1answer
431 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 ...