dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::AMGXInverseOperator< DF > Class Template Referenceabstract

AMGX solver context for PETSc Mat and PETSc Vec. More...

#include <dune/fem/solver/amgxsolver.hh>

Inheritance diagram for Dune::Fem::AMGXInverseOperator< DF >:
Inheritance graph

Public Types

typedef BaseType::SolverDiscreteFunctionType SolverDiscreteFunctionType
 
typedef BaseType::OperatorType OperatorType
 
typedef BaseType::PreconditionerType PreconditionerType
 
typedef BaseType::AssembledOperatorType AssembledOperatorType
 
typedef BaseType::DomainFunctionType DomainFunctionType
 
typedef BaseType::RangeFunctionType RangeFunctionType
 
typedef Traits::SolverParameterType SolverParameterType
 
typedef DomainFunction::RangeFieldType DomainFieldType
 field type of the operator's domain
 
typedef RangeFunction::RangeFieldType RangeFieldType
 field type of the operator's range
 

Public Member Functions

 AMGXInverseOperator (const AMGXSolverParameter &parameter=AMGXSolverParameter())
 constructor
 
 AMGXInverseOperator (const OperatorType &op, const AMGXSolverParameter &parameter=AMGXSolverParameter())
 
 AMGXInverseOperator (const OperatorType &op, PreconditionerType &preconditioner, const AMGXSolverParameter &parameter=AMGXSolverParameter())
 
 AMGXInverseOperator (const AMGXInverseOperator &other)
 
void bind (const OperatorType &op)
 
void unbind ()
 
virtual void operator() (const DomainFunctionType &u, RangeFunctionType &w) const
 application of operator to compute
 
void operator() (const DiscreteFunctionInterface< DImpl > &u, DiscreteFunctionInterface< RImpl > &w) const
 application of operator to compute
 
virtual void operator() (const DomainFunctionType &u, RangeFunctionType &w) const=0
 application operator
 
void bind (const OperatorType &op)
 store pointer to linear operator
 
void bind (const OperatorType &op, const PreconditionerType &preconditioner)
 store pointer to linear operator and preconditioner
 
int iterations () const
 return number of iterations used in previous call of application operator
 
virtual void setMaxLinearIterations (const int iter)
 set number of max linear iterations to be used before an exception is thrown
 
virtual void setMaxIterations (const int iter)
 
void setParameters (const SolverParameterType &newParams)
 set complete set of linear inverse operator parameters
 
SolverParameterTypeparameter () const
 
bool verbose () const
 
double averageCommTime () const
 return accumulated communication time
 
virtual void finalize ()
 finalization of operator
 

Protected Types

typedef BartonNackmanInterface< InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >, typename Traits::InverseOperatorTypeBase2Type
 
typedef Traits::InverseOperatorType InverseOperatorType
 

Protected Member Functions

void init (const AMGXSolverParameter &parameter)
 
int apply (const SolverDiscreteFunctionType &arg, SolverDiscreteFunctionType &dest) const
 
void opApply (const SolverDiscreteFunctionType &u, SolverDiscreteFunctionType &w) const
 
void opApply (const DiscreteFunctionInterface< DImpl > &u, DiscreteFunctionInterface< RImpl > &w) const
 
const Implementation & asImp () const
 
Implementation & asImp ()
 

Static Protected Member Functions

static const Implementation & asImp (const ThisType &other)
 
static Implementation & asImp (ThisType &other)
 

Protected Attributes

std::shared_ptr< SolverParameterTypeparameter_
 
const OperatorTypeoperator_
 
const AssembledOperatorTypeassembledOperator_
 
const PreconditionerTypepreconditioner_
 
std::unique_ptr< SolverDiscreteFunctionTyperhs_
 
std::unique_ptr< SolverDiscreteFunctionTypex_
 
int iterations_
 
bool rightHandSideCopied_
 
bool verbose_
 

Detailed Description

template<class DF>
class Dune::Fem::AMGXInverseOperator< DF >

AMGX solver context for PETSc Mat and PETSc Vec.

Member Typedef Documentation

◆ AssembledOperatorType

template<class DF >
typedef BaseType::AssembledOperatorType Dune::Fem::AMGXInverseOperator< DF >::AssembledOperatorType

◆ Base2Type

◆ DomainFieldType

typedef DomainFunction::RangeFieldType Dune::Fem::Operator< Traits::DiscreteFunctionType , Traits::DiscreteFunctionType >::DomainFieldType
inherited

field type of the operator's domain

◆ DomainFunctionType

◆ InverseOperatorType

typedef Traits::InverseOperatorType Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::InverseOperatorType
protectedinherited

◆ OperatorType

template<class DF >
typedef BaseType::OperatorType Dune::Fem::AMGXInverseOperator< DF >::OperatorType

◆ PreconditionerType

template<class DF >
typedef BaseType::PreconditionerType Dune::Fem::AMGXInverseOperator< DF >::PreconditionerType

◆ RangeFieldType

typedef RangeFunction::RangeFieldType Dune::Fem::Operator< Traits::DiscreteFunctionType , Traits::DiscreteFunctionType >::RangeFieldType
inherited

field type of the operator's range

◆ RangeFunctionType

◆ SolverDiscreteFunctionType

template<class DF >
typedef BaseType::SolverDiscreteFunctionType Dune::Fem::AMGXInverseOperator< DF >::SolverDiscreteFunctionType

◆ SolverParameterType

Constructor & Destructor Documentation

◆ AMGXInverseOperator() [1/4]

template<class DF >
Dune::Fem::AMGXInverseOperator< DF >::AMGXInverseOperator ( const AMGXSolverParameter parameter = AMGXSolverParameter())
inline

constructor

Parameters
[in]parameterparameter for the solver

◆ AMGXInverseOperator() [2/4]

template<class DF >
Dune::Fem::AMGXInverseOperator< DF >::AMGXInverseOperator ( const OperatorType op,
const AMGXSolverParameter parameter = AMGXSolverParameter() 
)
inline

◆ AMGXInverseOperator() [3/4]

template<class DF >
Dune::Fem::AMGXInverseOperator< DF >::AMGXInverseOperator ( const OperatorType op,
PreconditionerType preconditioner,
const AMGXSolverParameter parameter = AMGXSolverParameter() 
)
inline

◆ AMGXInverseOperator() [4/4]

template<class DF >
Dune::Fem::AMGXInverseOperator< DF >::AMGXInverseOperator ( const AMGXInverseOperator< DF > &  other)
inline

Member Function Documentation

◆ apply()

template<class DF >
int Dune::Fem::AMGXInverseOperator< DF >::apply ( const SolverDiscreteFunctionType arg,
SolverDiscreteFunctionType dest 
) const
inlineprotected

◆ asImp() [1/4]

template<class Interface , class Implementation >
Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/4]

template<class Interface , class Implementation >
const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ) const
inlineprotectedinherited

◆ asImp() [3/4]

template<class Interface , class Implementation >
static const Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( const ThisType other)
inlinestaticprotectedinherited

◆ asImp() [4/4]

template<class Interface , class Implementation >
static Implementation & Dune::Fem::BartonNackmanInterface< Interface, Implementation >::asImp ( ThisType other)
inlinestaticprotectedinherited

◆ averageCommTime()

double Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::averageCommTime ( ) const
inlineinherited

return accumulated communication time

◆ bind() [1/3]

template<class DF >
void Dune::Fem::AMGXInverseOperator< DF >::bind ( const OperatorType op)
inline

◆ bind() [2/3]

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::bind ( const OperatorType op)
inlineinherited

store pointer to linear operator

Parameters
oplinear operator following the Dune::Fem:Operator interface
Note
A dynamic cast to AssembledOperatorType is carried out. For some solvers this is necessary.

◆ bind() [3/3]

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::bind ( const OperatorType op,
const PreconditionerType preconditioner 
)
inlineinherited

store pointer to linear operator and preconditioner

Parameters
oplinear operator following the Dune::Fem:Operator interface
preconditionerprecondition operator
Note
A dynamic cast to AssembledOperatorType is carried out. For some solvers this is necessary.

◆ finalize()

virtual void Dune::Fem::Operator< Traits::DiscreteFunctionType , Traits::DiscreteFunctionType >::finalize ( )
inlinevirtualinherited

finalization of operator

Note
The default implementation is empty.

◆ init()

template<class DF >
void Dune::Fem::AMGXInverseOperator< DF >::init ( const AMGXSolverParameter parameter)
inlineprotected

◆ iterations()

int Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::iterations ( ) const
inlineinherited

return number of iterations used in previous call of application operator

◆ opApply() [1/2]

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::opApply ( const DiscreteFunctionInterface< DImpl > &  u,
DiscreteFunctionInterface< RImpl > &  w 
) const
inlineprotectedinherited

◆ opApply() [2/2]

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::opApply ( const SolverDiscreteFunctionType u,
SolverDiscreteFunctionType w 
) const
inlineprotectedinherited

◆ operator()() [1/3]

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::operator() ( const DiscreteFunctionInterface< DImpl > &  u,
DiscreteFunctionInterface< RImpl > &  w 
) const
inlineinherited

application of operator to compute

\[
   w = op^-1( u )
 \]

.

Parameters
uparameter right hand side of linear problem
winitial guess for linear solver
Note
Calling the inverse operator for arbitrary discrete functions a copy to solver compatible discrete function is made.

◆ operator()() [2/3]

virtual void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::operator() ( const DomainFunctionType u,
RangeFunctionType w 
) const
inlinevirtualinherited

application of operator to compute

\[
   w = op^-1( u )
 \]

.

Parameters
uparameter right hand side of linear problem
winitial guess for linear solver

◆ operator()() [3/3]

virtual void Dune::Fem::Operator< Traits::DiscreteFunctionType , Traits::DiscreteFunctionType >::operator() ( const DomainFunctionType u,
RangeFunctionType w 
) const
pure virtualinherited

application operator

Parameters
[in]uargument discrete function
[out]wdestination discrete function
Note
This method has to be implemented by all derived classes.

◆ parameter()

◆ setMaxIterations()

virtual void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::setMaxIterations ( const int  iter)
inlinevirtualinherited

◆ setMaxLinearIterations()

virtual void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::setMaxLinearIterations ( const int  iter)
inlinevirtualinherited

set number of max linear iterations to be used before an exception is thrown

Parameters
iternumber of max linear iterations

◆ setParameters()

void Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::setParameters ( const SolverParameterType newParams)
inlineinherited

set complete set of linear inverse operator parameters

Note
newParams set of new parameters

◆ unbind()

template<class DF >
void Dune::Fem::AMGXInverseOperator< DF >::unbind ( )
inline

◆ verbose()

bool Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::verbose ( ) const
inlineinherited

Member Data Documentation

◆ assembledOperator_

const AssembledOperatorType* Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::assembledOperator_
protectedinherited

◆ iterations_

int Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::iterations_
mutableprotectedinherited

◆ operator_

const OperatorType* Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::operator_
protectedinherited

◆ parameter_

std::shared_ptr<SolverParameterType> Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::parameter_
protectedinherited

◆ preconditioner_

const PreconditionerType* Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::preconditioner_
protectedinherited

◆ rhs_

std::unique_ptr< SolverDiscreteFunctionType > Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::rhs_
mutableprotectedinherited

◆ rightHandSideCopied_

bool Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::rightHandSideCopied_
mutableprotectedinherited

◆ verbose_

bool Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::verbose_
mutableprotectedinherited

◆ x_

std::unique_ptr< SolverDiscreteFunctionType > Dune::Fem::InverseOperatorInterface< AMGXInverseOperatorTraits< DF > >::x_
mutableprotectedinherited

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