KASKADE 7 development version
Public Member Functions | Public Attributes | Friends | List of all members
Kaskade::Bridge::Vector< Implementation > Class Template Reference

Mathematical Vector that supports copy-on-write, implements AbstractFunctionSpaceElement. More...

#include <newton_bridge.hh>

Detailed Description

template<typename Implementation>
class Kaskade::Bridge::Vector< Implementation >

Mathematical Vector that supports copy-on-write, implements AbstractFunctionSpaceElement.

An implementation must support the following three operations:

Definition at line 195 of file newton_bridge.hh.

Inheritance diagram for Kaskade::Bridge::Vector< Implementation >:
Kaskade::AbstractFunctionSpaceElement

Public Member Functions

template<class Creator >
 Vector (Creator &creator)
 
 Vector (Implementation const &gi)
 
virtual std::unique_ptr< AbstractFunctionSpaceElementclone () const
 Construction of a vector of the same type. More...
 
virtual std::unique_ptr< AbstractFunctionSpaceElementinitZeroVector () const
 Construction of a vector of the same type. More...
 
Implementation const & get () const
 Access to the data. More...
 
Implementation & get ()
 Access data. More...
 
virtual void read (std::vector< double > const &in, int vbegin, int vend)
 
virtual void read (std::vector< double > const &in)
 
virtual void write (std::vector< double > &out, int vbegin, int vend) const
 
virtual void write (std::vector< double > &out) const
 
virtual std::string getRole (int component) const
 
int nComponents () const
 
virtual void print (std::string const &message="") const
 Optional output. More...
 
virtual double doapplyAsDualTo (AbstractFunctionSpaceElement const &v, int vbegin, int vend) const
 
AbstractFunctionSpaceElementaxpy (double alpha, AbstractFunctionSpaceElement const &l, int component)
 *this += alpha*l More...
 
AbstractFunctionSpaceElementaxpy (double alpha, AbstractFunctionSpaceElement const &l, std::string const role)
 
AbstractFunctionSpaceElementaxpy (double alpha, AbstractFunctionSpaceElement const &l)
 *this += alpha*l More...
 
AbstractFunctionSpaceElementaxpy_role (double alpha, AbstractFunctionSpaceElement const &l, std::string const role)
 
AbstractFunctionSpaceElementoperator+= (AbstractFunctionSpaceElement const &v)
 Basic vector arithmetic. More...
 
AbstractFunctionSpaceElementoperator-= (AbstractFunctionSpaceElement const &v)
 Basic vector arithmetic. More...
 
AbstractFunctionSpaceElementoperator*= (double lambda)
 Basic vector arithmetic. More...
 
AbstractFunctionSpaceElementoperator*= (std::vector< double >const &lambda)
 Scaling each component of the vector separately. More...
 
double applyAsDualTo (AbstractFunctionSpaceElement const &v, int component) const
 Interpret *this as a dual vector, and apply it to v. More...
 
double applyAsDualTo (AbstractFunctionSpaceElement const &v) const
 
double applyAsDualTo (AbstractFunctionSpaceElement const &v, std::string const &role) const
 
double applyAsDualTo_role (AbstractFunctionSpaceElement const &v, std::string const role) const
 
void swap (AbstractFunctionSpaceElement &v)
 Shallow swap. More...
 

Public Attributes

Implementation implementation
 

Friends

Implementation & getImpl (AbstractFunctionSpaceElement &v)
 Get the implementation of an AbstractFunctionSpaceElement. More...
 

Constructor & Destructor Documentation

◆ Vector() [1/2]

template<typename Implementation >
template<class Creator >
Kaskade::Bridge::Vector< Implementation >::Vector ( Creator creator)
inlineexplicit

Definition at line 199 of file newton_bridge.hh.

◆ Vector() [2/2]

template<typename Implementation >
Kaskade::Bridge::Vector< Implementation >::Vector ( Implementation const &  gi)
inlineexplicit

Definition at line 201 of file newton_bridge.hh.

Member Function Documentation

◆ applyAsDualTo() [1/3]

double Kaskade::AbstractFunctionSpaceElement::applyAsDualTo ( AbstractFunctionSpaceElement const &  v) const
inlineinherited

Definition at line 108 of file abstract_interface.hh.

◆ applyAsDualTo() [2/3]

double Kaskade::AbstractFunctionSpaceElement::applyAsDualTo ( AbstractFunctionSpaceElement const &  v,
int  component 
) const
inlineinherited

Interpret *this as a dual vector, and apply it to v.

Duality is currently not represented by types, hence users have to make sure that the dual pairing <*this,v> is mathematically meaningful. The standard implementation of the dual pairing in Bridge::Vector is the dot-product between the coordinate representations of *this and v. For that *this should be the result of AbstractLinearization::evald

Definition at line 103 of file abstract_interface.hh.

Referenced by Kaskade::AbstractFunctionSpaceElement::applyAsDualTo_role().

◆ applyAsDualTo() [3/3]

double Kaskade::AbstractFunctionSpaceElement::applyAsDualTo ( AbstractFunctionSpaceElement const &  v,
std::string const &  role 
) const
inlineinherited

Definition at line 113 of file abstract_interface.hh.

◆ applyAsDualTo_role()

double Kaskade::AbstractFunctionSpaceElement::applyAsDualTo_role ( AbstractFunctionSpaceElement const &  v,
std::string const  role 
) const
inlineinherited

◆ axpy() [1/3]

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::axpy ( double  alpha,
AbstractFunctionSpaceElement const &  l 
)
inlineinherited

*this += alpha*l

Definition at line 60 of file abstract_interface.hh.

◆ axpy() [2/3]

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::axpy ( double  alpha,
AbstractFunctionSpaceElement const &  l,
int  component 
)
inlineinherited

◆ axpy() [3/3]

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::axpy ( double  alpha,
AbstractFunctionSpaceElement const &  l,
std::string const  role 
)
inlineinherited

Definition at line 45 of file abstract_interface.hh.

◆ axpy_role()

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::axpy_role ( double  alpha,
AbstractFunctionSpaceElement const &  l,
std::string const  role 
)
inlineinherited

◆ clone()

template<typename Implementation >
virtual std::unique_ptr< AbstractFunctionSpaceElement > Kaskade::Bridge::Vector< Implementation >::clone ( ) const
inlinevirtual

Construction of a vector of the same type.

Implements Kaskade::AbstractFunctionSpaceElement.

Definition at line 203 of file newton_bridge.hh.

Referenced by Kaskade::Bridge::Vector< Implementation >::initZeroVector().

◆ doapplyAsDualTo()

template<typename Implementation >
virtual double Kaskade::Bridge::Vector< Implementation >::doapplyAsDualTo ( AbstractFunctionSpaceElement const &  v,
int  vbegin,
int  vend 
) const
inlinevirtual

Implements Kaskade::AbstractFunctionSpaceElement.

Definition at line 256 of file newton_bridge.hh.

◆ get() [1/2]

template<typename Implementation >
Implementation & Kaskade::Bridge::Vector< Implementation >::get ( )
inline

Access data.

Definition at line 219 of file newton_bridge.hh.

◆ get() [2/2]

template<typename Implementation >
Implementation const & Kaskade::Bridge::Vector< Implementation >::get ( ) const
inline

Access to the data.

Definition at line 216 of file newton_bridge.hh.

Referenced by Kaskade::Bridge::Vector< Implementation >::doapplyAsDualTo(), Kaskade::YetAnotherHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, RefinementStrategy, lump, components, ReferenceSolution, ReferenceOperator >::operator()(), Kaskade::YetAnotherHBErrorEstimator_Elasticity< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, RefinementStrategy, lump, components >::operator()(), Kaskade::GoalOrientedErrorEstimator< TemplateFunctional, OriginalVariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace >::operator()(), Kaskade::HierarchicalBasisErrorEstimator2< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverLA, LinearSolverHA, LinearSolverLM, LinearSolverHM, lumpM, RefinementStrategy >::operator()(), Kaskade::StateEquationHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverHA, RefinementStrategy >::operator()(), Kaskade::VariationalEquationHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverHA, RefinementStrategy >::operator()(), Kaskade::AdjointEquationHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverHA, RefinementStrategy >::operator()(), Kaskade::AdjointEquationLinearPropagationHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverLA, LinearSolverHA, LinearSolverLU, RefinementStrategy >::operator()(), Kaskade::AnotherHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverLA, LinearSolverHA, LinearSolverHU, LinearSolverLU, RefinementStrategy, lump >::operator()(), Kaskade::StupidHBErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverHA, RefinementStrategy >::operator()(), Kaskade::MartinsErrorEstimator< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSystemSolver_H, LinearSystemSolver_L, LinearSolverA_H, LinearSolverA_L, RefinementStrategy >::operator()(), Kaskade::HierarchicalBasisErrorEstimator3< Functional, VariableSetDescription, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, LinearSolverLA, LinearSolverHA, LinearSolverLM, LinearSolverHM, lumpM, RefinementStrategy >::operator()(), and Kaskade::HierarchicalBasisErrorEstimator< Functional, ExtensionVariableSetDescription, ExtensionSpace, NormFunctional, AdjustRHS >::operator()().

◆ getRole()

template<typename Implementation >
virtual std::string Kaskade::Bridge::Vector< Implementation >::getRole ( int  component) const
inlinevirtual

Implements Kaskade::AbstractFunctionSpaceElement.

Definition at line 241 of file newton_bridge.hh.

◆ initZeroVector()

template<typename Implementation >
virtual std::unique_ptr< AbstractFunctionSpaceElement > Kaskade::Bridge::Vector< Implementation >::initZeroVector ( ) const
inlinevirtual

Construction of a vector of the same type.

Implements Kaskade::AbstractFunctionSpaceElement.

Definition at line 208 of file newton_bridge.hh.

◆ nComponents()

template<typename Implementation >
int Kaskade::Bridge::Vector< Implementation >::nComponents ( ) const
inlinevirtual

◆ operator*=() [1/2]

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::operator*= ( double  lambda)
inlineinherited

Basic vector arithmetic.

Definition at line 84 of file abstract_interface.hh.

◆ operator*=() [2/2]

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::operator*= ( std::vector< double >const &  lambda)
inlineinherited

Scaling each component of the vector separately.

Definition at line 91 of file abstract_interface.hh.

◆ operator+=()

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::operator+= ( AbstractFunctionSpaceElement const &  v)
inlineinherited

Basic vector arithmetic.

Definition at line 80 of file abstract_interface.hh.

◆ operator-=()

AbstractFunctionSpaceElement & Kaskade::AbstractFunctionSpaceElement::operator-= ( AbstractFunctionSpaceElement const &  v)
inlineinherited

Basic vector arithmetic.

Definition at line 82 of file abstract_interface.hh.

◆ print()

template<typename Implementation >
virtual void Kaskade::Bridge::Vector< Implementation >::print ( std::string const &  message = "") const
inlinevirtual

Optional output.

Reimplemented from Kaskade::AbstractFunctionSpaceElement.

Definition at line 251 of file newton_bridge.hh.

◆ read() [1/2]

template<typename Implementation >
virtual void Kaskade::Bridge::Vector< Implementation >::read ( std::vector< double > const &  in)
inlinevirtual

Definition at line 226 of file newton_bridge.hh.

◆ read() [2/2]

template<typename Implementation >
virtual void Kaskade::Bridge::Vector< Implementation >::read ( std::vector< double > const &  in,
int  vbegin,
int  vend 
)
inlinevirtual

Definition at line 221 of file newton_bridge.hh.

◆ swap()

void Kaskade::AbstractFunctionSpaceElement::swap ( AbstractFunctionSpaceElement v)
inlineinherited

Shallow swap.

Definition at line 131 of file abstract_interface.hh.

Referenced by Kaskade::CompositeStep::updateIterate().

◆ write() [1/2]

template<typename Implementation >
virtual void Kaskade::Bridge::Vector< Implementation >::write ( std::vector< double > &  out) const
inlinevirtual

Definition at line 236 of file newton_bridge.hh.

◆ write() [2/2]

template<typename Implementation >
virtual void Kaskade::Bridge::Vector< Implementation >::write ( std::vector< double > &  out,
int  vbegin,
int  vend 
) const
inlinevirtual

Definition at line 231 of file newton_bridge.hh.

Friends And Related Function Documentation

◆ getImpl

template<typename Implementation >
Implementation & getImpl ( AbstractFunctionSpaceElement v)
friend

Get the implementation of an AbstractFunctionSpaceElement.

Definition at line 330 of file newton_bridge.hh.

Member Data Documentation

◆ implementation

template<typename Implementation >
Implementation Kaskade::Bridge::Vector< Implementation >::implementation

The documentation for this class was generated from the following files: