DUNE-FEM (unstable)
discretefunction.hh
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 )
#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
Definition: bartonnackmanifcheck.hh:61
discrete function space
mapper allocating one DoF per subentity of a given codimension
Definition: codimensionmapper.hh:357
Definition: discretefunction.hh:584
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: discretefunction.hh:703
DiscreteFunctionType & operator*=(const RangeFieldType &scalar)
multiply all DoFs with a scalar factor
Definition: discretefunction.hh:887
void evaluate(const DomainType &x, RangeType &value) const
evaluate the function
Definition: discretefunction.hh:838
DiscreteFunctionType & operator+=(const DiscreteFunctionType &g)
add another discrete function to this one
Definition: discretefunction.hh:864
Traits::DofVectorType DofVectorType
type of DofVector
Definition: discretefunction.hh:631
DofIteratorType dend()
Obtain the non-constant iterator pointing to the last dof.
Definition: discretefunction.hh:779
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: 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: discretefunction.hh:618
SizeType size() const
Return the number of blocks in the block vector.
Definition: discretefunction.hh:755
void hessian(const DomainType &x, HessianRangeType &hessian) const
evaluate the hessian of the function (const DomainType &x,HessianRangeType &hessian) const
Definition: discretefunction.hh:853
Impl DiscreteFunctionType
type of the discrete function (Barton-Nackman parameter)
Definition: discretefunction.hh:592
BaseType::LocalFunctionType LocalFunctionType
type of local functions
Definition: discretefunction.hh:639
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: discretefunction.hh:709
DiscreteFunctionDefault(const std::string &name, const DiscreteFunctionSpaceType &dfSpace)
Constructor storing discrete function space and local function factory.
Definition: discretefunction_inline.hh:26
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: discretefunction.hh:825
BaseType::GridPartType GridPartType
type of the underlying grid part
Definition: 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: discretefunction.hh:731
Traits::LocalDofVectorAllocatorType LocalDofVectorAllocatorType
type of LocalDofVector
Definition: discretefunction.hh:636
Traits::ConstDofIteratorType ConstDofIteratorType
type of the const dof iterator
Definition: discretefunction.hh:628
void getLocalDofs(const EntityType &entity, Vector &localDofs) const
fill local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:946
void beginAssemble()
Initiate the assemble of values using the LocalContribution concept.
Definition: discretefunction.hh:971
ConstDofIteratorType dbegin() const
Obtain the constant iterator pointing to the first dof.
Definition: 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: discretefunction.hh:737
void addScaledLocalDofs(const EntityType &entity, const RangeFieldType &s, const LocalDofs &localDofs)
add scaled local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:922
DofVectorType::SizeType SizeType
size type of the block vector
Definition: discretefunction.hh:652
const std::string & name() const
obtain the name of the discrete function
Definition: discretefunction.hh:691
Traits::LocalDofVectorType LocalDofVectorType
type of LocalDofVector
Definition: discretefunction.hh:634
const LocalFunctionType localFunction() const
obtain an uninitialized local function (read-write)
Definition: discretefunction.hh:728
ConstDofBlockPtrType block(unsigned int index) const
Definition: discretefunction.hh:746
void addLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
add local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:930
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done...
Definition: 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: discretefunction.hh:773
DiscreteFunctionSpaceType::RangeType RangeType
type of range vector
Definition: discretefunction.hh:614
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: discretefunction_inline.hh:215
DofBlockPtrType block(unsigned int index)
Definition: discretefunction.hh:740
DofIteratorType dbegin()
Obtain the non-constant iterator pointing to the first dof.
Definition: discretefunction.hh:767
virtual void insertSubData()
Definition: discretefunction_inline.hh:310
DiscreteFunctionType & operator/=(const RangeFieldType &scalar)
devide all DoFs by a scalar factor
Definition: discretefunction.hh:899
Traits::DofIteratorType DofIteratorType
type of the dof iterator
Definition: discretefunction.hh:626
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: discretefunction.hh:712
BaseType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: discretefunction.hh:606
virtual void backup() const
Definition: discretefunction.hh:1011
void assign(const DiscreteFunctionInterface< DFType > &g)
Definition: discretefunction_inline.hh:132
LocalFunctionType localFunction()
obtain an uninitialized local function (read-write)
Definition: discretefunction.hh:724
virtual void removeSubData()
Definition: discretefunction_inline.hh:326
LocalDofVectorAllocatorType & localDofVectorAllocator() const
obtain the local function storage
Definition: discretefunction.hh:962
void jacobian(const DomainType &x, JacobianRangeType &jacobian) const
evaluate the Jacobian of the function
Definition: discretefunction.hh:845
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:720
DiscreteFunctionSpaceType::DomainType DomainType
type of domain vector
Definition: discretefunction.hh:612
void endAssemble(const bool communicate=true)
Finalize the assemble of values using the LocalContribution concept.
Definition: discretefunction.hh:989
CommDataHandle< Operation >::Type dataHandle(const Operation &operation)
return reference to data handle object
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field (usually a float type)
Definition: discretefunction.hh:623
void getLocalDofReferences(const EntityType &entity, LocalDofVectorType &localDofs)
get local Dofs and store a reference to it in the LocalDofVector
Definition: discretefunction.hh:1003
DiscreteFunctionType & operator-=(const DiscreteFunctionType &g)
substract all degrees of freedom from given discrete function using the dof iterators
Definition: discretefunction.hh:875
virtual void restore()
Definition: 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: discretefunction.hh:694
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field (usually a float type)
Definition: discretefunction.hh:621
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: discretefunction.hh:786
void assign(const DiscreteFunctionType &g)
Definition: discretefunction.hh:815
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: discretefunction.hh:793
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian
Definition: discretefunction.hh:616
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:716
void setLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
set local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:938
constexpr int order() const
obtain an upper bound on the polynomial order of the underlying space.
Definition: discretefunction.hh:697
Definition: discretefunction.hh:86
Traits::ConstDofIteratorType ConstDofIteratorType
type of the constantdof iterator used in the discrete function implementation
Definition: discretefunction.hh:134
DiscreteFunctionInterface< Impl > DiscreteFunctionInterfaceType
type of the discrete function interface (this type)
Definition: discretefunction.hh:104
DofIteratorType dbegin()
obtain an iterator pointing to the first DoF (read-write)
Definition: discretefunction.hh:372
BaseType::MappingType MappingType
type of mapping base class for this discrete function
Definition: discretefunction.hh:143
RangeFieldType scalarProductDofs(const DiscreteFunctionInterface< DFType > &other) const
Scalar product between the DoFs of two discrete functions.
Definition: discretefunction.hh:412
void addLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
add local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:278
Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of associated discrete function space
Definition: discretefunction.hh:98
DiscreteFunctionSpaceType::JacobianRangeType JacobianRangeType
type of jacobian, i.e. type of evaluated gradient
Definition: discretefunction.hh:115
DiscreteFunctionType & operator/=(const RangeFieldType &scalar)
devide all DoFs by a scalar factor
Definition: discretefunction.hh:520
LocalFunctionType localFunction(const EntityType &entity)
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:231
void axpy(const RangeFieldType &s, const DiscreteFunctionInterfaceType &g)
axpy operation
Definition: discretefunction.hh:393
DiscreteFunctionTraits< Impl > Traits
type of the traits
Definition: discretefunction.hh:92
int blocks() const
obtain total number of blocks, i.e. size / blockSize.
Definition: 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: discretefunction.hh:267
void clear()
set all degrees of freedom to zero
Definition: discretefunction.hh:320
void enableDofCompression()
Enable this discrete function for dof compression, i.e. during grid changes a dof compression is done...
Definition: discretefunction.hh:552
DiscreteFunctionType & operator+=(const DiscreteFunctionInterface< DFType > &g)
add another discrete function to this one
Definition: discretefunction.hh:486
DiscreteFunctionType & operator-=(const DiscreteFunctionInterface< DFType > &g)
substract all degrees of freedom from given discrete function using the dof iterators
Definition: discretefunction.hh:498
void write(OutStreamInterface< StreamTraits > &out) const
write the discrete function into a stream
Definition: discretefunction.hh:543
const LocalFunctionType localFunction() const
obtain an uninitialized local function (read-write)
Definition: discretefunction.hh:314
ConstDofIteratorType dbegin() const
obtain an iterator pointing to the first DoF (read-only)
Definition: discretefunction.hh:354
DiscreteFunctionInterface()=default
default constructor
bool continuous() const
returns true if the space contains only globally continuous functions
Definition: discretefunction.hh:208
void print(std ::ostream &out) const
print all DoFs to a stream (for debugging purposes)
Definition: discretefunction.hh:437
Traits::DofVectorType DofVectorType
type of the dof vector used in the discrete function implementation
Definition: discretefunction.hh:128
const std::string & name() const
obtain the name of the discrete function
Definition: discretefunction.hh:186
void read(InStreamInterface< StreamTraits > &in)
read the discrete function from a stream
Definition: discretefunction.hh:533
void getLocalDofs(const EntityType &entity, Vector &localDofs) const
fill local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:302
CommDataHandle< Operation >::Type dataHandle(const Operation &operation)
return reference to data handle object
Definition: discretefunction.hh:462
bool dofsValid() const
check for NaNs
Definition: discretefunction.hh:445
DiscreteFunctionSpaceType::DomainFieldType DomainFieldType
type of domain field, i.e. type of coordinate component
Definition: discretefunction.hh:107
LocalFunctionType localFunction()
obtain an uninitialized local function (read-write)
Definition: discretefunction.hh:254
const LocalFunctionType localFunction(const EntityType &entity) const
obtain a local function for an entity (read-write)
Definition: discretefunction.hh:242
Traits::LocalFunctionType LocalFunctionType
type of local functions
Definition: discretefunction.hh:125
ConstDofIteratorType dend() const
obtain an iterator pointing behind the last DoF (read-only)
Definition: discretefunction.hh:363
const GridPartType & gridPart() const
obtain a reference to the underlying grid part
Definition: discretefunction.hh:220
DiscreteFunctionSpaceType::GridType GridType
type of the underlying grid
Definition: discretefunction.hh:122
DiscreteFunctionSpaceType::RangeFieldType RangeFieldType
type of range field, i.e. dof type
Definition: discretefunction.hh:109
Traits::DofIteratorType DofIteratorType
type of the dof iterator used in the discrete function implementation
Definition: discretefunction.hh:131
DiscreteFunctionType & operator*=(const RangeFieldType &scalar)
multiply all DoFs by a scalar factor
Definition: discretefunction.hh:509
Traits::DiscreteFunctionType DiscreteFunctionType
type of the implementaton (Barton-Nackman)
Definition: discretefunction.hh:95
DiscreteFunctionSpaceType::EntityType EntityType
type of entity local functions are defined on
Definition: discretefunction.hh:159
DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
type of associated function space
Definition: discretefunction.hh:101
std::string & name()
obtain the name of the discrete function
Definition: discretefunction.hh:195
DiscreteFunctionSpaceType::DomainType DomainType
type of domain, i.e. type of coordinates
Definition: discretefunction.hh:111
DiscreteFunctionSpaceType::RangeType RangeType
type of range, i.e. result of evaluation
Definition: discretefunction.hh:113
DofIteratorType dend()
obtain an iterator pointing behind the last DoF (read-write)
Definition: discretefunction.hh:381
DiscreteFunctionSpaceType::GridPartType GridPartType
type of the underlying grid part
Definition: discretefunction.hh:118
static constexpr std::size_t blockSize
size of the dof blocks
Definition: discretefunction.hh:148
const std::string & order() const
obtain an upper bound on the polynomial order of the underlying space.
Definition: discretefunction.hh:202
const DiscreteFunctionSpaceType & space() const
obtain a reference to the corresponding DiscreteFunctionSpace
Definition: discretefunction.hh:214
Dune::FieldTraits< RangeFieldType >::real_type normSquaredDofs() const
Squared small l^2 norm of all dofs.
Definition: discretefunction.hh:428
void assign(const DiscreteFunctionInterface< DFType > &g)
assign the DoFs of another discrete function to this one
Definition: discretefunction.hh:455
void setLocalDofs(const EntityType &entity, const LocalDofs &localDofs)
set local Dofs to dof vector associated with the entity
Definition: discretefunction.hh:289
int size() const
obtain total number of DoFs
Definition: discretefunction.hh:333
void communicate()
do default communication of space for this discrete function
Definition: discretefunction.hh:468
Mapping< DomainFieldType, RangeFieldType, DomainType, RangeType > MappingType
type of mapping base class
Definition: function.hh:76
base class for determing whether a function has local functions or not
Definition: discretefunction.hh:57
base class for determing whether a class is a discrete function or not
Definition: discretefunction.hh:53
check for sets of entities for the load balance procedure
Definition: commoperations.hh:216
class with singleton instance managing all persistent objects
Definition: persistencemanager.hh:141
Default exception if a function was called while the object is not in a valid state for that function...
Definition: exceptions.hh:281
This file implements a dense vector with a dynamic size.
RangeFieldType scalarProductDofs(const DiscreteFunctionType &x, const OtherDiscreteFunctionType &y) const
evaluate scalar product and omit auxiliary nodes
Definition: scalarproducts.hh:101
EnableIfInterOperable< T1, T2, bool >::type operator==(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for equality.
Definition: iteratorfacades.hh:238
EnableIfInterOperable< T1, T2, bool >::type operator!=(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for inequality.
Definition: iteratorfacades.hh:260
Traits class for a DiscreteFunction.
Definition: discretefunction.hh:61
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)