version 3.11-dev
Loading...
Searching...
No Matches
Dumux::PDESolver< A, LS > Class Template Referenceabstract

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

#include <dumux/common/pdesolver.hh>

Inheritance diagram for Dumux::PDESolver< A, LS >:

Description

template<class A, class LS>
class Dumux::PDESolver< A, LS >

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
AAssembler for linearized system of the PDE
LSLinear system solver

Public Types

using Assembler = A
 export the assembler and linear solver types
using LinearSolver = LS
using Variables = Detail::PDESolver::AssemblerVariables<Assembler>
 export the type of variables that represent a numerical solution

Public Member Functions

 PDESolver (std::shared_ptr< Assembler > assembler, std::shared_ptr< LinearSolver > linearSolver)
 Constructor.
virtual ~PDESolver ()=default
virtual bool apply (Variables &vars)=0
 Solve the given PDE system (usually assemble + solve linear system + update).
virtual void solve (Variables &vars)=0
 Solve the given PDE system (usually assemble + solve linear system + update).
virtual void solve (Variables &vars, TimeLoop &timeLoop)
 Solve the given PDE system with time step control.
const Assembler & assembler () const
 Access the assembler.
Assembler & assembler ()
 Access the assembler.
const LinearSolver & linearSolver () const
 Access the linear solver.

Protected Member Functions

LinearSolver & linearSolver ()
 Access the linear solver.
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.
template<class M>
bool checkSizesOfSubMatrices (const M &) const
 Default implementation for any matrix type.

Member Typedef Documentation

◆ Assembler

template<class A, class LS>
using Dumux::PDESolver< A, LS >::Assembler = A

◆ LinearSolver

template<class A, class LS>
using Dumux::PDESolver< A, LS >::LinearSolver = LS

◆ Variables

template<class A, class LS>
using Dumux::PDESolver< A, LS >::Variables = Detail::PDESolver::AssemblerVariables<Assembler>

Constructor & Destructor Documentation

◆ PDESolver()

template<class A, class LS>
Dumux::PDESolver< A, LS >::PDESolver ( std::shared_ptr< Assembler > assembler,
std::shared_ptr< LinearSolver > linearSolver )
inline
Parameters
assemblerpointer to the assembler of the linear system
linearSolverpointer to the solver of the resulting linear system

◆ ~PDESolver()

template<class A, class LS>
virtual Dumux::PDESolver< A, LS >::~PDESolver ( )
virtualdefault

Member Function Documentation

◆ apply()

◆ assembler() [1/2]

template<class A, class LS>
Assembler & Dumux::PDESolver< A, LS >::assembler ( )
inline

◆ assembler() [2/2]

template<class A, class LS>
const Assembler & Dumux::PDESolver< A, LS >::assembler ( ) const
inline

◆ checkSizesOfSubMatrices() [1/2]

template<class A, class LS>
template<class FirstRow, class ... Args>
bool Dumux::PDESolver< A, LS >::checkSizesOfSubMatrices ( const Dune::MultiTypeBlockMatrix< FirstRow, Args... > & matrix) const
inlineprotected

◆ checkSizesOfSubMatrices() [2/2]

template<class A, class LS>
template<class M>
bool Dumux::PDESolver< A, LS >::checkSizesOfSubMatrices ( const M & ) const
inlineprotected

◆ linearSolver() [1/2]

template<class A, class LS>
LinearSolver & Dumux::PDESolver< A, LS >::linearSolver ( )
inlineprotected

◆ linearSolver() [2/2]

template<class A, class LS>
const LinearSolver & Dumux::PDESolver< A, LS >::linearSolver ( ) const
inline

◆ solve() [1/2]

template<class A, class LS>
virtual void Dumux::PDESolver< A, LS >::solve ( Variables & vars)
pure virtual

◆ solve() [2/2]

template<class A, class LS>
virtual void Dumux::PDESolver< A, LS >::solve ( Variables & vars,
TimeLoop & timeLoop )
inlinevirtual

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