1 #ifndef DUNE_FEM_DISCRETEFUNCTION_HH 2 #define DUNE_FEM_DISCRETEFUNCTION_HH 8 #include <dune/common/version.hh> 59 template<
class DiscreteFunction >
62 template<
class Traits >
80 template<
class Impl >
82 :
public Function< typename DiscreteFunctionTraits< Impl >::DiscreteFunctionSpaceType::FunctionSpaceType, Impl >,
107 typedef typename DiscreteFunctionSpaceType :: DomainType
DomainType;
109 typedef typename DiscreteFunctionSpaceType :: RangeType
RangeType;
117 typedef typename DiscreteFunctionSpaceType :: GridType
GridType;
141 enum { blockSize = DiscreteFunctionSpaceType::localBlockSize };
143 template<
class Operation >
146 typedef typename DiscreteFunctionSpaceType
152 typedef typename DiscreteFunctionSpaceType :: EntityType
EntityType;
155 using BaseType::asImp;
164 ThisType &operator= (
const ThisType &other );
167 DofVectorType&
dofVector() {
return asImp().dofVector(); }
168 const DofVectorType&
dofVector()
const {
return asImp().dofVector(); }
174 const std::string &
name ()
const 176 return asImp().name();
180 const DiscreteFunctionSpaceType &
space ()
const 182 return asImp().space();
188 return asImp().gridPart();
198 return asImp().localFunction( entity );
208 return asImp().localFunction( entity );
228 return asImp().size();
240 return asImp().blocks();
247 inline ConstDofBlockPtrType
block (
unsigned int index )
const 249 return asImp().block( index );
256 inline DofBlockPtrType
block (
unsigned int index )
258 return asImp().block( index );
265 inline ConstDofIteratorType
dbegin ()
const 267 return asImp().dbegin ();
274 inline ConstDofIteratorType
dend ()
const 276 return asImp().dend ();
286 return asImp().dbegin ();
295 return asImp().dend ();
311 inline RangeFieldType *allocDofPointer ()
const 313 return asImp().allocDofPointer();
334 asImp().freeDofPointer( dofPointer );
354 asImp().freeDofPointerNoCopy( dofPointer );
366 asImp().axpy( s, g );
382 template <
class DFType>
386 return asImp().scalarProductDofs( other );
400 inline typename Dune::FieldTraits< RangeFieldType >::real_type
403 return asImp().normSquaredDofs( );
410 inline void print( std :: ostream &out )
const 412 asImp().print( out );
420 return asImp().dofsValid();
427 template <
class DFType >
434 template<
class Operation >
435 typename CommDataHandle< Operation > :: Type
438 return asImp().dataHandle( operation );
446 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION( asImp().communicate() );
455 template <
class DFType >
458 return asImp().operator+=( g );
465 template <
class DFType >
468 return asImp().operator-=( g );
479 return asImp() *= scalar;
490 return asImp() /= scalar;
497 template<
class StreamTraits >
507 template<
class StreamTraits >
510 asImp().write( out );
519 asImp().enableDofCompression();
546 template<
class Impl >
577 typedef typename DiscreteFunctionSpaceType :: DomainType
DomainType;
579 typedef typename DiscreteFunctionSpaceType :: RangeType
RangeType;
619 enum { blockSize = BaseType::blockSize };
621 template<
class Operation >
627 struct LocalFunctionEvaluateFunctor
629 typedef typename LocalFunctionType::LocalCoordinateType LocalCoordinateType;
630 typedef typename LocalFunctionType::RangeType RangeType;
632 LocalFunctionEvaluateFunctor ( RangeType &value ) : value_( value ) {}
634 void operator() (
const LocalCoordinateType &x,
const LocalFunctionType &localFunction )
636 localFunction.evaluate( x, value_ );
643 struct LocalFunctionJacobianFunctor
645 typedef typename LocalFunctionType::LocalCoordinateType LocalCoordinateType;
646 typedef typename LocalFunctionType::JacobianRangeType JacobianRangeType;
648 LocalFunctionJacobianFunctor ( JacobianRangeType &jacobian ) : jacobian_( jacobian ) {}
650 void operator() (
const LocalCoordinateType &x,
const LocalFunctionType &localFunction )
652 localFunction.jacobian( x, jacobian_);
656 JacobianRangeType &jacobian_;
659 struct LocalFunctionHessianFunctor
661 typedef typename LocalFunctionType::LocalCoordinateType LocalCoordinateType;
662 typedef typename LocalFunctionType::HessianRangeType HessianRangeType;
664 LocalFunctionHessianFunctor ( HessianRangeType &hessian ) : hessian_( hessian ) {}
666 void operator() (
const LocalCoordinateType &x,
const LocalFunctionType &localFunction )
668 localFunction.hessian( x, hessian_ );
672 HessianRangeType &hessian_;
676 using BaseType :: asImp;
689 const DiscreteFunctionSpaceType &dfSpace );
694 ThisType &operator= (
const ThisType & );
701 const std::string &
name ()
const {
return name_; }
704 const DiscreteFunctionSpaceType &
space ()
const {
return dfSpace_; }
707 const GridPartType &
gridPart ()
const {
return space().gridPart(); }
710 LocalFunctionType
localFunction (
const EntityType &entity ) {
return LocalFunctionType( asImp(), entity ); }
713 const LocalFunctionType
localFunction (
const EntityType &entity )
const {
return LocalFunctionType( asImp(), entity ); }
716 void clear() { dofVector().clear(); }
718 DofVectorType&
dofVector() {
return asImp().dofVector(); }
719 const DofVectorType&
dofVector()
const {
return asImp().dofVector(); }
722 int blocks()
const {
return dofVector().size(); }
725 DofBlockPtrType
block (
unsigned int index )
727 return dofVector().blockPtr( index );
731 ConstDofBlockPtrType
block (
unsigned int index )
const 733 return dofVector().blockPtr( index );
740 SizeType
size ()
const {
return dofVector().size() * blockSize; }
746 ConstDofIteratorType
dbegin ()
const {
return dofVector().begin(); }
752 DofIteratorType
dbegin () {
return dofVector().begin(); }
758 ConstDofIteratorType
dend ()
const {
return dofVector().end(); }
764 DofIteratorType
dend () {
return dofVector().end(); }
771 inline RangeFieldType *allocDofPointer ()
const;
778 inline void freeDofPointer( RangeFieldType *dofPointer );
785 inline void freeDofPointerNoCopy(
const RangeFieldType *dofPointer )
const;
788 template <
class DFType>
792 void axpy (
const RangeFieldType &s,
const DiscreteFunctionInterfaceType& g )
798 template <
class DFType>
799 inline RangeFieldType
802 return scalarProduct_.scalarProductDofs( *
this, other );
806 inline typename Dune::FieldTraits< RangeFieldType >::real_type
810 void print ( std :: ostream &out )
const;
813 inline bool dofsValid ()
const;
816 template <
class DFType>
820 void assign (
const DiscreteFunctionType &g )
826 template<
class Operation >
827 typename CommDataHandle< Operation > :: Type
828 dataHandle (
const Operation *operation );
834 this->space().communicate( asImp() );
838 inline void evaluate (
const DomainType &x, RangeType &value )
const 840 LocalFunctionEvaluateFunctor functor( value );
841 asImp().evaluateGlobal( x, functor );
845 inline void jacobian (
const DomainType &x, JacobianRangeType &jacobian )
const 847 LocalFunctionJacobianFunctor functor( jacobian );
848 asImp().evaluateGlobal( x, functor );
852 inline void hessian (
const DomainType &x, HessianRangeType &hessian )
const 854 LocalFunctionHessianFunctor functor( hessian );
855 asImp().evaluateGlobal( x, functor );
859 template <
class DFType>
863 DiscreteFunctionType&
operator+=(
const DiscreteFunctionType& g)
870 template <
class DFType>
874 DiscreteFunctionType&
operator-=(
const DiscreteFunctionType& g)
886 inline DiscreteFunctionType &operator*= (
const RangeFieldType &scalar );
894 inline DiscreteFunctionType &operator/= (
const RangeFieldType &scalar ) {
return BaseType :: operator*=( RangeFieldType(1 ) / scalar ); }
897 template<
class StreamTraits >
901 template<
class StreamTraits >
915 template <
class DFType>
918 template <
class DFType>
928 template<
class LocalDofs >
929 void addScaledLocalDofs (
const EntityType &entity,
const RangeFieldType &s,
const LocalDofs &localDofs )
932 AssignFunctorType assignFunctor( localDofs, s );
935 space().blockMapper().mapEach( entity, functor );
939 template<
class LocalDofs >
940 void addLocalDofs (
const EntityType &entity,
const LocalDofs &localDofs )
943 AssignFunctorType assignFunctor( localDofs );
946 space().blockMapper().mapEach( entity, functor );
950 template<
class LocalDofs >
951 void setLocalDofs (
const EntityType &entity,
const LocalDofs &localDofs )
954 AssignFunctorType assignFunctor( localDofs );
957 space().blockMapper().mapEach( entity, functor );
961 void getLocalDofs (
const EntityType &entity, LocalDofVectorType &localDofs )
964 AssignFunctorType assignFunctor( localDofs );
967 space().blockMapper().mapEach( entity, functor );
972 void getLocalDofs (
const EntityType &entity, Dune::DynamicVector< DofType, A > &localDofs )
const 975 AssignFunctorType assignFunctor( localDofs );
978 space().blockMapper().mapEach( entity, functor );
997 virtual void insertSubData();
1000 virtual void removeSubData();
1003 template<
class Functor >
1004 void evaluateGlobal (
const DomainType &x, Functor functor )
const;
1024 template<
class DiscreteFunction >
1033 template<
typename DiscreteFunctionSpace,
typename DofVector >
1039 typedef typename DiscreteFunctionSpaceType::DomainType
DomainType;
1040 typedef typename DiscreteFunctionSpaceType::RangeType
RangeType;
1049 typedef typename DiscreteFunctionSpaceType::BlockMapperType
MapperType;
1050 typedef typename DofVectorType::FieldType
DofType;
1069 #endif // #ifndef DUNE_FEM_DISCRETEFUNCTION_HH DofVectorType::DofBlockPtrType DofBlockPtrType
Definition: discretefunction.hh:1046
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: discretefunction.hh:792
Definition: discretefunction.hh:622
const DofVectorType & dofVector() const
Definition: discretefunction.hh:719
DiscreteFunctionSpaceType::BlockMapperType MapperType
Definition: discretefunction.hh:1049
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: discretefunction.hh:800
DiscreteFunctionSpace DiscreteFunctionSpaceType
Definition: discretefunction.hh:1038
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: discretefunction.hh:384
void evaluate(const DomainType &x, RangeType &value) const
evaluate the function
Definition: discretefunction.hh:838
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:196
BaseType::DofBlockPtrType DofBlockPtrType
Definition: discretefunction.hh:608
DofVectorType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: discretefunction.hh:1047
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done...
Definition: discretefunction.hh:908
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:206
Traits::LocalDofVectorStackType ldvStack_
Definition: discretefunction.hh:1013
DiscreteFunctionSpaceType::DomainType DomainType
Definition: discretefunction.hh:1039
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:710
Definition: function/common/functor.hh:39
DofVectorType::ConstDofBlockType ConstDofBlockType
Definition: discretefunction.hh:1045
A mapping from one vector space into another This class describes a general mapping from the domain v...
Definition: mapping.hh:46
DiscreteFunctionSpaceType::template CommDataHandle< DiscreteFunctionType, Operation >::Type Type
Definition: discretefunction.hh:148
Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of associated discrete function space
Definition: discretefunction.hh:97
check for sets of entities for the load balance procedure
Definition: commoperations.hh:351
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: discretefunction.hh:180
DiscreteFunctionType & operator+=(const DiscreteFunctionInterface< DFType > &g)
add another discrete function to this one
Definition: discretefunction.hh:456
Traits class for a DiscreteFunction.
Definition: discretefunction.hh:60
static RestoreStreamType & restoreStream()
Definition: persistencemanager.hh:338
DofVectorType::ConstIteratorType ConstDofIteratorType
Definition: discretefunction.hh:1043
ConstDofIteratorType dbegin() const
Obtain the constant iterator pointing to the first dof.
Definition: discretefunction.hh:746
class with singleton instance managing all persistent objects
Definition: persistencemanager.hh:136
virtual void backup() const
Definition: discretefunction.hh:983
Definition: discretefunction.hh:144
BaseType::Traits Traits
Definition: discretefunction.hh:555
void hessian(const DomainType &x, HessianRangeType &hessian) const
evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const ...
Definition: discretefunction.hh:852
BaseType::DofBlockType DofBlockType
Definition: discretefunction.hh:606
DiscreteFunctionSpaceType::DomainType DomainType
type of domain, i.e. type of coordinates
Definition: discretefunction.hh:107
Definition: discretefunction.hh:50
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian
Definition: discretefunction.hh:581
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: discretefunction.hh:364
Traits::DofType DofType
Definition: discretefunction.hh:131
Traits::DofIteratorType DofIteratorType
type of the dof iterator
Definition: discretefunction.hh:591
DofBlockPtrType block(unsigned int index)
obtain pointer to block of discrete function with block number index (read-only)
Definition: discretefunction.hh:725
BaseType::LocalFunctionType LocalFunctionType
type of local functions
Definition: discretefunction.hh:604
void assign(const DiscreteFunctionInterface< DFType > &g)
assign the DoFs of another discrete function to this one
Definition: discretefunction.hh:428
Construct a vector with a dynamic size.
Definition: referencevector.hh:23
std::string name_
Definition: discretefunction.hh:1019
DofIteratorType dend()
Obtain the non-constant iterator pointing to the last dof.
Definition: discretefunction.hh:764
Definition: discretefunction.hh:63
bool dofsValid() const
check for NaNs
Definition: discretefunction.hh:418
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:713
BaseType::MappingType MappingType
type of mapping base class for this discrete function
Definition: discretefunction.hh:138
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: discretefunction.hh:186
void assign(const DiscreteFunctionType &g)
Definition: discretefunction.hh:820
const DiscreteFunctionSpaceType & dfSpace_
Definition: discretefunction.hh:1010
int blocks() const
obtain total number of blocks, i.e. size / blockSize.
Definition: discretefunction.hh:722
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian, i.e. type of evaluated gradient
Definition: discretefunction.hh:111
DofVectorType::DofBlockType DofBlockType
Definition: discretefunction.hh:1044
Definition: function/common/functor.hh:119
Traits::DofIteratorType DofIteratorType
Type of the dof iterator used in the discrete function implementation.
Definition: discretefunction.hh:126
CommDataHandle< Operation >::Type dataHandle(const Operation *operation)
return reference to data handle object
Definition: discretefunction.hh:436
DiscreteFunctionSpaceType::EntityType EntityType
type of entity local functions are defined on
Definition: discretefunction.hh:152
virtual void restore()
Definition: discretefunction.hh:990
DiscreteFunctionSpaceType::RangeType RangeType
type of range vector
Definition: discretefunction.hh:579
void axpy(const T &a, const T &x, T &y)
Definition: space/basisfunctionset/functor.hh:37
Definition: misc/functor.hh:30
This file implements a dense vector with a dynamic size.
DiscreteFunctionType & operator+=(const DiscreteFunctionType &g)
add another discrete function to this one
Definition: discretefunction.hh:863
ConstDofIteratorType dbegin() const
obtain an iterator pointing to the first DoF (read-only)
Definition: discretefunction.hh:265
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: discretefunction.hh:508
DofVectorType::SizeType SizeType
size type of the block vector
Definition: discretefunction.hh:616
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field (usually a float type)
Definition: discretefunction.hh:588
BaseType::EntityType EntityType
Definition: discretefunction.hh:611
void jacobian(const DomainType &x, JacobianRangeType &jacobian) const
evaluate the Jacobian of the function
Definition: discretefunction.hh:845
bool operator!=(const Double &a, const Double &b)
Definition: double.hh:629
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field (usually a float type)
Definition: discretefunction.hh:586
Impl DiscreteFunctionType
type of the discrete function (Barton-Nackman parameter)
Definition: discretefunction.hh:558
BaseType::GridPartType GridPartType
type of the underlying grid part
Definition: discretefunction.hh:574
LocalDofVectorAllocatorType ldvAllocator_
Definition: discretefunction.hh:1014
bool operator==(const Double &a, const Double &b)
Definition: double.hh:589
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: discretefunction.hh:401
Definition: function/common/functor.hh:19
SizeType size() const
Return the number of blocks in the block vector.
Definition: discretefunction.hh:740
const DofVectorType & dofVector() const
Definition: discretefunction.hh:168
static BackupStreamType & backupStream()
Definition: persistencemanager.hh:333
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: discretefunction.hh:707
void print(std::ostream &out) const
print all DoFs to a stream (for debugging purposes)
Definition: discretefunction.hh:410
Definition: coordinate.hh:4
DiscreteFunctionTraits< Impl > Traits
type of the traits
Definition: discretefunction.hh:91
Traits::DofVectorType DofVectorType
Type of the dof vector used in the discrete function implementation.
Definition: discretefunction.hh:123
Traits::DiscreteFunctionType DiscreteFunctionType
type of the implementaton (Barton-Nackman)
Definition: discretefunction.hh:94
abstract interface for an input stream
Definition: streams.hh:177
void communicate()
do default communication of space for this discrete function
Definition: discretefunction.hh:831
LocalDofVectorAllocatorType & localDofVectorAllocator() const
obtain the local function storage
Definition: discretefunction.hh:925
Traits::ConstDofIteratorType ConstDofIteratorType
type of the const dof iterator
Definition: discretefunction.hh:593
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: discretefunction.hh:498
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: discretefunction.hh:571
int size() const
obtain total number of DoFs
Definition: discretefunction.hh:226
void getLocalDofs(const EntityType &entity, LocalDofVectorType &localDofs)
get local Dofs and store a reference to it in the LocalDofVector
Definition: discretefunction.hh:961
const std::string & name() const
obtain the name of the discrete function
Definition: discretefunction.hh:701
#define DUNE_VERSION_DEPRECATED(major, minor, newmethod)
Definition: version.hh:20
Definition: discretefunction.hh:1034
void communicate()
do default communication of space for this discrete function
Definition: discretefunction.hh:444
DiscreteFunctionInterface< Impl > DiscreteFunctionInterfaceType
type of the discrete function interface (this type)
Definition: discretefunction.hh:100
Definition: function/common/functor.hh:81
void getLocalDofs(const EntityType &entity, Dune::DynamicVector< DofType, A > &localDofs) const
get local Dofs and store the values in LocalDofVector
Definition: discretefunction.hh:972
ConstDofBlockPtrType block(unsigned int index) const
obtain pointer to block of discrete function with block number index
Definition: discretefunction.hh:731
DofIteratorType dbegin()
obtain an iterator pointing to the first DoF (read-write)
Definition: discretefunction.hh:284
Definition: stackallocator.hh:61
DiscreteFunctionInterface()
default constructor
Definition: discretefunction.hh:158
BaseType::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: discretefunction.hh:609
DofIteratorType dend()
obtain an iterator pointing behind the last DoF (read-write)
Definition: discretefunction.hh:293
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field, i.e. type of coordinate component
Definition: discretefunction.hh:103
DofVectorType & dofVector()
Definition: discretefunction.hh:167
DofIteratorType dbegin()
Obtain the non-constant iterator pointing to the first dof.
Definition: discretefunction.hh:752
DiscreteFunctionSpaceType::GridPartType GridPartType
type of the underlying grid part
Definition: discretefunction.hh:114
DofVectorType::IteratorType DofIteratorType
Definition: discretefunction.hh:1042
DiscreteFunctionType & operator-=(const DiscreteFunctionInterface< DFType > &g)
substract all degrees of freedom from given discrete function using the dof iterators ...
Definition: discretefunction.hh:466
DiscreteFunctionSpaceType::HessianRangeType HessianRangeType
type of hessian
Definition: discretefunction.hh:583
base class for persistent objects
Definition: persistencemanager.hh:96
double real(const std::complex< Double > &x)
Definition: double.hh:890
void addLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
add local Dofs to dof vector
Definition: discretefunction.hh:940
DiscreteFunctionSpaceType::RangeType RangeType
Definition: discretefunction.hh:1040
DiscreteFunctionSpaceType::DomainType DomainType
type of domain vector
Definition: discretefunction.hh:577
Traits::DofVectorType DofVectorType
type of DofVector
Definition: discretefunction.hh:596
DofBlockPtrType block(unsigned int index)
obtain pointer to block of discrete function with block number index (read-only)
Definition: discretefunction.hh:256
int blocks() const
obtain total number of blocks, i.e. size / blockSize.
Definition: discretefunction.hh:238
DiscreteFunctionSpaceType::RangeType RangeType
type of range, i.e. result of evaluation
Definition: discretefunction.hh:109
DynamicReferenceVector< DofType, LocalDofVectorAllocatorType > LocalDofVectorType
Definition: discretefunction.hh:1054
Traits::DofBlockPtrType DofBlockPtrType
Definition: discretefunction.hh:134
StackAllocator< DofType, LocalDofVectorStackType * > LocalDofVectorAllocatorType
Definition: discretefunction.hh:1053
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field, i.e. dof type
Definition: discretefunction.hh:105
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grdi changes a dof compression is done...
Definition: discretefunction.hh:517
BaseType::ConstDofBlockType ConstDofBlockType
Definition: discretefunction.hh:607
BaseType::DofType DofType
Definition: discretefunction.hh:613
Traits::ConstDofBlockType ConstDofBlockType
Definition: discretefunction.hh:133
ThreadSafeValue< UninitializedObjectStack > LocalDofVectorStackType
Definition: discretefunction.hh:1052
DefaultLoadBalanceContainsCheckType defaultLoadBalanceContainsCheck() const
Definition: discretefunction.hh:525
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: discretefunction.hh:807
Definition: discretefunction.hh:1025
ScalarProductType scalarProduct_
Definition: discretefunction.hh:1020
Traits::ConstDofBlockPtrType ConstDofBlockPtrType
Definition: discretefunction.hh:135
Abstract class representing a function.
Definition: function.hh:43
void clear()
set all degrees of freedom to zero
Definition: discretefunction.hh:716
Traits::LocalDofVectorType LocalDofVectorType
type of LocalDofVector
Definition: discretefunction.hh:599
DofVectorType::FieldType DofType
Definition: discretefunction.hh:1050
const std::string & name() const
obtain the name of the discrete function
Definition: discretefunction.hh:174
void clear()
set all degrees of freedom to zero
Definition: discretefunction.hh:213
DofVector DofVectorType
Definition: discretefunction.hh:1036
DiscreteFunctionType & operator-=(const DiscreteFunctionType &g)
substract all degrees of freedom from given discrete function using the dof iterators ...
Definition: discretefunction.hh:874
Definition: discretefunction.hh:55
Traits::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
type of LocalDofVector
Definition: discretefunction.hh:601
Traits::LocalFunctionType LocalFunctionType
type of local functions
Definition: discretefunction.hh:120
static bool singleThreadMode()
returns true if program is operating on one thread currently
Definition: threadmanager.hh:217
Traits::ConstDofIteratorType ConstDofIteratorType
Type of the constantdof iterator used in the discrete function implementation.
Definition: discretefunction.hh:129
ConstDofBlockPtrType block(unsigned int index) const
obtain pointer to block of discrete function with block number index
Definition: discretefunction.hh:247
DofVectorType & dofVector()
Definition: discretefunction.hh:718
BaseType::DiscreteFunctionInterfaceType DiscreteFunctionInterfaceType
Definition: discretefunction.hh:560
Definition: function/common/functor.hh:61
ConstDofIteratorType dend() const
Obtain the constant iterator pointing to the last dof.
Definition: discretefunction.hh:758
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: discretefunction.hh:704
Traits::DofBlockType DofBlockType
Definition: discretefunction.hh:132
LoadBalanceLeafData< ThisType > DefaultLoadBalanceContainsCheckType
Definition: discretefunction.hh:524
ConstDofIteratorType dend() const
obtain an iterator pointing behind the last DoF (read-only)
Definition: discretefunction.hh:274
abstract interface for an output stream
Definition: streams.hh:44
void setLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
set local Dofs to dof vector
Definition: discretefunction.hh:951
DiscreteFunctionSpaceType::GridType GridType
Type of the underlying grid.
Definition: discretefunction.hh:117
Definition: discretefunction.hh:81
DebugLock dofPointerLock_
Definition: discretefunction.hh:1016
void addScaledLocalDofs(const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
add scaled local Dofs to dof vector
Definition: discretefunction.hh:929