1#ifndef DUNE_FEM_OPERATOR_PROJECTION_LOCAL_RIESZ_ORTHONORMAL_HH
2#define DUNE_FEM_OPERATOR_PROJECTION_LOCAL_RIESZ_ORTHONORMAL_HH
9#include <dune/geometry/referenceelements.hh>
11#include "localrieszprojection.hh"
22 template<
class BasisFunctionSet >
23 class OrthonormalLocalRieszProjection
24 :
public LocalRieszProjection< BasisFunctionSet, OrthonormalLocalRieszProjection< BasisFunctionSet > >
26 typedef OrthonormalLocalRieszProjection< BasisFunctionSet > ThisType;
27 typedef LocalRieszProjection< BasisFunctionSet, OrthonormalLocalRieszProjection< BasisFunctionSet > > BaseType;
41 explicit OrthonormalLocalRieszProjection (
const BasisFunctionSetType &basisFunctionSet )
42 : basisFunctionSet_(
std::forward< BasisFunctionSetType >( basisFunctionSet ) ),
43 factor_( ratio( basisFunctionSet.entity().geometry() ) )
46 explicit OrthonormalLocalRieszProjection ( BasisFunctionSetType &&basisFunctionSet )
47 : basisFunctionSet_(
std::forward< BasisFunctionSetType >( basisFunctionSet ) ),
48 factor_( ratio( basisFunctionSet.entity().geometry() ) )
57 OrthonormalLocalRieszProjection (
const ThisType & ) =
default;
59 OrthonormalLocalRieszProjection ( ThisType &&other )
60 : basisFunctionSet_(
std::move( other.basisFunctionSet_ ) ),
61 factor_( other.factor_ )
64 ThisType &operator= (
const ThisType & ) =
default;
66 ThisType &operator= ( ThisType &&other )
68 basisFunctionSet_ = std::move( other.basisFunctionSet_ );
69 factor_( other.factor_ );
80 BasisFunctionSetType basisFunctionSet ()
const
82 return basisFunctionSet_;
86 template<
class F,
class LocalDofVector >
87 void apply (
const F &f, LocalDofVector &dofs )
const
89 assert( f.size() == dofs.size() );
90 const std::size_t
size = dofs.size();
91 for( std::size_t i = 0u; i <
size; ++i )
92 dofs[ i ] = factor_*f[ i ];
98 template<
class Geometry >
99 static RangeFieldType ratio (
const Geometry &geometry )
101 assert( geometry.affine() );
107 BasisFunctionSetType basisFunctionSet_;
108 RangeFieldType factor_;
FunctionSpaceTraits::RangeFieldType RangeFieldType
Intrinsic type used for values in the range field (usually a double)
Definition: functionspaceinterface.hh:63
BasisFunctionSet BasisFunctionSetType
basis function set
Definition: localrieszprojection.hh:26
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
static const ReferenceElement & general(const GeometryType &type)
get general reference elements
Definition: referenceelements.hh:156