![]() |
|
This file is part of OpenFOAM. OpenFOAM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
The tetrahedral decomposition of the mesh based on the underlying polyMesh. Uses minimal storage - the tet decomposition is provided on a cell-by-cell basis. This class will be used as the underlying structure for FEM mesh motion and therefore it needs to be able to create and store tet poing-edge addressing for the solver. Note on addressing: The problem of addressing for Finite elements is two-fold. The first issue is addressing in the FEM matrix. The FEM coefficients are associated with edges in the tet decomposition. In order for the FOAM solver to work correctly, the coefficients need to be ordered in the upper triangular order. It is convinient to keep the order of edges and off-diagonal coefficients the same; therefore, the order of edges in the tet mesh is fixed by the ordering of points. The construction of the list from the edge list in polyMesh will be described in calcTetPolyMeshAddressing.C. The second issue is the construction of the FEM matrix. A fast method by Sanjay Mathur (Fluent Wavre 19/Sep/2003) is currently used: 1) take a group of elements. The discretisation will be done over a group. A goup should be such that I can allocate a dense square matrix for all elements in the group. Do NOT initialise arrays to zero. As only a part of the group will be addressed, it needs to be zeroed out only for the entries it will have to use. As the number of vertices per group will be variable, the local dense matrix changes for every group. 2). Allocate group-to-global and global-to-group arrays. The second one is full of -1-s for vertices that are not in the group. It will be initialised to -1 and is kept outside of the group. This is done by going through all the vertices in the group and looking up a global-to-local index. If the index is -1, this global index has not been seen before: allocate next free local index to the vertex. 3) For every element in the local-to-global, fidn the matrix row in ldu addressing. For each element in a row, using global-to-local, find the local off-diagonal index and zero it out. These are the only ones being used! 4) Fill in local matrix based on the local vertex indices into the local dense matrix. 5) Assemble global matrix by doing the following: - go through all group-to-global indices - for each group-to-global grab the row - for each non-zero element of the row, look up global-to-group. This gives the x,y coordinates in the dense matrix and and insert it. 6) Clear the global-to-local addressing by looking up the local-to-global indices and zeroing out only those entries.
Definition in file tetPolyMeshCellDecomp.H.
Go to the source code of this file.
Namespaces | |
namespace | Foam |
Classes | |
class | tetPolyMeshCellDecomp |