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

A high-level interface for a PDESolver. More...

#include <dumux/common/pdesolver.hh>

Inheritance diagram for Dumux::PDESolver< Assembler, LinearSolver >:

Description

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

A high-level interface for a PDESolver.

A PDESolver is constructed with an assembler and a linear solver and has a method solve that linearizes (if not already linear), assembles, solves and updates given an initial solution producing a new solution.

Template Parameters
AssemblerA PDE linearized system assembler
LinearSolverA linear system solver

Public Member Functions

 PDESolver (std::shared_ptr< Assembler > assembler, std::shared_ptr< LinearSolver > linearSolver)
 
virtual ~PDESolver ()=default
 
virtual void solve (SolutionVector &sol)=0
 Solve the given PDE system (usually assemble + solve linear system + update) 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

◆ PDESolver()

template<class Assembler , class LinearSolver >
Dumux::PDESolver< Assembler, LinearSolver >::PDESolver ( std::shared_ptr< Assembler >  assembler,
std::shared_ptr< LinearSolver linearSolver 
)
inline

◆ ~PDESolver()

template<class Assembler , class LinearSolver >
virtual Dumux::PDESolver< Assembler, LinearSolver >::~PDESolver ( )
virtualdefault

Member Function Documentation

◆ assembler() [1/2]

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

Access the assembler.

◆ assembler() [2/2]

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

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
inlineprotected

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 ( )
inlineprotected

Access the linear solver.

◆ linearSolver() [2/2]

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

Access the linear solver.

◆ solve() [1/2]

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

Solve the given PDE system (usually assemble + solve linear system + update)

Parameters
sola solution vector possbilty containing an initial solution

Implemented in Dumux::LinearPDESolver< Assembler, LinearSolver >, 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 >
virtual void Dumux::PDESolver< Assembler, LinearSolver >::solve ( SolutionVector &  sol,
TimeLoop timeLoop 
)
inlinevirtual

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 > >.


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