3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | Protected Member Functions | List of all members
Dumux::LinearPDESolver< Assembler, LinearSolver > Class Template Reference

An implementation of a linear PDE solver. More...

#include <dumux/linear/pdesolver.hh>

Inheritance diagram for Dumux::LinearPDESolver< Assembler, LinearSolver >:
Inheritance graph

Description

template<class Assembler, class LinearSolver>
class Dumux::LinearPDESolver< Assembler, LinearSolver >

An implementation of a linear PDE solver.

Template Parameters
Assemblerthe assembler
LinearSolverthe linear solver
Commthe communication object used to communicate with all processes
Note
If you want to specialize only some methods but are happy with the defaults of the reference solver, derive your solver from this class and simply overload the required methods.

Public Member Functions

 LinearPDESolver (std::shared_ptr< Assembler > assembler, std::shared_ptr< LinearSolver > linearSolver, const std::string &paramGroup="")
 The Constructor. More...
 
void solve (SolutionVector &uCurrentIter) override
 Solve a linear PDE system. More...
 
void report (std::ostream &sout=std::cout) const
 output statistics / report More...
 
Scalar suggestTimeStepSize (Scalar oldTimeStep) const
 Suggest a new time-step size based on the old time-step size. More...
 
void setVerbose (bool val)
 Specifies if the solver ought to be chatty. More...
 
bool verbose () const
 Returns true if the solver ought to be chatty. More...
 
const std::string & paramGroup () const
 Returns the parameter group. More...
 
virtual void solve (SolutionVector &sol, TimeLoop &timeLoop)
 Solve the given PDE system with time step control. More...
 

Protected Member Functions

const Assembler & assembler () const
 Access the assembler. More...
 
Assembler & assembler ()
 Access the assembler. More...
 
const LinearSolverlinearSolver () const
 Access the linear solver. More...
 
LinearSolverlinearSolver ()
 Access the linear solver. More...
 
template<class FirstRow , class ... Args>
bool checkSizesOfSubMatrices (const Dune::MultiTypeBlockMatrix< FirstRow, Args... > &matrix) const
 Helper function to assure the MultiTypeBlockMatrix's sub-blocks have the correct sizes. More...
 

Constructor & Destructor Documentation

◆ LinearPDESolver()

template<class Assembler , class LinearSolver >
Dumux::LinearPDESolver< Assembler, LinearSolver >::LinearPDESolver ( std::shared_ptr< Assembler >  assembler,
std::shared_ptr< LinearSolver linearSolver,
const std::string &  paramGroup = "" 
)
inline

The Constructor.

Member Function Documentation

◆ assembler() [1/2]

template<class Assembler , class LinearSolver >
Assembler & Dumux::PDESolver< Assembler, LinearSolver >::assembler ( )
inlineprotectedinherited

Access the assembler.

◆ assembler() [2/2]

template<class Assembler , class LinearSolver >
const Assembler & Dumux::PDESolver< Assembler, LinearSolver >::assembler ( ) const
inlineprotectedinherited

Access the assembler.

◆ checkSizesOfSubMatrices()

template<class Assembler , class LinearSolver >
template<class FirstRow , class ... Args>
bool Dumux::PDESolver< Assembler, LinearSolver >::checkSizesOfSubMatrices ( const Dune::MultiTypeBlockMatrix< FirstRow, Args... > &  matrix) const
inlineprotectedinherited

Helper function to assure the MultiTypeBlockMatrix's sub-blocks have the correct sizes.

◆ linearSolver() [1/2]

template<class Assembler , class LinearSolver >
LinearSolver & Dumux::PDESolver< Assembler, LinearSolver >::linearSolver ( )
inlineprotectedinherited

Access the linear solver.

◆ linearSolver() [2/2]

template<class Assembler , class LinearSolver >
const LinearSolver & Dumux::PDESolver< Assembler, LinearSolver >::linearSolver ( ) const
inlineprotectedinherited

Access the linear solver.

◆ paramGroup()

template<class Assembler , class LinearSolver >
const std::string & Dumux::LinearPDESolver< Assembler, LinearSolver >::paramGroup ( ) const
inline

Returns the parameter group.

◆ report()

template<class Assembler , class LinearSolver >
void Dumux::LinearPDESolver< Assembler, LinearSolver >::report ( std::ostream &  sout = std::cout) const
inline

output statistics / report

Todo:
Implement some solver statistics output

◆ setVerbose()

template<class Assembler , class LinearSolver >
void Dumux::LinearPDESolver< Assembler, LinearSolver >::setVerbose ( bool  val)
inline

Specifies if the solver ought to be chatty.

◆ solve() [1/2]

template<class Assembler , class LinearSolver >
virtual void Dumux::PDESolver< Assembler, LinearSolver >::solve ( SolutionVector &  sol,
TimeLoop timeLoop 
)
inlinevirtualinherited

Solve the given PDE system with time step control.

Note
This is used for solvers that are allowed to e.g. automatically reduce the time step if the solve was not successful
Parameters
sola solution vector possbilty containing an initial solution
timeLoopa reference to the current time loop

Reimplemented in Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >, and Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::CollectiveCommunication< Dune::MPIHelper::MPICommunicator > >.

◆ solve() [2/2]

template<class Assembler , class LinearSolver >
void Dumux::LinearPDESolver< Assembler, LinearSolver >::solve ( SolutionVector &  uCurrentIter)
inlineoverridevirtual

Solve a linear PDE system.

Implements Dumux::PDESolver< Assembler, LinearSolver >.

◆ suggestTimeStepSize()

template<class Assembler , class LinearSolver >
Scalar Dumux::LinearPDESolver< Assembler, LinearSolver >::suggestTimeStepSize ( Scalar  oldTimeStep) const
inline

Suggest a new time-step size based on the old time-step size.

Note
For compatibility with other PDE solvers (e.g. Newton)

◆ verbose()

template<class Assembler , class LinearSolver >
bool Dumux::LinearPDESolver< Assembler, LinearSolver >::verbose ( ) const
inline

Returns true if the solver ought to be chatty.


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