3 #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH 4 #define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH 18 template<
class HostEntity,
class CoordFunctionInterface >
21 template<
class HostEntity,
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
27 static const int codimension = HostEntity::codimension;
30 typedef typename CoordFunctionInterface::RangeVector RangeVector;
33 const CoordFunctionInterface &coordFunction )
34 : hostCorners_( hostEntity ),
35 coordFunction_( coordFunction )
38 void evaluate (
unsigned int i, RangeVector &y )
const 40 coordFunction_.evaluate( hostCorners_[ i ], y );
45 return hostCorners_.type();
48 std::size_t size ()
const 50 return hostCorners_.size();
55 const CoordFunctionInterface &coordFunction_;
58 template<
class HostEntity,
class ct,
unsigned int dimR,
class Impl >
64 typedef typename CoordFunctionInterface::RangeVector RangeVector;
68 const CoordFunctionInterface &coordFunction )
69 : hostEntity_( hostEntity ),
70 coordFunction_( coordFunction )
73 void evaluate (
unsigned int i, RangeVector &y )
const 75 coordFunction_.evaluate( hostEntity_, i, y );
80 return hostEntity_.type();
83 std::size_t size ()
const 85 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
86 return refElement.size( HostEntity::mydimension );
90 const HostEntity &hostEntity_;
91 const CoordFunctionInterface &coordFunction_;
98 #endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::DiscreteCoordinateFunction and the evaluate method taking an entity of the host grid together with the number of a vertex returns the coordinate in of that corner. The user must ensure continuity of this mapping. In addition an adapt method is provided which is called whenever adapt() is called on the Dune::GeometryGrid.
Definition: coordfunction.hh:172
Definition: coordfunctioncaller.hh:19
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::AnalyticalCoordFunction and the evaluate method mapping has to be supplied.
Definition: coordfunction.hh:41
Definition: hostcorners.hh:19
Include standard header files.
Definition: agrid.hh:58