|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
common/discretefunction.hh
Go to the documentation of this file.
83 : public Fem::Function< typename DiscreteFunctionTraits< Impl >::DiscreteFunctionSpaceType::FunctionSpaceType, Impl >,
88 typedef Fem::Function< typename DiscreteFunctionTraits< Impl >::DiscreteFunctionSpaceType::FunctionSpaceType, Impl > BaseType;
267 void addScaledLocalDofs ( const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs )
678 DiscreteFunctionDefault ( std::string name, std::shared_ptr< const DiscreteFunctionSpaceType > dfSpace );
716 LocalFunctionType localFunction ( const EntityType &entity ) { return LocalFunctionType( asImp(), entity ); }
720 const LocalFunctionType localFunction ( const EntityType &entity ) const { return LocalFunctionType( asImp(), entity ); }
831 DUNE_THROW(InvalidStateException,"DiscreteFunctionInterface::communicate: only call in single thread mode!");
840 asImp().evaluateGlobal( x, [ &value ] ( const LocalCoordinateType &x, const TemporaryLocalFunctionType &localFunction )
847 asImp().evaluateGlobal( x, [ &jacobian ] ( const LocalCoordinateType &x, const TemporaryLocalFunctionType &localFunction )
855 asImp().evaluateGlobal( x, [ &hessian ] ( const LocalCoordinateType &x, const TemporaryLocalFunctionType &localFunction )
922 void addScaledLocalDofs ( const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs )
int id()
#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
constexpr auto size(const T &t)
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
void print() const
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:101
static DofBlockFunctor< DofVector, Functor > dofBlockFunctor(DofVector &dofVector, Functor functor)
Definition function/common/functor.hh:132
T real_type
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
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
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
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
void endAssemble(const bool communicate=true)
Finalize the assemble of values using the LocalContribution concept.
Definition common/discretefunction.hh:989
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
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
class with singleton instance managing all persistent objects
Definition persistencemanager.hh:141
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
discrete function space
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8