17 votes
Accepted

What is a "hanging node" in the finite element meshing?

The following picture illustrates a mesh with a hanging node and a mesh containing no hanging node: Usually with a finite element mesh the vertices are shared with their other neighbouring elements, ...
user avatar
  • 1,859
10 votes
Accepted

Need a simple mesh format (for FEA) and a tool to generate the mesh

I would recommend gmsh. I have just started working with this program actually only a few days ago. But it is straight-forward to use. You can create various 2D and even 3D-geometries and it offers a ...
user avatar
  • 350
9 votes
Accepted

Library for generating Discontinuous Galerkin FEM mesh

You are confused about different concepts. A mesh is really just a collection of cells defined by the vertices of the mesh and which vertices together form each cell. Consequently, a mesh is an ...
user avatar
9 votes
Accepted

Algorithm to find boundary faces of mesh

First, create a list of faces in the mesh. From there you should be able to create a map from faces to tets, as each face must belong to either one or two tets. The faces that belong to only one tet ...
user avatar
8 votes
Accepted

Unstructured mesh vs hybrid structured/unstructured for numerical simulations

In my opinion, it is not a good neither a bad mesh. It clearly depends on the PDE you are considering. The finite space to which the PDE is projected is your mesh, where your operators, e.g. $\vec{\...
user avatar
  • 1,606
8 votes

Why FVM can handle unstructured meshes while FDM cannot?

The difference between finite volumes and finite differences is really more about the form of the equations solved. In typical FV methods, the conservative form is ...
user avatar
7 votes
Accepted

3D contour mesh computation

I think you could use the "marching cubes" algorithm. If memory serves, it requires a grid of samples as input, so at the very least you should be able to sample your function and run the algorithm as-...
user avatar
  • 4,316
7 votes
Accepted

Is there any open-source code for a hybrid 2D mesh (triangles and quadrilaterals)?

You can use Gmsh for this purpose. I show an example below. ...
user avatar
  • 8,101
5 votes
Accepted

Relationship between number of nodes, elements and sides in a triangular 2D mesh

Yes there is a relationship, the Euler characteristic: For a 2-dimensional orientable manifold with boundaries embedded in $\mathbb{R}^3$, the Euler characteristic is $\chi = V - E + F = 2 - 2g - b$ ...
user avatar
  • 166
5 votes
Accepted

Commonly-used metrics to quantify the irregularity of a triangular mesh

As @Nicoguaro and @Paul have said in the comments to the question post, there are a great many ways to do this kind of thing, and I'm not sure if there is a single "best" approach. From a review ...
user avatar
5 votes
Accepted

Resources on mesh generation for finite element methods

Starting a community answer, in line with your model question Mesh Generation Mesh Generation: Application to Finite Elements (P.-L. George and P. Frey) Hermes, Lyon, 2000. A clear primer on the core ...
5 votes
Accepted

Creating a proper quad-mesh in GMSH for an "I"-shaped geometry

So, by default and without recombination to quads (comment out Recombine Surface {1}), GMSH creates a mesh like the one in the left part of the picture. And by ...
user avatar
  • 8,452
5 votes

3D contour mesh computation

In addition to the voxel-based approach that rchilton suggests, you could also look at Delaunay-type algorithms. For example, the Computational Geometry Algorithms Library (CGAL) has some built-in ...
user avatar
5 votes

Minimum number of elements (mesh size) for electromagnetic simulation

The Maxwell system is a wave equation at heart, so your ansatz (the space where you seek solutions, the combination of your mesh and basis functions) must be able to faithfully represent waves. The ...
user avatar
  • 4,316
4 votes
Accepted

How to calculate efficiently mesh edges midpoints?

If you have an array that stores the indices of the 3 neighbors of each cell, then you would only compute the midpoint of an edge of the neighbor cell has a higher index than the current cell, or if ...
user avatar
4 votes

Triangular mesh of a 3D surface

I'll expand my comment to an answer. Since your surface is fairly smooth, rather than generating a surface mesh, you can generate a 2D mesh of just the $(x, y)$-points that have been sampled, and then ...
user avatar
4 votes
Accepted

Meshing options to generate number of the sides of and element (tetgen-triangle)

I have implemented a method that works pretty well for reconstructing edge information in surfacic meshes (or facet information in volumetric meshes), but I am working in C++. I'll try to explain that ...
user avatar
  • 2,205
4 votes
Accepted

Using Gmsh to create a mesh with zero thickness (quad) interface elements

One way to do it might be to create an internal Line Loop in the input file where the crack originates. To do this, you would create 2 points at each end of the crack in your .geo file (say, points 1,...
user avatar
  • 1,522
4 votes

Need a simple mesh format (for FEA) and a tool to generate the mesh

If you have access to MATLAB, you might consider using PDE Toolbox to generate your geometry and mesh: http://www.mathworks.com/help/pde/index.html It is very easy to generate simple geometries like ...
user avatar
  • 5,744
4 votes

Mesh generator that can do 2D & 3D elements combined?

If I understand what you're saying, you have something like a sandwich of epoxy layers that have appreciable thickness (modeled in 3D) and a thin copper layer between them that has negligible ...
user avatar
4 votes

Which type of meshing is more suited for simulation of electromagnetic metamaterial unit cells?

As for any other domain, your mesh needs to be fine enough to resolve the features you have. This means that the mesh has to be finer than the geometric details of your unit cell, and it needs to be ...
user avatar
4 votes

How do you mesh and re-mesh a surface (2-manifold) in 4D?

You can use a 2D anisotropic mesh generator (see e.g. H. Borouchaki, George, P. L. , F. Hecht , P. Laug and E. Saltel, Delaunay mesh generation governed by metric specifications. Part 1: Algorithms, ...
user avatar
  • 2,205
4 votes
Accepted

Combined translational and rotational meshing in gmsh

I cannot visualize your geometry properly using Gmsh, or export it. I generated something similar using FreeCAD. Maybe you can modify this script for your purposes. ...
user avatar
  • 8,101
4 votes
Accepted

From edge-vertex connectivty to face-vertex connectivity?

As noted in the comments, your problem doesn't seem quite solvable as stated. However, if you include the assumption that each node has a 2D coordinate associated with it, then it is solvable. With ...
user avatar
  • 1,522
4 votes

Commonly-used metrics to quantify the irregularity of a triangular mesh

I do not think that there exists an answer to this question in general, because it all depends on the intended use for the mesh. For instance, if you are doing computational fluid dynamics, you may ...
user avatar
  • 2,205
4 votes
Accepted

Determinant of jacobian matrix

The determinant of the Jacobian, as a determinant changes its sign when odd permutations of columns (or rows) are applied. Imagine, for simplicity a two dimensional case in which the reference ...
user avatar
  • 1,606
4 votes

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

To create a coarser mesh, you can set the characteristic length globally to a larger value, e.g., ...
user avatar
4 votes
Accepted

Definition of Lagrange nodes in Gmsh

I think you've got slightly the wrong end of the stick from the documentation. As with a lot of other software in the area, GMSH started out with low order, hard coded numberings. These are the ones ...
user avatar
  • 2,199
4 votes
Accepted

Is there any fundamental difference between meshing for FEM, FVM and FDM?

You are correct that FDM requires structured meshes, so you are restricted to those. On the other hand FEM and FVM can both do structured meshes as well as unstructured meshes depending on the ...
user avatar
  • 499
4 votes
Accepted

How to find out the difference between a structured and unstructured mesh using the file containing the mesh information?

There are two different types of meshes that are commonly termed "structured": the points are placed on an equispaced grid; and the elements have the same connectivity. Some people might call any ...
user avatar
  • 8,101

Only top scored, non community-wiki answers of a minimum length are eligible