3 #ifndef DUNE_ALBERTA_COORDCACHE_HH
4 #define DUNE_ALBERTA_COORDCACHE_HH
39 assert( !(!coords_) );
41 return array[ dofAccess_( element, vertex ) ];
46 return (*
this)( elementInfo.
el(),
vertex );
54 coords_.
create( dofSpace,
"Coordinate Cache" );
57 coords_.template setupInterpolation< Interpolation >();
68 CoordVectorPointer coords_;
86 dofAccess_( coords.dofSpace() )
120 const Element *element = patch[ 0 ];
123 assert( element->child[ 0 ] != NULL );
126 if( element->new_coord != NULL )
129 newCoord[ j ] = element->new_coord[ j ];
135 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
136 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
138 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
147 #endif // #if HAVE_ALBERTA
149 #endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH