# Questions tagged [mesh]

The tag has no usage guidance.

128 questions
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

### Centered finite volume scheme for an advective term on an unstructured/irregular/non-uniform grid

Consider the continuity equation $$\frac{\partial u}{\partial t} + \frac{\partial \Phi}{\partial x} = 0$$ $$\Phi = au + b\frac{\partial u}{\partial x}$$ Suppose I want to solve the above using ...
1 vote
0 answers
35 views

### From 3D to 2D with a STL file

I would like to do a 2D projection from a 3D geometry saved in a stl file and know the distance between the two projected planes. In order to explain better the concept I will start with an almost ...
• 89
0 votes
0 answers
23 views

### Getting gradient from voxel, is it possible and how?

The R package rmarchingcubes implements a marching cubes algorithm. Given a voxel contructed from a function defining an isosurface, it returns a 3d mesh with some vertex normals. When I plot this ...
-1 votes
1 answer
76 views

### Billiard reflection inside a triangular mesh

I am currently interested in billiards and their trajectories. I would like to simulate a billiard inside a water-tight mesh. A mesh basically consists of a list of points in 3D space (vectors with 3 ...
• 101
0 votes
0 answers
28 views

### Compute harmonic (isothermal) coordinates u-v from harmonic function field

I am trying to implement a harmonic map from a surface with a boundary to a unit circle in python. I found this algorithm by Xianfeng Gu, which is almost straight forward: harmonic mapper algorithm ...
2 votes
0 answers
42 views

### structured quad mesh with transition zone

I wonder which software can be used to generate the mesh like below. Anybody has an idea?
• 169
1 vote
2 answers
156 views

### Find intersections between mesh and curve inside it

I have a simple square mesh, and a curve (discretised by another mesh) inside it. Here a picture worths thousand words. What I want to achieve is to find, for every cell $K$ of the circular (...
• 281
0 votes
1 answer
32 views

### Packages can help to refine parallel mesh and optimize parallel mesh

I have a parallel code. The code is implemented using MPI. I want to find a package that can help to implement global mesh refine and optimize meshes (avoid very thin element). The mesh in my work is ...
• 323
2 votes
2 answers
45 views

### How does RFEM give non-linear results with a two-node mesh?

I did this simple analysis on RFEM, of a rigid-supported beam loaded with a point moment. Before analysis, I didn't assign any kind of mesh manually. When I turn on the FE Mesh visible on Project ...
• 123
2 votes
2 answers
134 views

### How to efficiently get mesh cell/face connectivity?

If I have 3 lists: points, faces and cells that represents a mesh, where: points is a list of x,y,z coordinates, for example ...
• 284
1 vote
0 answers
57 views

### How to determine the orientation of convex/concave hexahedra?

I am writing a code that checks the orientation of a list of vertices (along with face connectivity) describing both convex and concave hexahedra. The face connectivity table stores the list of vertex ...
• 213
3 votes
2 answers
399 views

### Is mesh orthogonality important for FEM?

While studying mesh quality metrics in literature and software documentation, I've seen discussions about mesh orthogonality in Finite Volume Method (FVM) contexts, but not for Finite Element Method (...
• 141
1 vote
1 answer
110 views

### Renumbering the nodes for quadratic basis functions for a 2D domain

I have a simple triangulation for a 2D domain, described by the connectivity matrix $T$ and by the point matrix $P$. For didactic purposes, I assembled the stiffness matrix for $-\Delta u = f$ by ...
• 281
0 votes
1 answer
146 views

### Visualize a mesh from list of 3D point and faces

I have a list of vertices and faces. Now, I want to create a mesh using the given points and faces list and visualize it. Also, I want to play with the mesh by adding an extra point on the faces. Can ...
• 111
5 votes
1 answer
205 views

### Solving PDEs in parallel

I have read different approaches on how to solve pdes in parallel which are discretized using finite element method. For example: Non-overlapping domain decomposition approach as mentioned in https://...
• 471
1 vote
0 answers
349 views

### Open-source Hexahedral meshing tools

I'm looking for an open-source automatic meshing tool or library able to generate full or dominant hexahedral mesh starting from a provided arbitrary model i.e. a surface triangular mesh stored in STL ...
• 11
2 votes
2 answers
119 views

### Software to build a mesh of a surface from points on the surface

I have a set of points $(x_i,y_i,u(x_i,y_i))\in\mathbb{R}^3$, $i=1,\dots N$, over a surface $S$ (from experimental data). I need to calculate the integral of a function $F$ over that surface. If the ...
• 503
4 votes
2 answers
377 views

### Meshing surface of a sphere with a subdomain

I am trying to build a triangle mesh of the surface of a sphere which also includes a subdomain defined by a 'polygon'. Here is a successful example (subdomain defined by the red dots): Note that the ...
2 votes
2 answers
77 views

### How to refine the tetrahedron if exist two longest length edge?

In some algorithms to refine tetrahedron, we need to calculate the longest edge. background If exist a tetrahedron with node ABCD, it has edges ...
• 323
1 vote
1 answer
224 views

### How to compute gradient of a cell having a boundary face?

In many situations in unstructured mesh solvers, one needs to compute gradient of arbitrary variable $\phi$ such as temperature or velocity at face centers (one of such situations is correction for ...
• 284
2 votes
1 answer
162 views

### Going From Blender Structure defined by triangles to full 3D mesh (Using GMSH?)

I currently have created a model airplane in Blender by drawing a closed volume with triangular planes. I want to do a FEM calculation on this object, meaning I need a fine 3D tetrahedral mesh of this ...
2 votes
1 answer
856 views

### How to calculate skewness for a mesh?

I am writing a code to calculate mesh quality stats such as: cell volume, face areas and non-orthogonality between faces (basically something like OpenFOAM's ...
• 284
2 votes
2 answers
308 views

### What are the best ways to interpolate a vector field inside (convex) polygons?

I want to interpolate a vector field inside convex polygons in a polygonal mesh. For triangular meshes the scheme uses a piecewise constant interpolation in the triangle, discretized at the center of ...
• 587
0 votes
0 answers
68 views

### FEM Meshing artifact at nodes with fewer neighbors

I wrote a 2D-FEM solver to solve some diffusion process and wanted to verify my code with a test problem. The input was $f(x,y) = x^2+y^2$ and I applied the stiffness matrix on it to get $\Delta f = 4$...
3 votes
1 answer
156 views

### FEM with elastic inhomogeneous properties leads to mesh-induced anisotropy

I'm solving an elastic homogenization problem and I'm having problems with mesh artifacts. I would like to first give a brief summary of what I do: I have a system with inhomogeneous (but isotropic) ...
• 131
2 votes
2 answers
428 views

### Visualization of Quad/Octree data Structures

I have a simple C++ quadtree implementation. The implementation subdivides node into four children as if there is more than one point in that particular node. At the moment I want to visualize how ...
0 votes
0 answers
19 views

### Volumetric Mesh Cutting Algorithms For Simulating Sculpture

I am interested in whether there an available algorithms to give me insights on how to cut a volumetric mesh?
• 109
1 vote
0 answers
84 views

### Finding isocontour lines, populating points on said lines (in MATLAB)

I'm trying to extract data from a potential field. I have an example code of a potential field, using meshgrid in MATLAB. I've pasted the code below. What I'd like to do next is 'convert' this field ...
2 votes
1 answer
92 views

### Mesh partition quality

I am working on static FE mesh partitioning and in order to achieve a good quality partitioning I want to know how to drecrease interprocessor communication by increasing the connectivity of elements ...
• 471
0 votes
1 answer
71 views

### Parallel mesh partitioning

When a mesh partitioning takes place and every process works on a part of the mesh is any way to rename the global numbering of nodes(on each process) into a local numbering?Is there any software that ...
• 471
1 vote
0 answers
181 views

### Compute mass matrix in vibrations problem by using finite element method

I have to compute the mass matrix of a Hexahedral mesh. There are 3 methods to compute mass matrix. I'm interested in one method which consists of dividing the mass of the element by the number of ...
• 21
2 votes
2 answers
1k views

• 129
1 vote
1 answer
70 views

### stretch elliptic mesh to fit a circle

I've generated a 2D O-mesh around an airfoil. Unfortunately, the mesh O shape is not a perfect circle as you can see in the figure below (in the figure I plotted only the mesh nodes in blue). The red ...
• 144
0 votes
0 answers
56 views

### Determining the indices of a VTK mesh

I am trying to assign fixed constraint at specific indices of VTK mesh, however, I only can view STL file in a blender as follows: Upon assigning the favored indices in my scene at the SOFA physics ...
• 109
3 votes
2 answers
172 views

### Find shortest path around a cylinder represented by 3d triangular mesh

Suppose I have a 3d triangular mesh with the topology of a finite cylinder. Let $C$ be a vertex on that mesh. How can I find the shortest path from $C$ to itself that goes around the cylinder? By ...
• 243
3 votes
0 answers
184 views

### Is it possible to retain sets (physical tags) after remeshing the model in Gmsh?

I am currently working on a remeshing algorithm for Abaqus using Gmsh as part of my Bachelors thesis and I seem to be stuck at some point. I am able to remesh .geo and .msh files using the script ...
2 votes
1 answer
268 views

### Sorting Triangle vertices based on indices for alpha blending (back to front) C++, OpenGL

I have implemented in OpenGL alpha blending for a triangle mesh. I render this mesh using a vector of indices that indicate which vertex from a vertices vector should be drawn. The problem is to ...
0 votes
0 answers
121 views

### How to read data from simply formatted text file (c++)?

Mesh information like points, faces and cells is to be stored into separate files: e.g. for points file: # points data: x y z N_Points 100 x1 y1 z1 x2 y2 z2 ... cell file: # cells data: ...
• 223
0 votes
0 answers
73 views

### Stokes Equation fails to converge for an ellipse

This might be because of the mesh, but the following code blows up for all values of b not 1. Does anybody have any experience working with the ellipse mesh in Fenics? ...
5 votes
2 answers
8k views

### Creating 3D Mesh from stl files with gmsh

After long hours of searching for an answer I thought it might be better to ask the community. The problem I have is that I need to convert STL files to mesh files. I know that I therefore need to ...
• 71
3 votes
1 answer
77 views

### Smoothness regularisation of a 2D field on a triangular mesh?

I'm working on an inverse problem where the solution is the values of a 2D scalar field at the vertices of a 2D triangular mesh, such that the field can be defined continuously inside the mesh via ...
• 331
0 votes
1 answer
406 views

### Node re-numbering in 1D mesh GMSH

I'm working with Gmsh to generate 1D meshes of polygon edges. I have noticed that drawing a polygon by "vertices and lines" the program always assigns to the first N nodes of the mesh the coordinates ...
• 129
1 vote
1 answer
2k views

### How can I coarsen a mesh in Gmsh when 'Mesh options' include 'Refine by splitting' but nothing about coarsening?

I am new to Gmsh and I am having trouble creating a circle with a coarse mesh. I use Geometry->Elementary entities->Add->Circle to create the geometry ...
• 111
1 vote
1 answer
211 views

### Node renumbering in a 2D mesh

I have a 2D domain which is discretized using Q4 elements. I have the nodal positions and the element connectivity matrix. I would now like to renumber the nodes in such a way that all the interior ...
4 votes
0 answers
938 views

### Gmsh for 3D volume with inclusions [closed]

In an attempt to create three-dimensional volumes with inclusions in Gmsh I stumble upon a problem which was non-existent in the two-dimensional case. I'm using the OpenCASCADE geometry kernel ...
• 83