3#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
4#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
6#include <dune/grid/geometrygrid/hostcorners.hh>
7#include <dune/grid/geometrygrid/coordfunction.hh>
18 template<
class HostEntity,
class CoordFunctionInterface >
19 class CoordFunctionCaller;
21 template<
class HostEntity,
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
22 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
24 typedef AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > CoordFunctionInterface;
25 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
27 static const int codimension = HostEntity::codimension;
30 typedef typename CoordFunctionInterface::RangeVector RangeVector;
32 CoordFunctionCaller (
const HostEntity &hostEntity,
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();
54 const HostCorners< HostEntity > hostCorners_;
55 const CoordFunctionInterface &coordFunction_;
58 template<
class HostEntity,
class ct,
unsigned int dimR,
class Impl >
59 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
61 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
62 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
64 typedef typename CoordFunctionInterface::RangeVector RangeVector;
67 CoordFunctionCaller (
const HostEntity &hostEntity,
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_;
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:180
Dune namespace.
Definition: alignedallocator.hh:14