3#ifndef DUNE_GEOGRID_COORDFUNCTION_HH
4#define DUNE_GEOGRID_COORDFUNCTION_HH
14 template<
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
15 class AnalyticalCoordFunction;
17 template<
class ct,
unsigned int dimR,
class Impl >
18 class DiscreteCoordFunction;
37 template<
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
46 typedef Impl Implementation;
66 This &operator= (
const This & ) =
default;
67 This &operator= (
This && ) =
default;
73 return asImp().evaluate( x, y );
77 const Implementation &asImp ()
const
79 return static_cast< const Implementation &
>( *this );
82 Implementation &asImp ()
84 return static_cast< Implementation &
>( *this );
95 template<
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
111 This &operator= (
const This & ) =
default;
112 This &operator= (
This && ) =
default;
137 template<
class ct,
unsigned int dimR,
class Impl >
146 typedef Impl Implementation;
162 This &operator= (
const This & ) =
default;
163 This &operator= (
This && ) =
default;
171 template<
class HostEntity >
172 void evaluate (
const HostEntity &hostEntity,
unsigned int corner,
175 asImp().evaluate( hostEntity, corner, y );
187 const Implementation &asImp ()
const
189 return static_cast< const Implementation &
>( *this );
192 Implementation &asImp ()
194 return static_cast< Implementation &
>( *this );
206 template<
class ct,
unsigned int dimR,
class Impl >
221 This &operator= (
const This & ) =
default;
222 This &operator= (
This && ) =
default;
228 template<
class HostEntity >
229 void evaluate (
const HostEntity &hostEntity,
unsigned int corner,
241 template<
class CoordFunctionInterface >
242 struct isCoordFunctionInterface
244 static const bool value =
false;
247 template<
class ct,
unsigned int dimD,
unsigned int dimR,
class Impl >
248 struct isCoordFunctionInterface
249 < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
251 static const bool value =
true;
254 template<
class ct,
unsigned int dimR,
class Impl >
255 struct isCoordFunctionInterface
256 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
258 static const bool value =
true;
266 template<
class CoordFunctionInterface >
267 struct isDiscreteCoordFunctionInterface
269 static const bool value =
false;
272 template<
class ct,
unsigned int dimR,
class Impl >
273 struct isDiscreteCoordFunctionInterface
274 < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
276 static const bool value =
true;
284 template<
class CoordFunctionInterface >
285 struct AdaptCoordFunction
287 static void adapt ( CoordFunctionInterface &coordFunction )
291 template<
class ct,
unsigned int dimR,
class Impl >
292 struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > >
294 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
296 static void adapt ( CoordFunctionInterface &coordFunction )
298 coordFunction.adapt();
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition: coordfunction.hh:39
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition: coordfunction.hh:59
void evaluate(const DomainVector &x, RangeVector &y) const
evaluate method for global mapping
Definition: coordfunction.hh:71
static const unsigned int dimRange
dimension of the range vector
Definition: coordfunction.hh:54
ct ctype
field type of the coordinate vector
Definition: coordfunction.hh:49
static const unsigned int dimDomain
dimension of the range vector (dimensionworld of host grid)
Definition: coordfunction.hh:52
FieldVector< ctype, dimDomain > DomainVector
domain vector for the evaluate method
Definition: coordfunction.hh:57
Derive an implementation of an analytical coordinate function from this class.
Definition: coordfunction.hh:98
Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid....
Definition: coordfunction.hh:139
static const unsigned int dimRange
dimension of the range vector
Definition: coordfunction.hh:152
void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
evaluate method
Definition: coordfunction.hh:172
ct ctype
field type of the coordinate vector
Definition: coordfunction.hh:149
void adapt()
method called from grid.adapt() method to allow adaptation of the discrete coordinate function
Definition: coordfunction.hh:181
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition: coordfunction.hh:155
Derive an implementation of a discrete coordinate function from this class.
Definition: coordfunction.hh:209
vector space out of a tensor product of fields.
Definition: fvector.hh:93
Implements a vector constructed from a given type representing a field and a compile-time given size.
Dune namespace.
Definition: alignment.hh:11