4 #ifndef DUNE_GENERICGEOMETRY_GEOMETRY_HH
5 #define DUNE_GENERICGEOMETRY_GEOMETRY_HH
7 #warning This header and the code it contains is deprecated. If you need functionality \
8 similar to BasicGeometry, please use the MultiLinearGeometry class.
10 #include <dune/common/typetraits.hh>
11 #include <dune/common/nullptr.hh>
19 namespace GenericGeometry
251 template<
int mydim,
class Traits >
254 typedef typename Traits :: CoordTraits CoordTraits;
277 dune_static_assert( (0 <=
mydimension),
"Geometry dimension must be nonnegative." );
288 static const int topologyId = Traits::template hasSingleGeometryType< mydimension >::topologyId;
293 static const bool hybrid = !Traits::template hasSingleGeometryType< mydimension >::v;
296 typedef typename conditional< hybrid, Hybrid< true >, NonHybrid< false > >::type::MappingFactory
MappingFactory;
297 typedef typename MappingFactory::Mapping
Mapping;
311 typedef typename Mapping::JacobianInverseTransposed
Jacobian;
319 : mapping_( nullptr )
323 template<
class CoordVector >
326 assert(type.
dim() == mydim);
327 mapping_ = MappingFactory::construct( type.
id(), coords, mappingStorage_ );
333 template<
class CoordVector >
338 mapping_ = MappingFactory::construct( type.
id(), coords, mappingStorage_ );
354 template<
int fatherdim >
357 const unsigned int codim = fatherdim - mydim;
358 mapping_ = father.mapping_->template trace< codim >( i, mappingStorage_ );
363 : mapping_( other.mapping_ ? other.mapping_->clone( mappingStorage_ ) : nullptr )
370 mapping_->~Mapping();
377 mapping_->~Mapping();
378 mapping_ = (other.mapping_) ? other.mapping_->clone( mappingStorage_ ) :
nullptr;
389 operator bool ()
const
391 return bool( mapping_ );
397 return mapping_->type();
403 return mapping_->numCorners();
409 return mapping_->corner( i );
415 return mapping_->global( local );
421 return mapping_->local( global );
427 return mapping_->center();
433 return mapping_->affine();
439 return mapping_->integrationElement( local );
445 return mapping_->volume();
454 return mapping_->jacobianTransposed( local );
461 return mapping_->jacobianInverseTransposed( local );
474 char mappingStorage_[ MappingFactory::maxMappingSize ];
494 template<
int mydim,
int cdim,
class Gr
id >
496 :
public BasicGeometry< mydim, GlobalGeometryTraits< Grid > >
509 template<
class Geo >
515 template<
class CoordVector >
517 :
Base( type, coords )
521 template<
int fatherdim >
544 template<
int mydim,
int cdim,
class Gr
id >
555 template<
class Geo >
561 template<
class CoordVector >
563 :
Base( type, coords )
567 template<
int fatherdim >
577 #endif // #ifndef DUNE_GENERICGEOMETRY_GEOMETRY_HH