5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
8#include <dune/grid/geometrygrid/hostcorners.hh>
9#include <dune/grid/geometrygrid/coordfunction.hh>
20 template<
class HostEntity,
class CoordFunctionInterface >
21 class CoordFunctionCaller;
23 template<
class HostEntity,
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
26 typedef AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > CoordFunctionInterface;
27 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
29 static const int codimension = HostEntity::codimension;
32 typedef typename CoordFunctionInterface::RangeVector RangeVector;
34 CoordFunctionCaller (
const HostEntity &hostEntity,
35 const CoordFunctionInterface &coordFunction )
36 : hostCorners_( hostEntity ),
37 coordFunction_( coordFunction )
40 void evaluate (
unsigned int i, RangeVector &y )
const
42 coordFunction_.evaluate( hostCorners_[ i ], y );
47 return hostCorners_.type();
50 std::size_t size ()
const
52 return hostCorners_.size();
56 const HostCorners< HostEntity > hostCorners_;
57 const CoordFunctionInterface &coordFunction_;
60 template<
class HostEntity,
class ct,
unsigned int dimR,
class Impl >
61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
66 typedef typename CoordFunctionInterface::RangeVector RangeVector;
69 CoordFunctionCaller (
const HostEntity &hostEntity,
70 const CoordFunctionInterface &coordFunction )
71 : hostEntity_( hostEntity ),
72 coordFunction_( coordFunction )
75 void evaluate (
unsigned int i, RangeVector &y )
const
77 coordFunction_.evaluate( hostEntity_, i, y );
82 return hostEntity_.type();
85 std::size_t size ()
const
87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
88 return refElement.size( HostEntity::mydimension );
92 const HostEntity &hostEntity_;
93 const CoordFunctionInterface &coordFunction_;
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Dune namespace.
Definition: alignedallocator.hh:13