1#ifndef DUNE_FEM_ADAPTIVEFUNCTION_HH
2#define DUNE_FEM_ADAPTIVEFUNCTION_HH
21 template <
class DiscreteFunctionSpace>
22 class AdaptiveDiscreteFunction;
25 template <
class DiscreteFunctionSpace>
26 class PetscDiscreteFunction;
29 template<
typename DiscreteFunctionSpace >
32 SimpleBlockVector< StaticArray< typename DiscreteFunctionSpace::RangeFieldType > , DiscreteFunctionSpace::localBlockSize > >
45 template <
class DiscreteFunctionSpace>
55 typedef typename BaseType :: DofType
DofType;
153 typedef typename DofVectorType :: SizeType SizeType;
169 int size ()
const {
return dofVector_.size(); }
192 std::pair< DofStorageInterface*, DofVectorType* > memPair
198 return *(memPair.second);
static std::pair< DofStorageInterface *, DofStorageType * > allocateManagedDofStorage(const GridType &grid, const MapperType &mapper, const DofStorageType *=0)
default implementation for creating a managed dof storage
Definition: dofmanager.hh:560
Definition: bindguard.hh:11
Definition: adaptivefunction/adaptivefunction.hh:48
AdaptiveDiscreteFunction()=delete
AdaptiveDiscreteFunction(ThisType &&other)
Move constructor.
Definition: adaptivefunction/adaptivefunction.hh:113
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
Definition: adaptivefunction/adaptivefunction.hh:53
std::unique_ptr< DofStorageInterface > memObject_
Definition: adaptivefunction/adaptivefunction.hh:201
DofVectorType & dofVector_
Definition: adaptivefunction/adaptivefunction.hh:202
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done...
Definition: adaptivefunction/adaptivefunction.hh:140
AdaptiveDiscreteFunction(const ThisType &other)
Copy constructor.
Definition: adaptivefunction/adaptivefunction.hh:104
DofVectorType & allocateDofStorage(const DiscreteFunctionSpaceType &space)
Definition: adaptivefunction/adaptivefunction.hh:189
DofVectorType & allocateDofStorageWrapper(const size_t size, const DofType *v)
Definition: adaptivefunction/adaptivefunction.hh:175
const std::string & name() const
obtain the name of the discrete function
Definition: common/discretefunction.hh:691
MutableBlockVector< DynamicArray< DofType >, DiscreteFunctionSpaceType::localBlockSize > MutableDofVectorType
Definition: adaptivefunction/adaptivefunction.hh:61
AdaptiveDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &space)
Constructor to use if the vector storing the dofs does not exist yet.
Definition: adaptivefunction/adaptivefunction.hh:68
DofVectorType & dofVector()
Definition: adaptivefunction/adaptivefunction.hh:134
const DofType * leakPointer() const
Definition: adaptivefunction/adaptivefunction.hh:131
AdaptiveDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &space, const DofType *data)
Constructor to use if the vector storing the dofs already exists.
Definition: adaptivefunction/adaptivefunction.hh:81
void assign(const DiscreteFunctionInterface< DFType > &g)
Definition: discretefunction_inline.hh:132
BaseType::DofType DofType
Definition: adaptivefunction/adaptivefunction.hh:55
DofType * leakPointer()
Definition: adaptivefunction/adaptivefunction.hh:130
AdaptiveDiscreteFunction(const std::string &name, const DiscreteFunctionSpaceType &space, DofVectorType &dofVector)
Constructor to use if the vector storing the dofs already exists.
Definition: adaptivefunction/adaptivefunction.hh:95
const DofVectorType & dofVector() const
Definition: adaptivefunction/adaptivefunction.hh:137
ThisType & operator=(const ThisType &)=delete
BaseType::DofVectorType DofVectorType
Definition: adaptivefunction/adaptivefunction.hh:54
MutableLocalFunction< DiscreteFunctionType > LocalFunctionType
Definition: adaptivefunction/adaptivefunction.hh:35
AdaptiveDiscreteFunction< DiscreteFunctionSpace > DiscreteFunctionType
Definition: adaptivefunction/adaptivefunction.hh:34
wrapper class to create fake DofStorage from DofType*
Definition: adaptivefunction/adaptivefunction.hh:150
DofStorageWrapper(const SizeType size, const DofType *v)
Definition: adaptivefunction/adaptivefunction.hh:156
DofVectorType & getArray()
return array
Definition: adaptivefunction/adaptivefunction.hh:163
void enableDofCompression()
do nothing here since we are using StaticArray
Definition: adaptivefunction/adaptivefunction.hh:166
int size() const
return array's size
Definition: adaptivefunction/adaptivefunction.hh:169
Definition: defaultblockvectors.hh:346
Traits class for a DiscreteFunction.
Definition: common/discretefunction.hh:61
Definition: common/discretefunction.hh:584
SizeType size() const
Return the number of blocks in the block vector.
Definition: common/discretefunction.hh:755
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: common/discretefunction.hh:709
const std::string & name() const
obtain the name of the discrete function
Definition: common/discretefunction.hh:691
void assign(const DiscreteFunctionInterface< DFType > &g)
Definition: discretefunction_inline.hh:132
static constexpr std::size_t blockSize
size of the dof blocks
Definition: common/discretefunction.hh:148
Definition: common/discretefunction.hh:1081
Definition: cachedcommmanager.hh:47
Interface class for a dof storage object to be stored in discrete functions.
Definition: dofmanager.hh:212