Share Your Experience: Take the 2024 Developer Survey

# Tag Info

### 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 ...
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 ...
• 55.7k
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 ...
Accepted

• 166

### 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 ...
• 10.3k

### 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 ...
• 4,896
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. ...
• 8,515
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 ...
• 1,512
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 ...
• 1,648

### 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., ...
• 558
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 ...
• 2,249

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

I am not entirely sure what is going wrong in your version of the command-line approach. However, I think it works on my test STL file (with gmsh 4.0.7) with the following line: ...
• 8,672
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 ...
• 489
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 ...
• 8,515
Accepted

### Flux sign and face normal confusion in finite volume method

When dealing with conservation laws like your case, you can often make use of the divergence theorem (as you did). You can then express the fact that the total mass within your integration region is ...
• 2,935
Accepted

### For traditional FEM and FVM, why can't we use mesh to represent geometry and use the mesh which represent the geometry to do the computation directly?

The underlying problem is that the mesh really isn't the geometry. You want to simulate a bridge? It has a certain geometry, which you can approximate using a mesh, but the mesh is not the exact ...
• 55.7k

### Convolute a gaussian kernel with a large array of off-grid centroids without looping? (how to make "A Thousand (Gaussian) Points of Light" )

If you simply want to compute the convolution you can construct a Kernel matrix for computation with arbitrary arrangements of Gaussians that do not lie on grid points of the domain where you want to ...
• 725
Accepted

### Connectivity of octree as grid

The one paper you need to know is the one by Burstedde and collaborators on the implementation of the p4est library: p4est: SCALABLE ALGORITHMS FOR PARALLEL ADAPTIVE MESH REFINEMENT ON FORESTS OF ...
• 55.7k

### Interpolation of 1D solution from an original grid to a new grid

A "better technique" is rather subjective. You mean faster, more accurate, easier to program, something else?? Since it's only 1-D, the numerical cost is small (compared to 2D/3D) and there ...
• 206

### Choice of grid generation for FDM discretisation methods

Your question mentions both space and time discretization and the problems that can arise due to different choices of one or the other. I think that you might be conflating problems that come from the ...
• 10.3k