5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
25 static const unsigned int flagIntegrationElement = (1 << 0);
26 static const unsigned int flagJacobianTransposed = (1 << 1);
27 static const unsigned int flagJacobianInverseTransposed = (1 << 2);
39 if( (flags_ & flagIntegrationElement) == 0 )
42 assert( integrationElement_ > 1e-14 );
43 flags_ |= flagIntegrationElement;
45 return integrationElement_;
50 if( (flags_ & flagJacobianTransposed) == 0 )
54 for(
int i = 0; i < dim; ++i )
58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ];
60 flags_ |= flagJacobianTransposed;
62 return jacobianTransposed_;
68 if( (flags_ & flagJacobianInverseTransposed) == 0 )
71 assert( integrationElement_ > 1e-14 );
72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed;
74 return jacobianInverseTransposed_;
79 Real integrationElement_;
80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_;
81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_;
96 : geometryCache_( geometryCache ),
102 return geometryCache_.integrationElement( elInfo_ );
107 return geometryCache_.jacobianTransposed( elInfo_ );
112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
117 const ALBERTA EL_INFO &elInfo_;
#define ALBERTA
Definition: albertaheader.hh:29
Include standard header files.
Definition: agrid.hh:60
void abs(const DofVectorPointer< int > &dofVector)
Definition: dofvector.hh:328
ALBERTA REAL Real
Definition: misc.hh:48
static K determinant(const FieldMatrix< K, 0, m > &matrix)
Definition: algebra.hh:30
static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
Definition: algebra.hh:81
static const int dimWorld
Definition: misc.hh:46
ALBERTA REAL_D GlobalVector
Definition: misc.hh:50
Definition: geometrycache.hh:24
GeometryCache()
Definition: geometrycache.hh:33
const Real & integrationElement(const ALBERTA EL_INFO &elInfo)
Definition: geometrycache.hh:37
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition: geometrycache.hh:31
const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)
Definition: geometrycache.hh:48
const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA EL_INFO &elInfo)
Definition: geometrycache.hh:66
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition: geometrycache.hh:30
Definition: geometrycache.hh:91
const JacobianTransposed & jacobianTransposed()
Definition: geometrycache.hh:105
FieldMatrix< Real, dim, dimWorld > JacobianTransposed
Definition: geometrycache.hh:93
FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
Definition: geometrycache.hh:92
const Real & integrationElement()
Definition: geometrycache.hh:100
GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
Definition: geometrycache.hh:95
const JacobianInverseTransposed & jacobianInverseTransposed()
Definition: geometrycache.hh:110