# Tag Info

8

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 discretised in terms of integrals and fluxes, whereas FD methods generally approximate derivatives in the non-conservative form directly. Maintaining conservation and preserving physical ...

7

The idea of "ordering the nodes" in a finite element mesh to improve the computational time of the sparse solver originated in the large structural analysis FE codes of the 70's. Those codes typically used banded or variable-band storage schemes for the sparse matrices so reducing the bandwidth was the main criterion. That is the origin of the old Cuthill-...

7

Gmsh (http://geuz.org/gmsh/) will do it for you. Simply create all of the volumes, surfaces, and lines that are required to describe the geometry and interfaces. Then, assign a "physical" id to everything that you want meshed. Once you mesh the geometry, everything to which you have assigned a physical ID will be meshed. The "zero thickness" elements will ...

6

The complexity of simplicial tessellations in $\mathbb{R}^{d}$, for $d>2$ is, unfortunately, not linear. In general, a simplicial tessellation $\mathcal{T}(X)$ for $n$ vertices $X\subset\mathbb{R}^{d}$ can have $\Theta(n^{\lceil d/2\rceil})$ d-simplexes in the worst case. Similar results exist for the lower dimensional faces of $\mathcal{T}$. Based on ...

6

A two-point flux like this is not convergent if the mesh is not "orthogonal", in the sense that the edge/face between two cells is orthogonal to the line segment joining the cell centroids. If your mesh is orthogonal, you would use the distance between centroids for $h_{ij}$ above. If you would like a method to work on more general meshes within the cell-...

6

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{\textrm{grad}}$ (gradients), $\textrm{div}$ (divergences), $\triangle$ (Laplacians)... strongly depend on that mesh and become matrices:  \vec{\textrm{grad}}\...

6

You can use Gmsh for this purpose. I show an example below. // Points Point(1) = {-2, -2, 0, 1.0}; Point(2) = {2, -2, 0, 1.0}; Point(3) = {2, 2, 0, 1.0}; Point(4) = {-2, 2, 0, 1.0}; Point(5) = {-10, -10, 0, 2.0}; Point(6) = {10, -10, 0, 2.0}; Point(7) = {10, 10, 0, 2.0}; Point(8) = {-10, 10, 0, 2.0}; // Lines Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {...

5

Hashing floating-point numbers can indeed lead to weird results, especially if the node positions can be perturbed by some small amount or if there are denormalized values. You included the Python tag, so I assume that's what you're using and that you have scipy. A quick and dirty solution would be to construct a kd-tree of the fine grid points, then for ...

5

I suggest using PETSc, which has parallel solvers like GMRES, bi Conjugate Gradient, etc. Multiple preconditioners are also available. Furthermore, there might also be the option of the SNES nonlinear solvers. As to which set of solver+preconditioner combination works best, it's likely problem-specific. PETSc will allow you to switch between them easily. ...

5

This feature seems to be available in CGAL

4

I think you can do this using convex hull software (e.g. QHull) via the lifting algorithm. At least, the documentation of matlab's "delaunayn" command seems to indicate as much.

4

My answer is primarily opinion-based, given my experience. In my work, I haven't (yet) dealt with meshes quite as large as what you're describing. However, I've seen large enough meshes to hint that your problems might be my problems in the future, so I've pondered the problem. Here are some comments/suggestions ordered from obvious/easy-to-implement to ...

4

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 combination of these two a "structured mesh". In Abaqus, you can define a set of points on a grid with the keyword *NGEN and a regular connectivity with *...

3

Using a hash map adds a log(n) complexity to all accesses (then traversing the whole mesh will cost n log(n) in general), so clearly it is not the best solution. Now your question is how you can efficiently store and traverse adjacency information, i.e. for each cell the list of adjacent cells. First thing you can do for mapping a cell to its list of ...

3

For quadrilaterals and triangles, one standard thing to do is to use the isoparametric map. That is, you use the finite element basis you are about to use to approximate the solution to map your physical-space element to a "reference element" from the $\xi, \eta$ to $x, y$. You obviously have to add interior and edge nodes to do this for higher-order ...

3

If you have a triangular mesh with data defined at each vertex, you can of course associate a linear function with each element that interpolates the data values at the vertices. This also provides you with an estimate of the gradient on each cell by just computing the gradient of the linear interpolant. Of course, it is only an estimate because you are ...

3

If the edge lengths decrease by a factor $k$, the number of tetrahedra will typically increase by between $k^2$ and $k^3$ depending on the adaptivity of the mesh. A purely uniform mesh will see $k^3$, just as a uniform grid of length $1/n$ has $O(n^3)$ cells. A highly adaptive mesh with full resolution near a surface will increase by roughly $k^2$, since ...

3

The dual mesh (the one formed by the perpendicular bisectors) is typically used as a FV mesh to allow the two-point flux approximation to be valid. One requirement of the two-point flux approximation (in which the flux is based only upon the difference of the values at two neighboring cell centers) is that the segment connecting cell centroids is ...

3

I think you are looking for Kitware VTK, basically, the main library for interaction with VTK files. Examples page will contain a lot of samples, including the one you are looking for: output of an unstructured grid. As an addition, GMSH itself (I am using 3.0.5) is also able to export the mesh into VTK without the need to go through IO procedure. That can ...

3

From the discussions and the paper, OpenFOAM seems to have implemented a measure of skewness. This answer is not an explanation why the different definitions of skewness might be equivalent, I am just going to justify why this is a measure of skewness. Consider following two elements -for sake of simplicity- Blue arrow is the outward surface normal fAreas[...

3

For your first question, constructing the adjacency graph of the "partitions" (what you call "cell groups"): Let's say you have an array $p_K$ in which you store for each cell $K$ which partition $p$ it belongs to. Also assume that you have a (sparse) array $a_{KL}$ whose entries are true if cells $K$ and $L$ are neighbors ("adjacent&...

2

If you use the discontinuous Galerkin method with piecewise constant shape functions, you end up with a scheme just like yours. It provides a systematic way of constructing the weights as well as higher order schemes if you want.

2

The most conceptually simple approach is to select an interpolation scheme, interpolate through the data points that you have, then compute the derivative of the interpolant. This is a natural generalization of the typical finite-difference differentiation formulas. While you don't mention your exact requirements (in particular: do you need the derivatives ...

2

You can compute differential operators for this meshes using information around the neighborhood of each vertex (discrete in this case). In this reference the authors compute differential-geometry operators in the 1-star neighborhood, i.e., the cells around each vertex. Another option is to fit a paraboloid around each vertex and analytically calculate the ...

2

Yes, I've used tetgen to do precisely this. If you're filling a surface mesh, you'll have to generate facet triangulations first. Then you can decide whether or not you want a constrained or conforming tetrahedral mesh. The result of either choice is described in better detail within the manual.

2

Shewchuk's triangle mesh generator produces high quality meshes and is quite robust. However, the boundary definition is a series of straight lines. So to produce a sequence of refined meshes over a circle you would also have to refine the definition of the boundary for each mesh. Another option is Persson's distmesh triangle mesher, As shown on this page, ...

2

I'm assuming you are starting with a list of cell definitions, say, as a list of vertices defining the cell and a "type" defining the topology of each cell. As part of the topology definition for each cell, you can easily get the faces for that cell defined, say, as a list of vertices. The first step in creating the CellAdjacentsMap that you need is to ...

2

I think that both meshes are good. But depending of the problem at hand, one might be better than the other. In the domain that you are mentioning, one thing to consider is that you probably don't want element sizes to be too different to satisfy the sampling criterion. Regarding mesh quality I would suggest that you check this post: Commonly-used metrics ...

2

I would propose to think of the different schools of coming up with discretizations (FVM/FEM/FD), not as excluding or separate. There is surely overlap, they are -methods- to derive discretizations. As you said, in some cases you end up with identical discretizations no matter which approach you chose. That being said, there are certain advantages and ...

2

All software I know of first enumerates nodes locally, and then uses this local enumeration to generate a global enumeration. I suggest that you want to read the following manuscript about all of these questions: https://www.math.colostate.edu/~bangerth/publications/2010-distributed.pdf In particular, section 3 is relevant to you. The full reference for ...

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