My Project
|
Specialization for 3-dimensional geometries, i.e. cells. More...
#include <Geometry.hpp>
Public Types | |
enum | { dimension = 3 } |
Dimension of underlying grid. | |
enum | { mydimension = 3 } |
Dimension of domain space of. More... | |
enum | { coorddimension = cdim } |
Dimension of range space of. More... | |
enum | { dimensionworld = 3 } |
World dimension of underlying grid. | |
typedef double | ctype |
Coordinate element type. | |
typedef FieldVector< ctype, mydimension > | LocalCoordinate |
Domain type of. | |
typedef FieldVector< ctype, coorddimension > | GlobalCoordinate |
Range type of. | |
typedef FieldMatrix< ctype, coorddimension, mydimension > | Jacobian |
Type of Jacobian matrix. | |
typedef FieldMatrix< ctype, coorddimension, mydimension > | JacobianInverse |
Type of inverse of Jacobian matrix. | |
typedef FieldMatrix< ctype, mydimension, coorddimension > | JacobianTransposed |
Type of transposed Jacobian matrix. | |
typedef FieldMatrix< ctype, coorddimension, mydimension > | JacobianInverseTransposed |
Type of the inverse of the transposed Jacobian matrix. | |
typedef Dune::Impl::FieldMatrixHelper< double > | MatrixHelperType |
typedef Dune::FieldVector< double, 3 > | PointType |
Refine a single cell considering different widths, lengths, and heights. | |
Public Member Functions | |
Geometry (const GlobalCoordinate &pos, ctype vol, std::shared_ptr< const EntityVariable< cpgrid::Geometry< 0, 3 >, 3 > > allcorners_ptr, const int *corner_indices) | |
Construct from center, volume (1- and 0-moments) and corners. | |
Geometry () | |
Default constructor, giving a non-valid geometry. | |
GlobalCoordinate | global (const LocalCoordinate &local_coord) const |
Provide a trilinear mapping. | |
LocalCoordinate | local (const GlobalCoordinate &y) const |
Mapping from the cell to the reference domain. | |
double | integrationElement (const LocalCoordinate &local_coord) const |
Equal to \sqrt{\det{J^T J}} where J is the Jacobian. | |
GeometryType | type () const |
Using the cube type for all entities now (cells and vertices), but we use the singular type for intersections. | |
int | corners () const |
The number of corners of this convex polytope. | |
GlobalCoordinate | corner (int cor) const |
Get the cor-th of 8 corners of the hexahedral base cell. | |
ctype | volume () const |
Cell volume. | |
void | set_volume (ctype volume) |
const GlobalCoordinate & | center () const |
Returns the centroid of the geometry. | |
const JacobianTransposed | jacobianTransposed (const LocalCoordinate &local_coord) const |
Jacobian transposed. | |
const JacobianInverseTransposed | jacobianInverseTransposed (const LocalCoordinate &local_coord) const |
Inverse of Jacobian transposed. | |
Jacobian | jacobian (const LocalCoordinate &local_coord) const |
The jacobian. | |
JacobianInverse | jacobianInverse (const LocalCoordinate &local_coord) const |
The inverse of the jacobian. | |
bool | affine () const |
The mapping implemented by this geometry is not generally affine. | |
void | refineCellifiedPatch (const std::array< int, 3 > &cells_per_dim, DefaultGeometryPolicy &all_geom, std::vector< std::array< int, 8 > > &refined_cell_to_point, cpgrid::OrientedEntityTable< 0, 1 > &refined_cell_to_face, Opm::SparseTable< int > &refined_face_to_point, cpgrid::OrientedEntityTable< 1, 0 > &refined_face_to_cell, cpgrid::EntityVariable< enum face_tag, 1 > &refined_face_tags, cpgrid::SignedEntityVariable< PointType, 1 > &refined_face_normals, const std::array< int, 3 > &patch_dim, const std::vector< double > &widthsX, const std::vector< double > &lengthsY, const std::vector< double > &heightsZ) const |
Specialization for 3-dimensional geometries, i.e. cells.
typedef FieldVector<ctype, coorddimension> Dune::cpgrid::Geometry< 3, cdim >::GlobalCoordinate |
Range type of.
typedef FieldVector<ctype, mydimension> Dune::cpgrid::Geometry< 3, cdim >::LocalCoordinate |
Domain type of.
typedef Dune::FieldVector<double,3> Dune::cpgrid::Geometry< 3, cdim >::PointType |
Refine a single cell considering different widths, lengths, and heights.
For each cell to be created, storage must be passed for its corners and the indices. That storage must be externally managed, since the newly created geometry structures only store pointers and do not free them on destruction.
cells_per_dim | The number of sub-cells in each direction, |
all_geom | Geometry Policy for the refined geometries. Those will be added there. |
refined_cell_to_point | Map from cell to its 8 corners. |
refined_cell_to_face | Map from cell to its oriented faces, used to build face_to_cell_. |
refined_face_to_point | Map from face to its points. |
refined_face_to_cell | Map from face to its neighboring cells. |
refined_face_tags | Face tags (I_FACE, J_FACE, K_FACE). |
refined_face_normals | Face normal(s) (only one per face is computed). |
patch_dim | Amount of cells to be refined, in each direction. |
dx,dy,dz | Vectors of widths (x-dir), lengths (y-dir), and heights (z-dir) |
anonymous enum |
Dimension of domain space of.
anonymous enum |
Dimension of range space of.
|
inline |
Construct from center, volume (1- and 0-moments) and corners.
pos | the centroid of the entity |
vol | the volume(area) of the entity |
allcorners | pointer of all corner positions in the grid |
corner_indices | array of 8 indices into allcorners. The indices must be given in lexicographical order by (kji), i.e. i running fastest. |
|
inline |
The number of corners of this convex polytope.
Returning 8, since we treat all cells as hexahedral.
|
inline |
Provide a trilinear mapping.
Note that this does not give a proper space-filling embedding of the cell complex in the general (faulted) case. We should therefore revisit this at some point. Map g from (local) reference domain to (global) cell
|
inline |
Equal to \sqrt{\det{J^T J}} where J is the Jacobian.
J_{ij} = (dg_i/du_j) where g is the mapping from the reference domain, and {u_j} are the reference coordinates.
|
inline |
Inverse of Jacobian transposed.
|
inline |
Jacobian transposed.
J^T_{ij} = (dg_j/du_i) where g is the mapping from the reference domain, and {u_i} are the reference coordinates. g = g(u) = (g_1(u), g_2(u), g_3(u)), u=(u_1,u_2,u_3) g = map from (local) reference domain to global cell
|
inline |
Mapping from the cell to the reference domain.
May be slow.
|
inline |
— REFINED CORNERS —
— END REFINED CORNERS —
— REFINED FACES —
— END REFINED FACES —
— REFINED CELLS —
— END REFINED CELLS —