#include <GridFV.h>
Inheritance diagram for GridFV::

Public Methods | |
| GridFV () | |
| GridFV (GridLattice &grid) | |
| GridFV (GridFE &grid, GridFVType strategy=CVFE_GRID) | |
| GridFV (const GridFV &grid) | |
| ~GridFV () | |
| bool | redim (const GridFV &grid) |
| bool | redim (GridFVSizeInfo &info) |
| bool | redimVertexData (GridFVSizeInfo &info) |
| bool | redimFaceAndNeighborData (GridFVSizeInfo &info) |
| void | computeDofSizes (GridFVSizeInfo &info) |
| bool | redimDofData (GridFVSizeInfo &info) |
| void | createDualGrid () |
| GridFV* | getDualGrid () |
| GridFE* | getGridFE () |
| GridFVState | getGridState () const |
| GridFVType | getGridType () const |
| bool | isLattice () const |
| virtual int | getNoSpaceDim () const |
| virtual int | getNoPoints () const |
| int | getNoVolumes () const |
| int | getNoFaces () const |
| int | getNoVertices () const |
| int | getNoDofs () const |
| void | updateAttributes () |
| real | getVolume (int volno) const |
| real | getFaceArea (int faceno) const |
| real | getCentroid (int volno, int dir) const |
| Ptv(real) | getCentroid (int volno) const |
| void | getCentroid (Ptv(real) &point, int volno) const |
| real | getFaceMidpoint (int faceno, int dir) const |
| Ptv(real) | getFaceMidpoint (int faceno) const |
| Ptv(real) | getFaceNormal (int faceno, int from_volno=0) const |
| int | getFaceOrientation (int faceno, int from_volno=0) const |
| int | getNoVolFaces (int volno) const |
| int | getNoVolVertices (int volno) const |
| int | getNoFaceVertices (int faceno) const |
| int | getNoVertexVols (int vertexno) const |
| int | getNoVertexFaces (int vertexno) const |
| FVShape | getVolShape (int volno) const |
| String | getVolType (int volno) const |
| String | getFaceType (int faceno) const |
| void | getVolVertexCoor (Mat(real) &coor, int volno) const |
| void | getFaceVertexCoor (Mat(real) &coor, int faceno) const |
| real | getVertexCoor (int vertexno, int dir) const |
| Ptv(real) | getVertexCoor (int vertexno) const |
| void | getVertexCoor (Ptv(real) &point, int vertexno) const |
| real | getDofCoor (int dofno, int dir) const |
| Ptv(real) | getDofCoor (int dofno) const |
| void | getDofCoor (Ptv(real) &point, int dofno) const |
| int | loc2globVertex (int volno, int local_node) const |
| int | loc2globFace (int volno, int local_face) const |
| int | loc2globVertexFace (int vertexno, int local_face) const |
| int | getFaceDof (int faceno) const |
| int | getVolDof (int volno) const |
| Ptv(real) | getFaceDofCoor (int faceno) const |
| Ptv(real) | getVolDofCoor (int volno) const |
| void | getFaceList (int volno, VecSimple(int) &facelist) |
| int | getNoMaterials () const |
| int | getMaterialType (int volno) const |
| bool | oneMaterialType () const |
| void | addMaterial (Is is) |
| int | addMaterial (int material_number, const MatSimple(real) &polygon) |
| int | getNoNeighborVols (int volno) const |
| Ptv(int) | makeLoc2Glob4Face (int faceno, VecSimple(int) &loc2glob, int from_volno, bool add_vols) |
| Ptv(int) | makeLoc2Glob4BoFace (int faceno, VecSimple(int) &loc2glob, bool add_vols) |
| int | makeLoc2Glob4Vol (int volno, VecSimple(int) &loc2glob, bool add_vols) |
| int | makeLoc2Glob4BoVol (int volno, VecSimple(int) &loc2glob, bool add_vols) |
| int | getNoBoInds () const |
| String | getBoIndName (int indno) const |
| bool | boFace (int faceno) const |
| bool | boFace (int faceno, int indno) const |
| bool | boFace (int volno, int loc_face, int indno) const |
| bool | boDof (int dofno, int indno) const |
| bool | boDof (int dofno) const |
| const Indicators& | boundaryData (bool dof=true) const |
| Indicators& | boundaryData (bool dof=true) |
| void | attach (const Indicators &boinds, bool dof=true) |
| void | redefineBoInds (Is is, bool dof=true) |
| void | addBoIndNodes (Is is, bool add=ON, bool dof=true) |
| void | addDofBoIndNodes (Is is, bool add=ON) |
| void | addFaceBoIndNodes (Is is, bool add=ON) |
| bool | faceIsOnBoundary (int faceno) const |
| bool | volumeIsOnBoundary (int volno) const |
| virtual void | startIterator () |
| virtual bool | nextPt (Ptv(real) &x) |
| bool | nextPt (Ptv(real) &x, int &dofno) |
| virtual void | debugPrint (Os os) const |
| virtual void | print (Os os) const |
| virtual void | scan (Is is) |
| virtual void | scanLattice (Is is) |
| void | operator= (const GridFV &grid) |
| bool | ok () const |
| virtual void | getMinMaxCoord (Ptv(real) &mincoord, Ptv(real) &maxcoord) const |
| virtual int | nearestPoint (const Ptv(real) &point, real &distance, bool &exact) |
| void | setGridState (GridFVState state) |
| void | setGridState (const String &state) |
| void | setGridType (GridFVType type) |
| void | setGridType (const String &type) |
| void | setGridFE (const GridFE &grid) |
| void | setMaterialType (int volno, int material_number) |
| void | setVolType (int volno, const String &type) |
| void | setNoVerticesInVol (int volno, int nvert) |
| void | setNoVerticesInFace (int faceno, int nvertices) |
| void | setNoFacesInVol (int volno, int nface) |
| void | setNoFacesNextToVertex (int vertexno, int nfaces) |
| void | setNoVolumesNextToVertex (int vertexno, int nvols) |
| Ptv(real) | computeCentroid (int volno) |
| void | putVertexCoor (real value, int vertexno, int dir) |
| void | putVertexCoor (const Ptv(real) &point, int vertexno) |
| void | putDofCoor (real value, int dofno, int dir) |
| void | putDofCoor (const Ptv(real) &point, int dofno) |
| void | putCenterCoor (real value, int volno, int dir) |
| void | putCenterCoor (const Ptv(real) &point, int volno) |
| void | moveDof2Centroid (Ptv(real) &point, int dofno, int volno) |
| void | putLoc2Glob4Vertex (int global_vertex, int volno, int local_vertex) |
| void | putVertex2VolNeighbor (int vertexno, int volno) |
| void | putVol2VolNeighbors () |
| void | putFaceData (int volno, int local_faceno, int vertex) |
| void | putFaceData (int volno, int local_faceno, int from_vertex, int to_vertex) |
| void | putFaceData (int volno, int local_faceno, int vertex1, int vertex2, int vertex3, int vertex4) |
| void | setBoInd (int node, int indno, bool dof=true) |
| void | clearBoInd (int node, int indno, bool dof=true) |
| void | clearBoInds (bool dof=true) |
| void | putBoIndName (const String &name, int indno, bool dof=true) |
| void | updateSizeInfo (GridFVSizeInfo &info, int volno, int local_faceno, int from_vertex, int to_vertex) |
| void | computeNoOfDofs () |
| void | redimVol2Vols (int m, int n) |
| void | redimVol2Faces (int m, int n) |
| void | redimVol2Vertices (int m, int n) |
| void | redimFace2Vols (int m, int n) |
| void | redimFace2Vertices (int m, int n) |
| void | redimVertex2Vols (int m, int n) |
| void | redimVertex2Faces (int m, int n) |
Protected Methods | |
| void | redim4Counting (GridFVSizeInfo &info) |
| void | computeVolTypes () |
| real | integrateCurrVolumePatch () |
| void | computeVolumes () |
| void | computeFaceAreas () |
| void | computeFaceNormals2D () |
| void | computeFaceNormals () |
| void | printAscii (Os os) const |
| void | printBinary (Os os) const |
| void | scanAscii (Is is) |
| void | scanBinary (Is is) |
| void | split (DpList(int), DpListItemInst &list_, String line, const char delimiters) |
| void | splitIntoInts (Is &is, VecSimple(int) &tokens, const char delimiters) |
Protected Attributes | |
| GridFVState | grid_state |
| GridFVType | grid_type |
| Handle(GridFE) | fem_grid |
| GridFV* | dual_grid |
| int | nsd |
| int | nvols |
| int | nfaces |
| int | nvertices |
| int | ndofs |
| int | nfacedofs |
| bool | center_dofs |
| Handle(MatSimpleH(real)) | vertex_coor |
| Handle(MatSimpleH(real)) | dof_coor |
| Handle(MatSimpleH(real)) | center_coor |
| Handle(MatSimpleH(real)) | midpts_coor |
| MatSimple(int) | vol2vols |
| MatSimple(int) | vol2faces |
| MatSimple(int) | vol2vertices |
| MatSimple(int) | face2vols |
| MatSimple(int) | face2vertices |
| MatSimple(int) | vertex2vols |
| MatSimple(int) | vertex2faces |
| VecSimplest(FVShape) | vol_shape |
| VecSimple(real) | volumes |
| VecSimple(real) | faceareas |
| VecSimple(Ptv(real)) | facenormals |
| Handle(Indicators) | dof_bind |
| Handle(Indicators) | face_bind |
| bool | onemat |
| VecSimple(int) | material_type |
| VecSimple(int) | vol2dof |
| VecSimple(int) | face2dof |
| int | nfaces_added |
| Ptv(real) | pt |
| int | current_dof |
| ElmItgRules | itg_rules |
| FiniteElement | fe |
| String | elm_name |
| Mat(real) | ecoor |
Friends | |
| class | GridFE2GridFV |
| class | GridLattice2GridFV |
| class | GridFVSizeInfo |
| Os& | operator<< (Os &os, const GridFE &grid) |
| Is& | operator>> (Is &is, GridFE &grid) |
NAME: GridFV - finite volume grid
DESCRIPTION:
The class "GridFV" offers a grid representation tailored for finite volume calculations. This grid class is capable of handling a fully unstructured mesh with a mix of different volume types.
|
|
The "GridFV" object needs to be initialized from a preprocessor, or from an existing "GridFE" object. One of the constructors accepts a "GridFE" object as input and will use the class "GridFE2GridFV" to convert the element grid to a finite colume grid. There is also a collection of member functions that assist in the construction of a "GridFV" object, typically intended for use by preprocessors. Moreover, valid data files in "GridFV" format can be read by the "scan" functions. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
turns indicators on or off for a specified vertex. |
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
adds a material type for a specified region. |
|
|
connects a "Indicators" object to the current grid. |
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns true if the specified face is subject to any or one specified boundary indicator. A face is subject to an indicator if all vertices of the face are subject to the indicator. The face can be specified directly or locally within a given control volume. |
|
|
See documentation of one of the overloaded functions. |
|
|
provides direct access to the "Indicators" object used for storage of boundary indicators. |
|
|
turns off a particular boundary indicator at a node ("OFF" mode). |
|
|
turns off all boundary indicators. |
|
|
|
|
|
estimates the total number of degrees of freedom in this "GridFV" object. There is supposed to be one degree of freedom for each volume and one for each boundary face in the grid. |
|
|
|
|
|
|
|
|
|
|
|
computes the total number of degrees of freedom, counting both volumes and boundary faces.This is only used by grid converters and preprocessors. |
|
|
|
|
|
|
|
|
based on the current grid, create the dual grid. The dual grid states are primary grid (triangulation) or secondary grid (polygonal volumes). A "GridFV" object generated from a finite element grid is automatically a secondary grid. This convention appears normal in that most non-trivial finite volume grids are constructed on basis of a triangulation, e.g. in terms of a Voronoi grid constructed on basis of a Delauney triangulation. |
|
|
|
|
|
|
|
|
returns the logical name of the specified boundary indicator. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the coordinates of the centroid in the specified control volume. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the coordinates of the specified degree of freedom. |
|
|
returns a pointer to the dual grid. If the dual grid is not present, e.g. by not having called "createDualGrid", a "NULL" pointer is returned. |
|
|
returns the area of the specified face. |
|
|
|
|
|
|
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
returns the coordinates of the midpoint/centroid of the specified face. |
|
|
returns the unit normal vector positioned at the midpoint/centroid of the specified face. The optional second argument specifies which volume that is taken to be the basis for the normal vector. That is, the vector will point outwards from the face on the specified volume. Valid volume numbers refers to the two volumes sharing the face. The default value (of volume number 0) will make the vector point outwards from the first volume that defined the specified face. The result of this will depend on the algorithm used for the grid generation. |
|
|
|
|
|
returns the shape of the specified face. |
|
|
returns an array containing the coordinates of the vertices defining the specified face. Each row in the array refers to one vertex, and the columns refers to the individual components. |
|
|
returns a pointer to the finite element grid ("GridFE" object) which was the basis of the current finite volume grid. This function is only meaningful when a conversion from a "GridFE" object has taken place, e.g. by use of the "GridFE2GridFV" utility class. If such a finite element grid is not present, the functions returns a "NULL" pointer. |
|
|
returns the grid state as primary (triangulation) versus secondary (polygonal). See also the function "createDualGrid". |
|
|
returns the grid type describing the algorithm used for its construction. Although the return value is a "String", the possible values are defined by the "enum" data type "GridFVType". |
|
|
returns the material type defined for the specified control volume. |
|
|
provides the vertex coordinates of a bounding box containing the current grid. Reimplemented from GridWithPts. |
|
|
returns the number of boundary indicators set for this grid. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the number of vertices defining the specified face. |
|
|
return the number of volume faces in the current grid, counting internal faces as well as boundary faces. |
|
|
returns the number of materials defined in the grid. |
|
|
returns the number of neighor volumes as viewed from the specified control volume |
|
|
returns the number of degrees of freedom in the current grid. See also "getNoDofs". Reimplemented from GridWithPts. |
|
|
returns the number of spatial dimensions. Reimplemented from GridWithPts. |
|
|
|
|
|
|
|
|
return the number of volume vertices in the current grid. |
|
|
returns the number of faces for a specified control volume. |
|
|
returns the number of vertices defining the shape of a specified control volume. |
|
|
return the number of volumes in the current grid. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
returns the coordinates of the specified vertex. |
|
|
|
|
|
|
|
|
returns the volume type of the specified control volume, as listed in the defintion of "FVShape". |
|
|
as "getVolShape", but returns the value as a "String" rather than a "FVShape". |
|
|
returns an array with "nvv" rows and "nsd" colums containing the coordinates of the vertices of the specified control volume. Here, "nvv" is the number of vertices in the volume, and "nsd" is the number of spatial dimensions. |
|
|
returns the volume of the specified control volume. |
|
|
|
|
|
|
|
|
|
|
|
returns the global vertex number corresponding to the local vertex number "local_node" in the control volume "volno". |
|
|
|
|
|
generate a map from local to global degree of freedom numbering for the specified boundary face. |
|
|
generate a map from local to global degree of freedom numbering for the specified boundary volume. A boundary volume is a control volume with at least one boundary face. |
|
|
generate a map from local to global degree of freedom numbering for the specified internal face. |
|
|
generate a map from local to global degree of freedom numbering for the specified internal volume. An internal volume is a control volume without boundary faces. |
|
|
|
|
|
a local variant of "GridWithPts nearestPoint"; it just calls that function. The reason to include "nearestPoint" as a member function, is that "GridWithPts" defines the function to be virtual, but provides no default version (a general static function requiring a coordinate array for the grid points is offered and it is this function that is called from "GridFV nearestPoint"). The function returns the node number that is closest to "point". The "distance" parameter reflects the distance between the nearest node/point and the "point". The "exact" variable is true at return if "point" is a node. Reimplemented from GridWithPts. |
|
|
See documentation of one of the overloaded functions. |
|
|
advances to the next degree of freedom in the grid. Reimplemented from GridWithPts. |
|
|
returns "true" if the current grid is in a consistent state. |
|
|
returns "true" if there is only one material type defined throughout the grid. |
|
|
copies all data from another "GridFV" object to the current grid. |
|
|
prints the grid data to an output stream. Reimplemented from Grid. |
|
|
|
|
|
|
|
|
assigns a name to a boundary indicator. |
|
|
See documentation of one of the overloaded functions. |
|
|
inserts the coordinates of a sepcified volume centroid, either component by component or in terms of a "Ptv(real)" object. This is only used by grid converters and preprocessors. |
|
|
See documentation of one of the overloaded functions. |
|
|
inserts the coordinates of a specified degree of freedom, either component by component or in terms of a "Ptv(real)" object. This is only used by grid converters and preprocessors. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
inserts a new face as the specified local face of the given volume number. The supplied vertex numbers "from_vertex" and "to_vertex" will be the endpoints for the new face. The direction of the face should be as seen when making a counterclock traversal of faces for the volume "volno". Neighbor information is automatically updated. This is only used by grid converters and preprocessors. |
|
|
inserts the mapping of local to global vertex numbering for a specified control volume. This is only used by grid converters and preprocessors. |
|
|
insert the specified volume number in the list of volumes sharing the specified vertex node. If the connection has already been made, it is ignored. That is the resulting vertex to volume list will only have unique volume numbers. This is only used by grid converters and preprocessors. |
|
|
See documentation of one of the overloaded functions. |
|
|
inserts the coordinates of a specified vertex, either component by component or in terms of a "Ptv(real)" object. This is only used by grid converters and preprocessors. |
|
|
builds up the table showing volume neighbors, i.e., an index that for any given volume can list all neighboring volumes. To be a volume neighbor, the volumes must share at least one face. This is only used by grid converters and preprocessors. |
|
|
allows redefinition of boundary indicators. See class "Indicators" for details. |
|
|
See documentation of one of the overloaded functions. |
|
|
redimensions the current "GridFV" object, either bases on another, already initialized "GridFV" object, or on a "GridFVSIzeInfo" object. The latter class is a simple collection of size data for all interal data structures of "GridFV". |
|
|
|
|
|
redimensions the storage of degrees of freedom. This function requires "redimVertexData" and "rediumFaceAndNeighborData" to be called first. |
|
|
redimensions the table for face to vertex neighbor information. The number of rows corresponds to the number of faces in the grid, whereas the number of columns refers to the maximum number of vertices in any face in the grid. An extra column (the last one) is used to store the actual number of vertices used for a given volume. This is only used by grid converters and preprocessors. |
|
|
See documentation of one of the overloaded functions. |
|
|
redimensions the storage needed for the faces between volumes and for the grid topology (neighbor data). This function takes a "GridFVSIzeInfo" object as input. This function requires "redimVertexData" to be called first. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
redimensions the storage needed for the vertices defining the control volumes in the grid. This function takes a "GridFVSIzeInfo" object as input. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
See documentation of one of the overloaded functions. |
|
|
reads the grid data from an input stream and initializes the grid. This function can read back data output by "print". Reimplemented from Grid. |
|
|
|
|
|
|
|
|
|
|
|
sets a particular boundary indicator at a node ("ON" mode). |
|
|
sets the connection to a "GridFE" object. This is only used by grid converters and preprocessors. |
|
|
See documentation of one of the overloaded functions. |
|
|
sets the current grid state as either "PRIMARY_GRIDFV" (triangular, or FEM-like, grid)or "SECONDARY_GRIDFV" (polygonal grid). |
|
|
See documentation of one of the overloaded functions. |
|
|
sets the current grid type, indicating how the grid was created. |
|
|
assigns material type "material_number" to control volume "volno". This information is not used by the Diffpack libraries, but can be used at the application level, e.g. to set material dependent properties. |
|
|
|
|
|
|
|
|
|
|
|
defines the number of vertices that are in use for a given control volume. This is only used by grid converters and preprocessors. |
|
|
|
|
|
assigns the shape indetificator for control volume "volno" based on a "String" input "type". This is only used by grid converters and preprocessors. |
|
|
|
|
|
|
|
|
initializes an iteration through all degrees of freedom in the grid. Reimplemented from GridWithPts. |
|
|
based on an already correctly dimensioned grid with vertex and face data loaded, global attributes as face midpoints, face areas, cell volumes and cell types are computed. This functions also determines the location of degrees of freedom at the centers of boundary faces. |
|
|
updates face information in a "GridFVSizeInfo" object and prepares the current grid object for insertion of face information. This is only used by grid converters and preprocessors. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|