1 #ifndef DUNE_FEM_SPACE_RANNACHERTUREK_LOCALINTERPOLATION_HH 2 #define DUNE_FEM_SPACE_RANNACHERTUREK_LOCALINTERPOLATION_HH 9 #include <dune/common/fvector.hh> 21 template<
class BasisFunctionSet,
class LocalInterpolation >
37 typedef std::size_t size_type;
39 template<
class LocalFunction >
40 struct LocalFunctionWrapper;
45 : basisFunctionSet_( basisFunctionSet ),
52 : basisFunctionSet_(
std::
move( other.basisFunctionSet_ ) ),
53 localInterpolation_(
std::
move( other.localInterpolation_ ) )
60 basisFunctionSet_ =
std::move( other.basisFunctionSet_ );
61 localInterpolation_ =
std::move( other.localInterpolation_ );
67 return basisFunctionSet_;
70 template<
class LocalFunction,
class LocalDofVector >
73 apply( localFunction, localDofVector );
76 template<
class LocalFunction,
class LocalDofVector >
77 void apply (
const LocalFunction &localFunction, LocalDofVector &localDofVector )
const;
84 LocalInterpolationType localInterpolation_;
92 template<
class LocalInterpolation,
class RangeVector >
93 template<
class LocalFunction >
96 LocalFunctionWrapper (
const LocalFunction &localFunction, size_type component )
97 : localFunction_( localFunction ),
98 component_( component )
101 template<
class RangeFieldType >
106 y = z[ component() ];
110 const LocalFunction &localFunction ()
const {
return localFunction_; }
112 size_type component ()
const {
return component_; }
115 size_type component_;
124 template<
class LocalInterpolation,
class RangeVector >
125 template<
class LocalFunction,
class LocalDofVector >
129 std::vector< RangeFieldType > phi;
131 for(
int k = 0; k < dimRange; ++k )
133 LocalFunctionWrapper< LocalFunction > localFunctionWrapper( localFunction, k );
136 const size_type size = phi.size();
137 for( size_type i = 0; i < size; ++i )
138 localDofVector[ i*dimRange + k ] = phi[ i ];
146 #endif // #ifndef DUNE_FEM_SPACE_RANNACHERTUREK_LOCALINTERPOLATION_HH LocalInterpolation LocalInterpolationType
Definition: rannacherturek/localinterpolation.hh:28
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeFieldType RangeFieldType
Intrinsic type used for values in the range field (usually a double)
Definition: functionspaceinterface.hh:62
A vector valued function space.
Definition: functionspace.hh:16
BasisFunctionSet BasisFunctionSetType
Definition: rannacherturek/localinterpolation.hh:27
dimension of range vector space
Definition: functionspaceinterface.hh:47
interface for local functions
Definition: localfunction.hh:41
RannacherTurekLocalInterpolation & operator=(const ThisType &)=default
RannacherTurekLocalInterpolation(const BasisFunctionSetType &basisFunctionSet, const LocalInterpolationType &localInterpolation=LocalInterpolationType())
Definition: rannacherturek/localinterpolation.hh:43
Definition: coordinate.hh:4
const LocalInterpolationType & localInterpolation() const
Definition: rannacherturek/localinterpolation.hh:80
RannacherTurekLocalInterpolation(ThisType &&other)
Definition: rannacherturek/localinterpolation.hh:51
void move(ArrayInterface< T > &array, const unsigned int oldOffset, const unsigned int newOffset, const unsigned int length)
Definition: array_inline.hh:38
void evaluate(const PointType &x, RangeType &ret) const
evaluate the local function
Definition: localfunction.hh:300
VectorSpaceTraits< DomainField, RangeField, dimD, dimR >::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:70
void apply(const LocalFunction &localFunction, LocalDofVector &localDofVector) const
Definition: rannacherturek/localinterpolation.hh:127
FunctionSpaceType::DomainType DomainType
type of domain vectors, i.e., type of coordinates
Definition: localfunction.hh:69
Definition: rannacherturek/localinterpolation.hh:22
BasisFunctionSetType basisFunctionSet() const
Definition: rannacherturek/localinterpolation.hh:65
Definition: basisfunctionset/basisfunctionset.hh:31
void operator()(const LocalFunction &localFunction, LocalDofVector &localDofVector) const
Definition: rannacherturek/localinterpolation.hh:71
FunctionSpaceType::RangeType RangeType
type of range vectors, i.e., type of function values
Definition: localfunction.hh:71