KASKADE 7 development version
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId > Class Template Reference

#include <istlinterface.hh>

Detailed Description

template<class NormalStepAssembler, class TangentialStepAssembler, int stateId = 1, int controlId = 0, int adjointId = 2>
class Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >
Todo:
docme

Definition at line 1124 of file istlinterface.hh.

Inheritance diagram for Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >:

Classes

struct  NormalStepApplyScaleAdd
 
struct  TangentialStepApplyScaleAdd
 

Public Types

typedef NormalStepAssembler::Scalar Scalar
 
typedef MatrixAsTriplet< ScalarTriplet
 
typedef IstlInterfaceDetail::BlockInfo< firstRow, lastRow, firstCol, lastCol > BlockInfo
 

Public Member Functions

 LagrangeOperator (NormalStepAssembler const &normalStepAssembler_, TangentialStepAssembler const &tangentialStepAssembler_, bool onlyLowerTriangle_=false, int nThreads_=0)
 
virtual ~LagrangeOperator ()
 
void update ()
 update operator if grid has changed or assemble(...) has been called. More...
 
virtual MatrixAsTriplet< ScalargetTriplet () const
 
template<class Vector >
void rangeToVector (Range const &y, Vector &coefficients) const
 returns a reference to the matrix More...
 
template<class Vector >
void domainToVector (Domain const &x, Vector &coefficients) const
 Get coefficients vector \(coefficients\in\mathbb{K}^n\) from \(x\in X\). More...
 
template<class Vector >
void vectorToDomain (Vector const &coefficients, Domain &x) const
 Get \(x\in X\) from coefficients vector \(coefficients\in\mathbb{K}^n\). More...
 
template<class Vector >
void vectorToRange (Vector const &coefficients, Range &x) const
 Get \( y\in Y \) from coefficient vector \(coefficients\in\mathbb{K}^m\) Apply \(S^{-1}_Y\) to \(coefficients\): \(x=S^{-1}_Y(y)\). More...
 
virtual void apply (Domain const &x, Range &b) const
 compute \( b \leftarrow Ax \) More...
 
virtual Scalar applyDp (Domain const &x, Range &b) const
 Computes \( b \leftarrow Ax \) and, in case \( A \) is symmetric, also \( \langle x, b \rangle \). More...
 
virtual Scalar dp (Domain const &x, Range const &y) const
 
virtual void applyscaleadd (Scalar alpha, Domain const &x, Range &b) const
 Compute \(b=b+\alpha Ax\) Note that x and b must not refer to the same memory locations (in case Domain==Range). More...
 

Static Public Attributes

static int const category = Dune::SolverCategory::sequential
 

Protected Types

typedef IstlInterfaceDetail::AllBlocks< NormalStepAssembler >::result AllNormalStepBlocksSeq
 Provides access to the underlying assembler. More...
 
typedef IstlInterfaceDetail::AllBlocks< TangentialStepAssembler >::result AllTangentialStepBlocksSeq
 
typedef boost::fusion::result_of::filter_if< AllNormalStepBlocksSeq, NormalStepBlockFilter >::type FilteredNormalStepBlocksSeq
 
typedef boost::fusion::result_of::filter_if< AllTangentialStepBlocksSeq, TangentialStepBlockFilter >::type FilteredTangentialStepBlocksSeq
 
typedef boost::fusion::result_of::as_vector< AllNormalStepBlocksSeq >::type AllNormalStepBlocks
 
typedef boost::fusion::result_of::as_vector< AllTangentialStepBlocksSeq >::type AllTangentialStepBlocks
 
typedef boost::fusion::result_of::as_vector< FilteredNormalStepBlocksSeq >::type FilteredNormalStepBlocks
 
typedef boost::fusion::result_of::as_vector< FilteredTangentialStepBlocksSeq >::type FilteredTangentialStepBlocks
 
typedef boost::fusion::result_of::as_vector< typenameboost::fusion::result_of::transform< FilteredNormalStepBlocks, IstlInterfaceDetail::Translate< firstRow, firstCol > >::type >::type NormalBlocks
 
typedef boost::fusion::result_of::as_vector< typenameboost::fusion::result_of::transform< FilteredTangentialStepBlocks, IstlInterfaceDetail::Translate< 0, 0 > >::type >::type TangentialBlocks
 

Protected Attributes

bool onlyLowerTriangle
 
NormalStepAssembler const & normalStepAssembler
 
TangentialStepAssembler const & tangentialStepAssembler
 
NormalBlocks normalStepBlocks
 
TangentialBlocks tangentialStepBlocks
 
bool isSymmetric
 
int nThreads
 

Member Typedef Documentation

◆ AllNormalStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<AllNormalStepBlocksSeq>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::AllNormalStepBlocks
protected

Definition at line 1317 of file istlinterface.hh.

◆ AllNormalStepBlocksSeq

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef IstlInterfaceDetail::AllBlocks<NormalStepAssembler>::result Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::AllNormalStepBlocksSeq
protected

Provides access to the underlying assembler.

Definition at line 1312 of file istlinterface.hh.

◆ AllTangentialStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<AllTangentialStepBlocksSeq>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::AllTangentialStepBlocks
protected

Definition at line 1318 of file istlinterface.hh.

◆ AllTangentialStepBlocksSeq

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef IstlInterfaceDetail::AllBlocks<TangentialStepAssembler>::result Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::AllTangentialStepBlocksSeq
protected

Definition at line 1313 of file istlinterface.hh.

◆ BlockInfo

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef IstlInterfaceDetail::BlockInfo<firstRow,lastRow,firstCol,lastCol> Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::BlockInfo

Definition at line 1139 of file istlinterface.hh.

◆ FilteredNormalStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<FilteredNormalStepBlocksSeq>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::FilteredNormalStepBlocks
protected

Definition at line 1319 of file istlinterface.hh.

◆ FilteredNormalStepBlocksSeq

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::filter_if<AllNormalStepBlocksSeq,NormalStepBlockFilter>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::FilteredNormalStepBlocksSeq
protected

Definition at line 1314 of file istlinterface.hh.

◆ FilteredTangentialStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<FilteredTangentialStepBlocksSeq>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::FilteredTangentialStepBlocks
protected

Definition at line 1320 of file istlinterface.hh.

◆ FilteredTangentialStepBlocksSeq

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::filter_if<AllTangentialStepBlocksSeq,TangentialStepBlockFilter>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::FilteredTangentialStepBlocksSeq
protected

Definition at line 1315 of file istlinterface.hh.

◆ NormalBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<typenameboost::fusion::result_of::transform<FilteredNormalStepBlocks,IstlInterfaceDetail::Translate<firstRow,firstCol>>::type>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::NormalBlocks
protected

Definition at line 1322 of file istlinterface.hh.

◆ Scalar

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef NormalStepAssembler::Scalar Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::Scalar

Definition at line 1136 of file istlinterface.hh.

◆ TangentialBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef boost::fusion::result_of::as_vector<typenameboost::fusion::result_of::transform<FilteredTangentialStepBlocks,IstlInterfaceDetail::Translate<0,0>>::type>::type Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::TangentialBlocks
protected

Definition at line 1323 of file istlinterface.hh.

◆ Triplet

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
typedef MatrixAsTriplet<Scalar> Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::Triplet

Definition at line 1137 of file istlinterface.hh.

Constructor & Destructor Documentation

◆ LagrangeOperator()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::LagrangeOperator ( NormalStepAssembler const &  normalStepAssembler_,
TangentialStepAssembler const &  tangentialStepAssembler_,
bool  onlyLowerTriangle_ = false,
int  nThreads_ = 0 
)
inline
Parameters
opthe variational assembler.
onlyLowerTriangle
nThreadsuse given number of threads (or a machine-dependent default if nThreads<=0).

Definition at line 1148 of file istlinterface.hh.

◆ ~LagrangeOperator()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::~LagrangeOperator ( )
inlinevirtual

Definition at line 1156 of file istlinterface.hh.

Member Function Documentation

◆ apply()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::apply ( Domain const &  x,
Range &  b 
) const
inlinevirtual

compute \( b \leftarrow Ax \)

Definition at line 1265 of file istlinterface.hh.

◆ applyDp()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual Scalar Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::applyDp ( Domain const &  x,
Range &  b 
) const
inlinevirtual

Computes \( b \leftarrow Ax \) and, in case \( A \) is symmetric, also \( \langle x, b \rangle \).

If \( A \) is not symmetric, zero is returned.

Definition at line 1277 of file istlinterface.hh.

◆ applyscaleadd()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::applyscaleadd ( Scalar  alpha,
Domain const &  x,
Range &  b 
) const
inlinevirtual

Compute \(b=b+\alpha Ax\) Note that x and b must not refer to the same memory locations (in case Domain==Range).

Definition at line 1294 of file istlinterface.hh.

◆ domainToVector()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
template<class Vector >
void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::domainToVector ( Domain const &  x,
Vector &  coefficients 
) const
inline

Get coefficients vector \(coefficients\in\mathbb{K}^n\) from \(x\in X\).

Apply \(S_X\) to \(x\in X\): \(coefficients=S_X(x)\).

The used vector type Vector must provide:

  • its iterator type via typename Vector::iterator
  • (possibly overloads of) the free functions:
    • typename Vector::iterator std::begin(Vector&);

Definition at line 1229 of file istlinterface.hh.

◆ dp()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual Scalar Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::dp ( Domain const &  x,
Range const &  y 
) const
inlinevirtual

Definition at line 1284 of file istlinterface.hh.

◆ getTriplet()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
virtual MatrixAsTriplet< Scalar > Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::getTriplet ( ) const
inlinevirtual

Definition at line 1166 of file istlinterface.hh.

◆ rangeToVector()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
template<class Vector >
void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::rangeToVector ( Range const &  y,
Vector &  coefficients 
) const
inline

returns a reference to the matrix

Get coefficient vector \(coefficients\in\mathbb{K}^m\) from \(y\in Y\). Apply \(S_Y\) to \(y\in Y\): \(coefficients=S_Y(y)\).

The used vector type Vector must provide:

  • its iterator type via typename Vector::iterator
  • (possibly overloads of) the free functions:
    • typename Vector::iterator std::begin(Vector&);

Definition at line 1215 of file istlinterface.hh.

◆ update()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::update ( )
inline

update operator if grid has changed or assemble(...) has been called.

Definition at line 1159 of file istlinterface.hh.

◆ vectorToDomain()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
template<class Vector >
void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::vectorToDomain ( Vector const &  coefficients,
Domain &  x 
) const
inline

Get \(x\in X\) from coefficients vector \(coefficients\in\mathbb{K}^n\).

Apply \(S^{-1}_X\) to \(coefficients\): \(x=S^{-1}_X(x)\).

The used vector type Vector must provide:

  • its iterator type via typename Vector::const_iterator
  • (possibly overloads of) the free functions:
    • typename Vector::const_iterator std::begin(Vector const&);

Definition at line 1244 of file istlinterface.hh.

◆ vectorToRange()

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
template<class Vector >
void Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::vectorToRange ( Vector const &  coefficients,
Range &  x 
) const
inline

Get \( y\in Y \) from coefficient vector \(coefficients\in\mathbb{K}^m\) Apply \(S^{-1}_Y\) to \(coefficients\): \(x=S^{-1}_Y(y)\).

The used vector type Vector must provide:

  • its iterator type via typename Vector::const_iterator
  • (possibly overloads of) the free functions:
    • typename Vector::const_iterator std::begin(Vector const&);

Definition at line 1259 of file istlinterface.hh.

Member Data Documentation

◆ category

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
int const Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::category = Dune::SolverCategory::sequential
static

Definition at line 1141 of file istlinterface.hh.

◆ isSymmetric

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
bool Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::isSymmetric
protected

Definition at line 1332 of file istlinterface.hh.

◆ normalStepAssembler

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
NormalStepAssembler const& Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::normalStepAssembler
protected

◆ normalStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
NormalBlocks Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::normalStepBlocks
protected

◆ nThreads

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
int Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::nThreads
protected

Definition at line 1333 of file istlinterface.hh.

◆ onlyLowerTriangle

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
bool Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::onlyLowerTriangle
protected

◆ tangentialStepAssembler

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
TangentialStepAssembler const& Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::tangentialStepAssembler
protected

◆ tangentialStepBlocks

template<class NormalStepAssembler , class TangentialStepAssembler , int stateId = 1, int controlId = 0, int adjointId = 2>
TangentialBlocks Kaskade::LagrangeOperator< NormalStepAssembler, TangentialStepAssembler, stateId, controlId, adjointId >::tangentialStepBlocks
protected

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