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
3
votes
1answer
60 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 ...
1
vote
0answers
21 views

Holding and dragging mouse to select multiple buttons/cells

Is it possible to create a TogglerBar-type object in which several buttons can be selected/deselected simply by holding the mouse's left-click button and dragging ...
2
votes
1answer
81 views

Selecting Edges and Corners in a Mesh

Consider the following VoronoiMesh obtained after a few iterations of Lloyd's relaxation algorithm ...
1
vote
0answers
45 views

Converting .stl files to meshes for FEA

I'm trying to conduct finite element analysis on imported .stl models from SketchUp. I can't seem to generate an ElementMesh. I think it may be something to do with intersecting boundaries, and this ...
15
votes
3answers
576 views

VoronoiMesh as a TogglerBar

Is it possible to use a VoronoiMesh to define a TogglerBar or SetterBar type ...
10
votes
3answers
688 views

Creating a Hexagonal Lattice with VoronoiMesh

I want to create a hexagonal lattice using VoronoiMesh. One can achieve that with the following code, where L=5, ...
0
votes
0answers
38 views

How to perform adaptive mesh refinement on a 3D element consisting of 4 superimposed meshes on AceFem?

I'm trying to perform adaptive mesh refinement on a body that is composed of 4 separate meshes joined together. The body is composed of the following individual meshes: ...
5
votes
1answer
69 views

Is this a bug of BoundingRegion?

...
4
votes
1answer
60 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 ...
2
votes
1answer
61 views

Colouring cells in a Voronoi mesh [closed]

Consider the following code ...
11
votes
3answers
200 views

Inaccurate result from ImplicitRegion

I'm trying to describe the intersection of two cylinders by an ImplicitRegion (in order to use it in NDSolve later). ...
7
votes
2answers
111 views

Using mesh cell highlighting to override the default rendering of a region

The default rendering of a region can be rather uninformative. Consider this simple example. DiscretizeRegion[Rectangle[{0, 0}, {2, 1}], MaxCellMeasure -> 2] ...
5
votes
1answer
142 views

Area of an Annulus (MeshTools<>NIntegrate)

In a very simple example I try to describe an annulus using MeshTools package mesh2D = AnnulusMesh[{0, 0}, { 1 , 2 }, {-Pi, Pi}, {36, 10}]; The area given ...
10
votes
2answers
311 views

Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
10
votes
5answers
520 views

Grainy 2D RegionIntersection Plot: How can I make it smoother?

I have the following code to display three coloured disks and their coloured intersections. However, the result does not appear to have been anti-aliased enough. How can I make it smoother? ...
2
votes
2answers
59 views

Select Part of a boundary mesh

I would like to pick a part of a boundary mesh, for example bm=BoundaryMesh[Cuboid[]] Is it possible to select the part(side) ...
0
votes
1answer
63 views

How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
8
votes
2answers
142 views

How to mesh a region with inclusions touching the boundary

Suppose you have a region composed of two materials. You define the inclusions of material 1 through, e.g., disks, ellipsoids, ...
4
votes
1answer
107 views

Adaptive Meshrefinement NDSolve&FiniteElements

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...
2
votes
1answer
30 views

Draw Lines on 3D Plot at certain coordinate

Following this example, I though it would be as easy as this: ...
0
votes
1answer
82 views

Nonatomic expression expected at position 1 in First[None]

This is a follow-up question to an earlier question:Solving a system of PDEs on a piecewise polynomial domain. I tried to solve the system of equations from one of my previous post with the different ...
6
votes
3answers
461 views

Compare FEM mesh with the mesh created within Mathematica

This is a follow-up question to an earlier question: Make uniform mesh with quad elements Question: How to solve system of equations with NDsolve on the mesh created in Ansys in order to compare it ...
15
votes
3answers
285 views

Computing the surface area and volume of molecules

Here is a somewhat difficult problem I've had for a long while. Space-filling models of molecules can be easily generated by ChemicalData[], ...
0
votes
1answer
63 views

BoundaryDiscretizeRegion Plots does not work with ParametricPlot3D

I am trying wit this data ...
3
votes
3answers
377 views

Nearly equally spaced 3D-mesh

How to mesh a volume (3D region) with nearly equaly spaced vertices? Example: Disk with radius 50 and height 15 ...
3
votes
1answer
83 views

Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
1
vote
1answer
56 views

Blunt edges of an octahedron by Region

Why does the octahedron constructed by the following code have blunt edges ? Region[ImplicitRegion[Abs[x] + Abs[y] + Abs[z] <= 1, {x, y, z}]] How to improve it?...
2
votes
2answers
139 views

How to extrude a planar mesh to a volume slice?

Is there an easy way to extrude a planar 2D-mesh to a volume slice? ring = RegionDifference[Disk[{0, 0}, 1], Disk[{0, 0}, 1/2]]; DiscretizeRegion[ring] The ...
3
votes
1answer
95 views

Mesh a hollow cylinder

Questions seems to be simple answerde, but in Mathemtica v11.0.1 I didn't find a solution ...
4
votes
1answer
100 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 ...
3
votes
1answer
79 views

RegionUnion works but RegionIntersection does not

I am trying to create an Alberti's window figure as described in this question, in which a (three-dimensional) polyhedron (e.g., dodecahedron) is projected onto a (two-dimensional) plane. I realized ...
2
votes
1answer
65 views

Unwanted mesh line in spherical plot

I am trying to create a spherical colour plot on which the mesh will rotate with manipulating the \phi1 variable. I read this solution and gave it a try with the following code: ...
1
vote
0answers
42 views

Combining MeshRegions of generated 3D shapes and RandomPolygons

I am interested in generating 3D a joint BoundaryMeshRegion or a MeshRegion from different shapes and polygons. This works for <...
8
votes
2answers
228 views

Make uniform mesh with quad elements

I have the following code that generates a finite element mesh with triangular elements which by using command ToQuadMesh I convert to the quadrilateral elements, but I am not able to make the uniform ...
1
vote
2answers
94 views

How to sample numerically a function using a mesh-grid function in 3D?

I am working on a problem where I want to sample a scalar function f[x,y,z]. The problem is how to obtain a mesh-grid in 3D (A grid of points in x,y, and z). In order to study this function. Of ...
1
vote
0answers
106 views

Calculate the intersection points of a line and a parametrically defined 3D surface

Thanks to Henrik Schumacher for advice to simplify the sample code: I would be grateful for any pointers on the following issue. A line from an external point intersects the surface at 2 points (...
1
vote
1answer
111 views

How to solve wave equation with finite elements when material properties vary continuously over a region

I am solving the one-dimensional wave equation over regions where the bulk modulus (and thus the wave speed) vary continuously over a region. The current version seems to assume that the material ...
6
votes
2answers
95 views

How to refine a linear FEM mesh in three regions?

I am trying to solve the one-dimensional wave equation with a frequency dependent source function over three intervals with varying velocity. I need to refine the mesh over the low velocity regions ...
5
votes
2answers
143 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 ...
1
vote
0answers
47 views

Non-convex hull mesh from 3d points [duplicate]

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
68 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
138 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
118 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
202 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,...
2
votes
1answer
80 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 ...
4
votes
1answer
45 views

Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ...
6
votes
1answer
158 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 ...
1
vote
1answer
74 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, ...
4
votes
1answer
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 [...
0
votes
0answers
82 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.