1 #ifndef DUNE_ALBERTA_COORDCACHE_HH
2 #define DUNE_ALBERTA_COORDCACHE_HH
37 assert( !(!coords_) );
39 return array[ dofAccess_( element, vertex ) ];
44 return (*
this)( elementInfo.
el(),
vertex );
52 coords_.
create( dofSpace,
"Coordinate Cache" );
55 coords_.template setupInterpolation< Interpolation >();
66 CoordVectorPointer coords_;
84 dofAccess_( coords.dofSpace() )
118 const Element *element = patch[ 0 ];
121 assert( element->child[ 0 ] != NULL );
124 if( element->new_coord != NULL )
127 newCoord[ j ] = element->new_coord[ j ];
133 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
134 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
136 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
145 #endif // #if HAVE_ALBERTA
147 #endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH