1 #ifndef DUNE_FEM_VECTORFUNCTION_HH 2 #define DUNE_FEM_VECTORFUNCTION_HH 4 #include <dune/common/typetraits.hh> 24 template <
class DiscreteFunctionSpace,
class Vector >
30 template<
typename DiscreteFunctionSpace,
typename Vector >
33 SimpleBlockVector< Vector, DiscreteFunctionSpace::localBlockSize > >
43 template <
class DiscreteFunctionSpace,
class Vector >
46 VectorDiscreteFunction< DiscreteFunctionSpace, Vector > >
58 using BaseType::assign;
61 const DiscreteFunctionSpaceType &space,
63 : BaseType( name, space ),
70 : BaseType(
"copy of " + other.name(), other.space() ),
72 dofVector_( allocateDofVector( other.space() ) )
78 const DofVectorType&
dofVector()
const {
return dofVector_; }
84 vec_.reset(
new VectorType( space.size() ) );
89 std::unique_ptr< VectorType >
vec_;
97 namespace Capabilities
100 template<
class DiscreteFunctionSpace,
class DofVector >
114 #endif // #ifndef DUNE_FEM_VECTORFUNCTION_HH
MutableLocalFunction< DiscreteFunctionType > LocalFunctionType
Definition: vectorfunction/vectorfunction.hh:36
VectorType & allocateDofVector(const DiscreteFunctionSpaceType &space)
Definition: vectorfunction/vectorfunction.hh:82
VectorDiscreteFunction(const VectorDiscreteFunction &other)
Definition: vectorfunction/vectorfunction.hh:69
Definition: vectorfunction/vectorfunction.hh:25
BaseType::DofType DofType
Definition: vectorfunction/vectorfunction.hh:56
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
Definition: vectorfunction/vectorfunction.hh:53
Traits class for a DiscreteFunction.
Definition: discretefunction.hh:60
DofVectorType::DofContainerType DofContainerType
Definition: vectorfunction/vectorfunction.hh:55
BaseType::DofVectorType DofVectorType
Definition: vectorfunction/vectorfunction.hh:54
DofVectorType & dofVector()
Definition: vectorfunction/vectorfunction.hh:77
VectorDiscreteFunction< DiscreteFunctionSpace, Vector > DiscreteFunctionType
Definition: vectorfunction/vectorfunction.hh:35
DofVectorType dofVector_
Definition: vectorfunction/vectorfunction.hh:91
Vector VectorType
Definition: vectorfunction/vectorfunction.hh:52
Definition: discretefunction.hh:63
This file implements a dense vector with a dynamic size.
std::unique_ptr< VectorType > vec_
Definition: vectorfunction/vectorfunction.hh:89
Definition: coordinate.hh:4
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: discretefunction.hh:571
Definition: discretefunction.hh:1034
const DofVectorType & dofVector() const
Definition: vectorfunction/vectorfunction.hh:78
Traits::DofVectorType DofVectorType
type of DofVector
Definition: discretefunction.hh:596
BaseType::DofType DofType
Definition: discretefunction.hh:613
VectorDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &space, VectorType &vector)
Definition: vectorfunction/vectorfunction.hh:60