5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH 
    6#define DUNE_GEOGRID_COORDFUNCTION_HH 
   11#include <dune/common/std/type_traits.hh> 
   19  template< 
class ct, 
unsigned int dimD, 
unsigned int dimR, 
class Impl >
 
   20  class AnalyticalCoordFunction;
 
   22  template< 
class ct, 
unsigned int dimR, 
class Impl >
 
   23  class DiscreteCoordFunction;
 
   42  template< 
class ct, 
unsigned int dimD, 
unsigned int dimR, 
class Impl >
 
   51    typedef Impl Implementation;
 
   71    This &operator= ( 
const This & ) = 
default;
 
   72    This &operator= ( 
This && ) = 
default;
 
   75    template<
typename F, 
typename DV>
 
   76    using has_operator_parentheses = 
decltype(std::declval<F>()(std::declval<DV>()));
 
  105        "You need to implement either operator() or evaluate() in your coordinate function!");
 
  106      asImp().evaluate( x, y );
 
  113    const Implementation &asImp ()
 const 
  115      return static_cast< const Implementation & 
>( *this );
 
  118    Implementation &asImp ()
 
  120      return static_cast< Implementation & 
>( *this );
 
  131  template< 
class ct, 
unsigned int dimD, 
unsigned int dimR, 
class Impl >
 
  147    This &operator= ( 
const This & ) = 
default;
 
  148    This &operator= ( 
This && ) = 
default;
 
  173  template< 
class ct, 
unsigned int dimR, 
class Impl >
 
  182    typedef Impl Implementation;
 
  198    This &operator= ( 
const This & ) = 
default;
 
  199    This &operator= ( 
This && ) = 
default;
 
  210    template< 
class HostEntity >
 
  211    void evaluate ( 
const HostEntity &hostEntity, 
unsigned int corner,
 
  214      asImp().evaluate( hostEntity, corner, y );
 
  226    const Implementation &asImp ()
 const 
  228      return static_cast< const Implementation & 
>( *this );
 
  231    Implementation &asImp ()
 
  233      return static_cast< Implementation & 
>( *this );
 
  245  template< 
class ct, 
unsigned int dimR, 
class Impl >
 
  260    This &operator= ( 
const This & ) = 
default;
 
  261    This &operator= ( 
This && ) = 
default;
 
  267    template< 
class HostEntity >
 
  268    void evaluate ( 
const HostEntity &hostEntity, 
unsigned int corner,
 
  280    template< 
class CoordFunctionInterface >
 
  281    struct isCoordFunctionInterface
 
  283      static const bool value = 
false;
 
  286    template< 
class ct, 
unsigned int dimD, 
unsigned int dimR, 
class Impl >
 
  287    struct isCoordFunctionInterface
 
  288    < AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
 
  290      static const bool value = 
true;
 
  293    template< 
class ct, 
unsigned int dimR, 
class Impl >
 
  294    struct isCoordFunctionInterface
 
  295    < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
 
  297      static const bool value = 
true;
 
  305    template< 
class CoordFunctionInterface >
 
  306    struct isDiscreteCoordFunctionInterface
 
  308      static const bool value = 
false;
 
  311    template< 
class ct, 
unsigned int dimR, 
class Impl >
 
  312    struct isDiscreteCoordFunctionInterface
 
  313    < DiscreteCoordFunctionInterface< ct, dimR, Impl > >
 
  315      static const bool value = 
true;
 
  323    template< 
class CoordFunctionInterface >
 
  324    struct AdaptCoordFunction
 
  326      static void adapt ( CoordFunctionInterface & )
 
  330    template< 
class ct, 
unsigned int dimR, 
class Impl >
 
  331    struct AdaptCoordFunction< DiscreteCoordFunctionInterface< ct, dimR, Impl > >
 
  333      typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
 
  335      static void adapt ( CoordFunctionInterface &coordFunction )
 
  337        coordFunction.adapt();
 
Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
Definition: coordfunction.hh:44
 
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition: coordfunction.hh:64
 
void evaluate(const DomainVector &x, RangeVector &y) const
evaluate method for global mapping
 
static const unsigned int dimRange
dimension of the range vector
Definition: coordfunction.hh:59
 
ct ctype
field type of the coordinate vector
Definition: coordfunction.hh:54
 
static const unsigned int dimDomain
dimension of the range vector (dimensionworld of host grid)
Definition: coordfunction.hh:57
 
FieldVector< ctype, dimDomain > DomainVector
domain vector for the evaluate method
Definition: coordfunction.hh:62
 
Derive an implementation of an analytical coordinate function from this class.
Definition: coordfunction.hh:134
 
Interface class for using a discrete function to define the geometry of a Dune::GeometryGrid....
Definition: coordfunction.hh:175
 
static const unsigned int dimRange
dimension of the range vector
Definition: coordfunction.hh:188
 
void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
evaluate method
Definition: coordfunction.hh:211
 
ct ctype
field type of the coordinate vector
Definition: coordfunction.hh:185
 
void adapt()
method called from grid.adapt() method to allow adaptation of the discrete coordinate function
Definition: coordfunction.hh:220
 
FieldVector< ctype, dimRange > RangeVector
range vector for the evaluate method
Definition: coordfunction.hh:191
 
Derive an implementation of a discrete coordinate function from this class.
Definition: coordfunction.hh:248
 
vector space out of a tensor product of fields.
Definition: fvector.hh:97
 
Implements a vector constructed from a given type representing a field and a compile-time given size.
 
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
Detects whether Op<Args...> is valid.
Definition: type_traits.hh:145
 
Dune namespace.
Definition: alignedallocator.hh:13