Dune Core Modules (2.4.1)
#include <dune/grid/sgrid.hh>
Public Types | |
typedef GridImp::ctype | ctype |
define type used for coordinates in grid module | |
enum | |
Dimension of the cube element. | |
enum | |
Dimension of the world space that the cube element is embedded in. | |
typedef FieldVector< ctype, dim > | LocalCoordinate |
Type used for a vector of element coordinates. | |
typedef FieldVector< ctype, coorddim > | GlobalCoordinate |
Type used for a vector of world coordinates. | |
typedef conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > >::type | JacobianTransposed |
Return type of jacobianTransposed. More... | |
typedef conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > >::type | JacobianInverseTransposed |
Return type of jacobianInverseTransposed. More... | |
Public Member Functions | |
void | make (const FieldVector< ctype, cdim > &lower, const FieldMatrix< ctype, mydim, cdim > &A) |
Set up the geometry. More... | |
SGeometry () | |
constructor | |
GeometryType | type () const |
Type of the cube. Here: a hypercube of the correct dimension. | |
GlobalCoordinate | global (const LocalCoordinate &local) const |
Map a point in local (element) coordinates to world coordinates. | |
LocalCoordinate | local (const GlobalCoordinate &global) const |
Map a point in global (world) coordinates to element coordinates. | |
JacobianTransposed | jacobianTransposed (DUNE_UNUSED const LocalCoordinate &local) const |
Jacobian transposed of the transformation from local to global coordinates. | |
JacobianInverseTransposed | jacobianInverseTransposed (DUNE_UNUSED const LocalCoordinate &local) const |
Jacobian transposed of the transformation from local to global coordinates. | |
ctype | integrationElement (DUNE_UNUSED const LocalCoordinate &local) const |
Return the integration element, i.e., the determinant term in the integral transformation formula. | |
GlobalCoordinate | center () const |
Return center of mass of the element. | |
int | corners () const |
Return the number of corners of the element. | |
GlobalCoordinate | corner (int k) const |
Return world coordinates of the k-th corner of the element. | |
ctype | volume () const |
Return the element volume. | |
bool | affine () const |
Return if the element is affine. Here: yes. | |
Detailed Description
class Dune::SGeometry< mydim, cdim, GridImp >
SGeometry realizes the concept of the geometric part of a mesh entity.
The geometric part of a mesh entity is a \(d\)-dimensional object in \(\mathbf{R}^w\) where \(d\) corresponds the template parameter dim and \(w\) corresponds to the template parameter dimworld.
The \(d\)-dimensional object is a polyhedron given by a certain number of corners, which are vectors in \(\mathbf{R}^w\).
The member function global provides a map from a topologically equivalent polyhedron ("reference element") in \(\mathbf{R}^d\) to the given polyhedron. This map can be inverted by the member function local, where an appropriate projection is applied first, when \(d\neq w\).
In the case of a structured mesh discretizing a generalized cube this map is linear and can be described as
\[ g(l) = s + \sum\limits_{i=0}^{d-1} l_ir^i\]
where \(s\in\mathbf{R}^w\) is a given position vector, the \(r^i\in\mathbf{R}^w\) are given direction vectors and \(l\in\mathbf{R}^d\) is a local coordinate within the reference polyhedron. The direction vectors are assumed to be orthogonal with respect to the standard Eucliden inner product.
The \(d\)-dimensional reference polyhedron is given by the points \(\{ (x_0,\ldots,x_{d-1}) \ | \ x_i\in\{0,1\}\ \}\).
In order to invert the map for a point \(p\), we have to find a local coordinate \(l\) such that \(g(l)=p\). Of course this is only possible if \(d=w\). In the general case \(d\leq w\) we determine \(l\) such that
\[(s,r^k) + \sum\limits_{i=0}^{d-1} l_i (r^i,r^k) = (p,r^k) \ \ \ \forall k=0,\ldots,d-1. \]
The resulting system is diagonal since the direction vectors are required to be orthogonal.
Member Typedef Documentation
◆ JacobianInverseTransposed
|
inherited |
Return type of jacobianInverseTransposed.
This is a fast DiagonalMatrix if dim==coorddim, and a FieldMatrix otherwise. The FieldMatrix will never contain more than one entry per column, hence it could be replaced by something more efficient.
◆ JacobianTransposed
|
inherited |
Return type of jacobianTransposed.
This is a fast DiagonalMatrix if dim==coorddim, and a FieldMatrix otherwise. The FieldMatrix will never contain more than one entry per row, hence it could be replaced by something more efficient.
Member Function Documentation
◆ make()
|
inline |
Set up the geometry.
- Parameters
-
lower The lower left corner A The direction vectors
Allows a consistent treatment of all dimensions, including 0 (the vertex).
The documentation for this class was generated from the following file:
- dune/grid/sgrid.hh