3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Protected Member Functions | List of all members
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 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
AAssembler for linearized system of the PDE
LSLinear system solver

Public Types

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

Public Member Functions

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

Protected Member Functions

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

Member Typedef Documentation

◆ Assembler

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

export the assembler and linear solver types

◆ 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::AssemblerVariables<Assembler>

export the type of variables that represent a numerical solution

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

Constructor.

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

◆ assembler() [1/2]

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

Access the assembler.

◆ assembler() [2/2]

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

Access the assembler.

◆ checkSizesOfSubMatrices()

template<class A , class LS >
template<class FirstRow , class ... Args>
bool Dumux::PDESolver< A, LS >::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 A , class LS >
LinearSolver & Dumux::PDESolver< A, LS >::linearSolver ( )
inlineprotected

Access the linear solver.

◆ linearSolver() [2/2]

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

Access the linear solver.

◆ solve() [1/2]

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

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

Parameters
varsinstance of the Variables class representing a numerical solution, defining primary and possibly secondary variables and information on the time level.

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

◆ solve() [2/2]

template<class A , class LS >
virtual void Dumux::PDESolver< A, LS >::solve ( Variables vars,
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
varsinstance of the Variables class representing a numerical solution
timeLoopa reference to the current time loop

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


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