1#ifndef DUNE_FEM_DISCRETEFUNCTION_HH
2#define DUNE_FEM_DISCRETEFUNCTION_HH
12#include <dune/common/dynvector.hh>
60 template<
class DiscreteFunction >
63 template<
class Traits >
81 template<
class Impl >
83 :
public Fem::Function< typename DiscreteFunctionTraits< Impl >::DiscreteFunctionSpaceType::FunctionSpaceType, Impl >,
111 typedef typename DiscreteFunctionSpaceType :: DomainType
DomainType;
113 typedef typename DiscreteFunctionSpaceType :: RangeType
RangeType;
119 typedef typename GridPartType::GridViewType
GridView;
122 typedef typename DiscreteFunctionSpaceType :: GridType
GridType;
145 typedef typename DiscreteFunctionSpaceType::LocalBlockIndices
BlockIndices;
150 template<
class Operation >
153 typedef typename DiscreteFunctionSpaceType
159 typedef typename DiscreteFunctionSpaceType :: EntityType
EntityType;
175 return asImp().dofVector();
179 return asImp().dofVector();
186 const std::string &
name ()
const
188 return asImp().name();
197 return asImp().name();
204 return asImp().order();
210 return asImp().continuous();
216 return asImp().space();
222 return asImp().gridPart();
230 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
233 return asImp().localFunction( entity );
241 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
244 return asImp().localFunction( entity );
253 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
256 return asImp().localFunction();
266 template<
class LocalDofs >
269 asImp().addScaledLocalDofs( entity, s, localDofs );
277 template<
class LocalDofs >
280 asImp().addLocalDofs( entity, localDofs );
288 template<
class LocalDofs >
291 asImp().setLocalDofs( entity, localDofs );
301 template<
class Vector >
304 asImp().getLocalDofs( entity, localDofs );
313 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
316 return asImp().localFunction();
335 return asImp().size();
347 return asImp().blocks();
356 return asImp().dbegin ();
365 return asImp().dend ();
374 return asImp().dbegin ();
383 return asImp().dend ();
395 asImp().axpy( s, g );
411 template <
class DFType>
414 return asImp().scalarProductDofs( other.
asImp() );
430 return asImp().normSquaredDofs( );
447 return asImp().dofsValid();
454 template <
class DFType >
461 template<
class Operation >
464 return asImp().dataHandle( operation );
473 template <
class DFType>
476 return asImp().compare( g );
485 template <
class DFType >
488 return asImp().operator+=( g );
497 template <
class DFType >
500 return asImp().operator-=( g );
511 return asImp() *= scalar;
522 return asImp() /= scalar;
532 template<
class StreamTraits >
542 template<
class StreamTraits >
554 asImp().enableDofCompression();
580 template<
class Impl >
589 typedef typename BaseType :: Traits
Traits;
612 typedef typename DiscreteFunctionSpaceType :: DomainType
DomainType;
614 typedef typename DiscreteFunctionSpaceType :: RangeType
RangeType;
656 template<
class Operation >
699 return space().order();
705 return space().continuous();
715 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
719 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
723 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
727 [[deprecated(
"Use {Const,Temporary,Mutable}LocalFunction and LocalContribution instead!")]]
782 template <
class DFType>
792 template <
class DFType>
801 return std::real( (*this).scalarProductDofs( *
this ));
805 void print ( std :: ostream &
out )
const;
811 template <
class DFType>
821 template<
class Operation >
828 if( ! Fem :: MPIManager :: singleThreadMode() )
830 assert( Fem :: MPIManager :: singleThreadMode() );
831 DUNE_THROW(InvalidStateException,
"DiscreteFunctionInterface::communicate: only call in single thread mode!");
860 template <
class DFType>
871 template <
class DFType>
905 template<
class StreamTraits >
909 template<
class StreamTraits >
921 template<
class LocalDofs >
929 template<
class LocalDofs >
937 template<
class LocalDofs >
945 template<
class Vector >
952 template <
class DFType>
970 template<
class AssembleOperation >
973 const std::type_index id(
typeid( AssembleOperation ) );
977 DUNE_THROW( InvalidStateException,
"Another assemble operation in progress" );
980 AssembleOperation::begin(
asImp() );
988 template<
class AssembleOperation >
991 const std::type_index id(
typeid( AssembleOperation ) );
993 DUNE_THROW( InvalidStateException,
"Assemble operation not in progress" );
997 AssembleOperation::end(
asImp() );
1014 write( PersistenceManager :: backupStream() );
1021 read( PersistenceManager :: restoreStream() );
1031 template<
class Functor >
1037 std::shared_ptr< const DiscreteFunctionSpaceType >
dfSpace_;
1052 template<
class ImplX,
class ImplY >
1058 template<
class ImplX,
class ImplY >
1065 template<
class DiscreteFunction >
1068 template<
class DiscreteFunction >
1079 template<
typename DiscreteFunctionSpace,
typename DofVector >
1085 typedef typename DiscreteFunctionSpaceType::DomainType
DomainType;
1086 typedef typename DiscreteFunctionSpaceType::RangeType
RangeType;
1095 typedef typename DiscreteFunctionSpaceType::BlockMapperType
MapperType;
1096 typedef typename DofVectorType::FieldType
DofType;
bool operator==(const DiscreteFunctionInterface< ImplX > &x, const DiscreteFunctionInterface< ImplY > &y)
Definition: common/discretefunction.hh:1053
bool operator!=(const DiscreteFunctionInterface< ImplX > &x, const DiscreteFunctionInterface< ImplY > &y)
Definition: common/discretefunction.hh:1059
RangeFieldType scalarProductDofs(const DiscreteFunctionType &x, const OtherDiscreteFunctionType &y) const
evaluate scalar product and omit auxiliary nodes
Definition: common/scalarproducts.hh:109
double real(const complex< Dune::Fem::Double > &x)
Definition: double.hh:983
Definition: bindguard.hh:11
static DofBlockFunctor< DofVector, Functor > dofBlockFunctor(DofVector &dofVector, Functor functor)
Definition: function/common/functor.hh:132
Definition: stackallocator.hh:61
base class for determing whether a class is a discrete function or not
Definition: common/discretefunction.hh:53
base class for determing whether a function has local functions or not
Definition: common/discretefunction.hh:57
Traits class for a DiscreteFunction.
Definition: common/discretefunction.hh:61
Definition: common/discretefunction.hh:584
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: common/discretefunction.hh:703
DiscreteFunctionType & operator*=(const RangeFieldType &scalar)
multiply all DoFs with a scalar factor
Definition: common/discretefunction.hh:887
void evaluate(const DomainType &x, RangeType &value) const
Definition: common/discretefunction.hh:838
DiscreteFunctionType & operator+=(const DiscreteFunctionType &g)
add another discrete function to this one
Definition: common/discretefunction.hh:864
std::string name_
Definition: common/discretefunction.hh:1045
LocalDofVectorAllocatorType ldvAllocator_
Definition: common/discretefunction.hh:1041
void endAssemble()
Finalize the assemble of values using the LocalContribution concept.
Definition: common/discretefunction.hh:989
Traits::DofVectorType DofVectorType
type of DofVector
Definition: common/discretefunction.hh:631
DofIteratorType dend()
Obtain the non-constant iterator pointing to the last dof.
Definition: common/discretefunction.hh:779
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: common/discretefunction.hh:799
void print(std ::ostream &out) const
print all DoFs to a stream (for debugging purposes)
Definition: discretefunction_inline.hh:90
DiscreteFunctionSpaceType::HessianRangeType HessianRangeType
type of hessian
Definition: common/discretefunction.hh:618
SizeType size() const
Return the number of blocks in the block vector.
Definition: common/discretefunction.hh:755
BaseType::ConstDofBlockType ConstDofBlockType
Definition: common/discretefunction.hh:643
void hessian(const DomainType &x, HessianRangeType &hessian) const
evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const
Definition: common/discretefunction.hh:853
Impl DiscreteFunctionType
type of the discrete function (Barton-Nackman parameter)
Definition: common/discretefunction.hh:592
BaseType::Traits Traits
Definition: common/discretefunction.hh:589
BaseType::LocalFunctionType LocalFunctionType
type of local functions
Definition: common/discretefunction.hh:639
ScalarProductType scalarProduct_
Definition: common/discretefunction.hh:1046
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: common/discretefunction.hh:709
DiscreteFunctionType & operator-=(const DiscreteFunctionInterface< DFType > &g)
substract all degrees of freedom from given discrete function using the dof iterators
Definition: discretefunction_inline.hh:199
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: discretefunction_inline.hh:273
void communicate()
do default communication of space for this discrete function
Definition: common/discretefunction.hh:825
BaseType::GridPartType GridPartType
type of the underlying grid part
Definition: common/discretefunction.hh:609
DiscreteFunctionType & operator+=(const DiscreteFunctionInterface< DFType > &g)
add another discrete function to this one
Definition: discretefunction_inline.hh:182
void clear()
set all degrees of freedom to zero
Definition: common/discretefunction.hh:731
Traits::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
type of LocalDofVector
Definition: common/discretefunction.hh:636
BaseType::EntityType EntityType
Definition: common/discretefunction.hh:647
Traits::ConstDofIteratorType ConstDofIteratorType
type of the const dof iterator
Definition: common/discretefunction.hh:628
DofVectorType & dofVector()
Definition: common/discretefunction.hh:733
void getLocalDofs(const EntityType &entity, Vector &localDofs) const
fill local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:946
BaseType::DiscreteFunctionInterfaceType DiscreteFunctionInterfaceType
Definition: common/discretefunction.hh:594
void beginAssemble()
Initiate the assemble of values using the LocalContribution concept.
Definition: common/discretefunction.hh:971
ConstDofIteratorType dbegin() const
Obtain the constant iterator pointing to the first dof.
Definition: common/discretefunction.hh:761
bool dofsValid() const
check for NaNs
Definition: discretefunction_inline.hh:100
int blocks() const
obtain total number of blocks, i.e. size / blockSize.
Definition: common/discretefunction.hh:737
const DofVectorType & dofVector() const
Definition: common/discretefunction.hh:734
BaseType::DofType DofType
Definition: common/discretefunction.hh:649
void addScaledLocalDofs(const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
add scaled local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:922
DofVectorType::SizeType SizeType
size type of the block vector
Definition: common/discretefunction.hh:652
ThisType & operator=(ThisType &&)=delete
const std::string & name() const
obtain the name of the discrete function
Definition: common/discretefunction.hh:691
Traits::LocalDofVectorType LocalDofVectorType
type of LocalDofVector
Definition: common/discretefunction.hh:634
const LocalFunctionType localFunction() const
obtain an uninitialized local function (read-write)
Definition: common/discretefunction.hh:728
std::type_index assembleOperation_
Definition: common/discretefunction.hh:1048
ConstDofBlockPtrType block(unsigned int index) const
Definition: common/discretefunction.hh:746
bool compare(const DiscreteFunctionInterface< DFType > &g) const
Definition: discretefunction_inline.hh:344
void addLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
add local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:930
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done...
Definition: common/discretefunction.hh:916
void evaluateGlobal(const DomainType &x, Functor functor) const
evaluate functor in global coordinate
Definition: discretefunction_inline.hh:161
ConstDofIteratorType dend() const
Obtain the constant iterator pointing to the last dof.
Definition: common/discretefunction.hh:773
DiscreteFunctionSpaceType::RangeType RangeType
type of range vector
Definition: common/discretefunction.hh:614
LocalFunctionType::LocalCoordinateType LocalCoordinateType
Definition: common/discretefunction.hh:640
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: discretefunction_inline.hh:215
TemporaryLocalFunctionType localFunction_
Definition: common/discretefunction.hh:1043
Traits::LocalDofVectorStackType ldvStack_
Definition: common/discretefunction.hh:1040
DofBlockPtrType block(unsigned int index)
Definition: common/discretefunction.hh:740
DofIteratorType dbegin()
Obtain the non-constant iterator pointing to the first dof.
Definition: common/discretefunction.hh:767
virtual void insertSubData()
Definition: discretefunction_inline.hh:310
TemporaryLocalFunction< DiscreteFunctionSpaceType > TemporaryLocalFunctionType
Definition: common/discretefunction.hh:664
DiscreteFunctionType & operator/=(const RangeFieldType &scalar)
devide all DoFs by a scalar factor
Definition: common/discretefunction.hh:899
Traits::DofIteratorType DofIteratorType
type of the dof iterator
Definition: common/discretefunction.hh:626
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: common/discretefunction.hh:712
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: common/discretefunction.hh:606
virtual void backup() const
Definition: common/discretefunction.hh:1011
void assign(const DiscreteFunctionInterface< DFType > &g)
Definition: discretefunction_inline.hh:132
LocalFunctionType localFunction()
obtain an uninitialized local function (read-write)
Definition: common/discretefunction.hh:724
BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: common/discretefunction.hh:645
virtual void removeSubData()
Definition: discretefunction_inline.hh:326
LocalDofVectorAllocatorType & localDofVectorAllocator() const
obtain the local function storage
Definition: common/discretefunction.hh:962
void jacobian(const DomainType &x, JacobianRangeType &jacobian) const
Definition: common/discretefunction.hh:845
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: common/discretefunction.hh:720
DiscreteFunctionSpaceType::DomainType DomainType
type of domain vector
Definition: common/discretefunction.hh:612
CommDataHandle< Operation >::Type dataHandle(const Operation &operation)
return reference to data handle object
ParallelScalarProduct< DiscreteFunctionInterfaceType > ScalarProductType
Definition: common/discretefunction.hh:602
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field (usually a float type)
Definition: common/discretefunction.hh:623
void getLocalDofReferences(const EntityType &entity, LocalDofVectorType &localDofs)
get local Dofs and store a reference to it in the LocalDofVector
Definition: common/discretefunction.hh:1003
static constexpr std::size_t blockSize
size of the dof blocks
Definition: common/discretefunction.hh:148
BaseType::DofBlockPtrType DofBlockPtrType
Definition: common/discretefunction.hh:644
DiscreteFunctionType & operator-=(const DiscreteFunctionType &g)
substract all degrees of freedom from given discrete function using the dof iterators
Definition: common/discretefunction.hh:875
virtual void restore()
Definition: common/discretefunction.hh:1018
void axpy(const RangeFieldType &s, const DiscreteFunctionInterface< DFType > &g)
axpy operation
Definition: discretefunction_inline.hh:116
std::string & name()
obtain the name of the discrete function
Definition: common/discretefunction.hh:694
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field (usually a float type)
Definition: common/discretefunction.hh:621
std::size_t assembleCount_
Definition: common/discretefunction.hh:1049
BaseType::DofBlockType DofBlockType
Definition: common/discretefunction.hh:642
std::shared_ptr< const DiscreteFunctionSpaceType > dfSpace_
Definition: common/discretefunction.hh:1037
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: common/discretefunction.hh:786
void assign(const DiscreteFunctionType &g)
Definition: common/discretefunction.hh:815
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: common/discretefunction.hh:793
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian
Definition: common/discretefunction.hh:616
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: common/discretefunction.hh:716
void setLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
set local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:938
constexpr int order() const
obtain an upper bound on the polynomial order of the underlying space.
Definition: common/discretefunction.hh:697
Definition: common/discretefunction.hh:86
DofVectorType & dofVector()
Definition: common/discretefunction.hh:173
Traits::ConstDofIteratorType ConstDofIteratorType
type of the constantdof iterator used in the discrete function implementation
Definition: common/discretefunction.hh:134
DiscreteFunctionInterface< Impl > DiscreteFunctionInterfaceType
type of the discrete function interface (this type)
Definition: common/discretefunction.hh:104
DofIteratorType dbegin()
obtain an iterator pointing to the first DoF (read-write)
Definition: common/discretefunction.hh:372
BaseType::MappingType MappingType
type of mapping base class for this discrete function
Definition: common/discretefunction.hh:143
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: common/discretefunction.hh:412
void addLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
add local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:278
Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of associated discrete function space
Definition: common/discretefunction.hh:98
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian, i.e. type of evaluated gradient
Definition: common/discretefunction.hh:115
DiscreteFunctionType & operator/=(const RangeFieldType &scalar)
devide all DoFs by a scalar factor
Definition: common/discretefunction.hh:520
DiscreteFunctionSpaceType::LocalBlockIndices BlockIndices
Definition: common/discretefunction.hh:145
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: common/discretefunction.hh:231
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: common/discretefunction.hh:393
DiscreteFunctionTraits< Impl > Traits
type of the traits
Definition: common/discretefunction.hh:92
int blocks() const
obtain total number of blocks, i.e. size / blockSize.
Definition: common/discretefunction.hh:345
void addScaledLocalDofs(const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
add scaled local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:267
void clear()
set all degrees of freedom to zero
Definition: common/discretefunction.hh:320
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done...
Definition: common/discretefunction.hh:552
DiscreteFunctionType & operator+=(const DiscreteFunctionInterface< DFType > &g)
add another discrete function to this one
Definition: common/discretefunction.hh:486
DiscreteFunctionType & operator-=(const DiscreteFunctionInterface< DFType > &g)
substract all degrees of freedom from given discrete function using the dof iterators
Definition: common/discretefunction.hh:498
DefaultLoadBalanceContainsCheckType defaultLoadBalanceContainsCheck() const
Definition: common/discretefunction.hh:559
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: common/discretefunction.hh:543
const LocalFunctionType localFunction() const
obtain an uninitialized local function (read-write)
Definition: common/discretefunction.hh:314
ConstDofIteratorType dbegin() const
obtain an iterator pointing to the first DoF (read-only)
Definition: common/discretefunction.hh:354
DiscreteFunctionInterface()=default
default constructor
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: common/discretefunction.hh:208
ThisType & operator=(ThisType &&)=delete
GridPartType::GridViewType GridView
Definition: common/discretefunction.hh:119
void print(std ::ostream &out) const
print all DoFs to a stream (for debugging purposes)
Definition: common/discretefunction.hh:437
LoadBalanceLeafData< ThisType > DefaultLoadBalanceContainsCheckType
Definition: common/discretefunction.hh:558
Traits::DofVectorType DofVectorType
type of the dof vector used in the discrete function implementation
Definition: common/discretefunction.hh:128
Traits::DofBlockType DofBlockType
Definition: common/discretefunction.hh:137
const std::string & name() const
obtain the name of the discrete function
Definition: common/discretefunction.hh:186
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: common/discretefunction.hh:533
void getLocalDofs(const EntityType &entity, Vector &localDofs) const
fill local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:302
CommDataHandle< Operation >::Type dataHandle(const Operation &operation)
return reference to data handle object
Definition: common/discretefunction.hh:462
bool dofsValid() const
check for NaNs
Definition: common/discretefunction.hh:445
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field, i.e. type of coordinate component
Definition: common/discretefunction.hh:107
LocalFunctionType localFunction()
obtain an uninitialized local function (read-write)
Definition: common/discretefunction.hh:254
DiscreteFunctionInterface(ThisType &&)=default
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: common/discretefunction.hh:242
Traits::LocalFunctionType LocalFunctionType
type of local functions
Definition: common/discretefunction.hh:125
DiscreteFunctionInterface(const ThisType &)=default
const DofVectorType & dofVector() const
Definition: common/discretefunction.hh:177
ConstDofIteratorType dend() const
obtain an iterator pointing behind the last DoF (read-only)
Definition: common/discretefunction.hh:363
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: common/discretefunction.hh:220
DiscreteFunctionSpaceType::GridType GridType
type of the underlying grid
Definition: common/discretefunction.hh:122
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field, i.e. dof type
Definition: common/discretefunction.hh:109
Traits::DofBlockPtrType DofBlockPtrType
Definition: common/discretefunction.hh:139
Traits::DofIteratorType DofIteratorType
type of the dof iterator used in the discrete function implementation
Definition: common/discretefunction.hh:131
Traits::ConstDofBlockType ConstDofBlockType
Definition: common/discretefunction.hh:138
DiscreteFunctionType & operator*=(const RangeFieldType &scalar)
multiply all DoFs by a scalar factor
Definition: common/discretefunction.hh:509
Traits::DiscreteFunctionType DiscreteFunctionType
type of the implementaton (Barton-Nackman)
Definition: common/discretefunction.hh:95
DiscreteFunctionSpaceType::EntityType EntityType
type of entity local functions are defined on
Definition: common/discretefunction.hh:159
DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
type of associated function space
Definition: common/discretefunction.hh:101
bool compare(const DiscreteFunctionInterface< DFType > &g) const
Definition: common/discretefunction.hh:474
std::string & name()
obtain the name of the discrete function
Definition: common/discretefunction.hh:195
DiscreteFunctionSpaceType::DomainType DomainType
type of domain, i.e. type of coordinates
Definition: common/discretefunction.hh:111
DiscreteFunctionSpaceType::RangeType RangeType
type of range, i.e. result of evaluation
Definition: common/discretefunction.hh:113
Traits::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: common/discretefunction.hh:140
Traits::DofType DofType
Definition: common/discretefunction.hh:136
DofIteratorType dend()
obtain an iterator pointing behind the last DoF (read-write)
Definition: common/discretefunction.hh:381
DiscreteFunctionSpaceType::GridPartType GridPartType
type of the underlying grid part
Definition: common/discretefunction.hh:118
static constexpr std::size_t blockSize
size of the dof blocks
Definition: common/discretefunction.hh:148
const std::string & order() const
obtain an upper bound on the polynomial order of the underlying space.
Definition: common/discretefunction.hh:202
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: common/discretefunction.hh:214
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: common/discretefunction.hh:428
void assign(const DiscreteFunctionInterface< DFType > &g)
assign the DoFs of another discrete function to this one
Definition: common/discretefunction.hh:455
void setLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
set local Dofs to dof vector associated with the entity
Definition: common/discretefunction.hh:289
int size() const
obtain total number of DoFs
Definition: common/discretefunction.hh:333
void communicate()
do default communication of space for this discrete function
Definition: common/discretefunction.hh:468
Definition: common/discretefunction.hh:152
DiscreteFunctionSpaceType::template CommDataHandle< DiscreteFunctionType, Operation >::Type Type
Definition: common/discretefunction.hh:155
Definition: common/discretefunction.hh:659
Definition: common/discretefunction.hh:1066
Definition: common/discretefunction.hh:1081
DofVectorType::ConstIteratorType ConstDofIteratorType
Definition: common/discretefunction.hh:1089
StackAllocator< DofType, LocalDofVectorStackType * > LocalDofVectorAllocatorType
Definition: common/discretefunction.hh:1099
ThreadSafeValue< UninitializedObjectStack > LocalDofVectorStackType
Definition: common/discretefunction.hh:1098
DofVector DofVectorType
Definition: common/discretefunction.hh:1082
DynamicReferenceVector< DofType, LocalDofVectorAllocatorType > LocalDofVectorType
Definition: common/discretefunction.hh:1100
DofVectorType::ConstDofBlockType ConstDofBlockType
Definition: common/discretefunction.hh:1091
DiscreteFunctionSpaceType::BlockMapperType MapperType
Definition: common/discretefunction.hh:1095
DofVectorType::IteratorType DofIteratorType
Definition: common/discretefunction.hh:1088
DiscreteFunctionSpaceType::DomainType DomainType
Definition: common/discretefunction.hh:1085
DofVectorType::FieldType DofType
Definition: common/discretefunction.hh:1096
DiscreteFunctionSpace DiscreteFunctionSpaceType
Definition: common/discretefunction.hh:1084
DiscreteFunctionSpaceType::RangeType RangeType
Definition: common/discretefunction.hh:1086
DofVectorType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: common/discretefunction.hh:1093
DofVectorType::DofBlockPtrType DofBlockPtrType
Definition: common/discretefunction.hh:1092
DofVectorType::DofBlockType DofBlockType
Definition: common/discretefunction.hh:1090
Abstract class representing a function.
Definition: common/function.hh:50
const Implementation & asImp() const
Definition: bartonnackmaninterface.hh:37
Definition: function/common/functor.hh:23
Definition: function/common/functor.hh:43
Definition: function/common/functor.hh:65
Definition: function/common/functor.hh:85
base class for persistent objects
Definition: persistencemanager.hh:101
class with singleton instance managing all persistent objects
Definition: persistencemanager.hh:141
abstract interface for an output stream
Definition: streams.hh:46
abstract interface for an input stream
Definition: streams.hh:179
static const Implementation & asImp(const ThisType &other)
Definition: bartonnackmaninterface.hh:27
Definition: misc/functor.hh:31
check for sets of entities for the load balance procedure
Definition: commoperations.hh:216
An implementation of DenseVector which uses a std::vector of references as storage.
Definition: storage/referencevector.hh:53