1 #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_MUTABLE_HH 2 #define DUNE_FEM_FUNCTION_LOCALFUNCTION_MUTABLE_HH 18 struct DiscreteFunctionTraits;
21 class ConstLocalFunction;
30 template <
class DiscreteFunction >
31 class MutableLocalFunction
32 :
public LocalFunction< typename DiscreteFunctionTraits< DiscreteFunction > :: DiscreteFunctionSpaceType :: BasisFunctionSetType,
33 typename DiscreteFunctionTraits< DiscreteFunction > :: LocalDofVectorType >
35 typedef MutableLocalFunction< DiscreteFunction > ThisType;
36 typedef LocalFunction< typename DiscreteFunctionTraits< DiscreteFunction > :: DiscreteFunctionSpaceType :: BasisFunctionSetType,
54 : BaseType( constLocalFunction.basisFunctionSet(),
LocalDofVectorType( constLocalFunction.discreteFunction_.localDofVectorAllocator() ) ),
55 discreteFunction_( &const_cast< DiscreteFunctionType& >( constLocalFunction.discreteFunction() ) )
62 : BaseType( LocalDofVectorType( discreteFunction.localDofVectorAllocator() ) ),
63 discreteFunction_( &discreteFunction )
68 : BaseType( LocalDofVectorType( discreteFunction.localDofVectorAllocator() ) ),
69 discreteFunction_( &const_cast<DiscreteFunctionType &>( discreteFunction ) )
74 : BaseType( discreteFunction.space().
basisFunctionSet( entity ), LocalDofVectorType( discreteFunction.localDofVectorAllocator() ) ),
75 discreteFunction_( &discreteFunction )
82 : BaseType( dFunction.space().
basisFunctionSet( entity ), LocalDofVectorType( dFunction.localDofVectorAllocator() ) ),
83 discreteFunction_( &const_cast<DiscreteFunctionType &>( dFunction ) )
90 : BaseType( static_cast< const BaseType& > ( other ) ),
91 discreteFunction_( other.discreteFunction_ )
96 : BaseType( static_cast< BaseType&& > ( other ) ),
97 discreteFunction_( other.discreteFunction_ )
101 ThisType &
operator= (
const ThisType & ) =
delete;
102 ThisType &
operator= ( ThisType && ) =
delete;
116 DiscreteFunctionType *discreteFunction_;
123 #endif // #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_MUTABLE_HH BaseType::LocalDofVectorType LocalDofVectorType
type of local Dof vector object
Definition: mutable.hh:47
MutableLocalFunction(const DiscreteFunctionType &dFunction, const EntityType &entity)
Constructor creating local function from given discrete function and entity, not empty.
Definition: mutable.hh:81
MutableLocalFunction(ThisType &&other)
move constructor
Definition: mutable.hh:95
MutableLocalFunction(DiscreteFunctionType &discreteFunction, const EntityType &entity)
Constructor creating local function from given discrete function and entity, not empty.
Definition: mutable.hh:73
BaseType::BasisFunctionSetType BasisFunctionSetType
type of BasisFunctionSet
Definition: mutable.hh:50
const BasisFunctionSetType & basisFunctionSet() const
obtain the basis function set for this local function
Definition: localfunction.hh:279
void init(const EntityType &entity)
Definition: mutable.hh:106
DiscreteFunction DiscreteFunctionType
type of DiscreteFunction
Definition: mutable.hh:41
BasisFunctionSetType::EntityType EntityType
type of the entity, the local function lives on is given by the space
Definition: localfunction.hh:59
BaseType::EntityType EntityType
type of the entity, the local function lives on is given by the space
Definition: mutable.hh:44
Definition: coordinate.hh:4
const DiscreteFunctionType & discreteFunction() const
Definition: mutable.hh:112
MutableLocalFunction(const DiscreteFunctionType &discreteFunction)
Constructor creating empty local function from given discrete function.
Definition: mutable.hh:67
const EntityType & entity() const
obtain the entity, this local function lives on
Definition: localfunction.hh:285
MutableLocalFunction(const ThisType &other)
copy constructor
Definition: mutable.hh:89
LocalDofVector LocalDofVectorType
type of local Dof Vector
Definition: localfunction.hh:50
A constant local function carrying values for one entity.
Definition: const.hh:31
void init(const BasisFunctionSetType &basisFunctionSet)
Definition: localfunction.hh:288
MutableLocalFunction(DiscreteFunctionType &discreteFunction)
Constructor creating empty local function from given discrete function.
Definition: mutable.hh:61
MutableLocalFunction(const ConstLocalFunction< DiscreteFunctionType > &constLocalFunction)
cast from ConstLocalFunction
Definition: mutable.hh:53
ThisType & operator=(const ThisType &)=delete
Definition: basisfunctionset/basisfunctionset.hh:31
DiscreteFunctionType & discreteFunction()
Definition: mutable.hh:113
const LocalDofVectorType & localDofVector() const
return const reference to local Dof Vector
Definition: localfunction.hh:386