A high-level interface for a PDESolver. More...
#include <dumux/common/pdesolver.hh>
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.
A | Assembler for linearized system of the PDE |
LS | Linear system solver |
Public Types | |
using | Assembler = A |
export the assembler and linear solver types More... | |
using | LinearSolver = LS |
using | Variables = Detail::PDESolver::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 bool | apply (Variables &vars)=0 |
Solve the given PDE system (usually assemble + solve linear system + update) More... | |
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 Assembler & | assembler () const |
Access the assembler. More... | |
Assembler & | assembler () |
Access the assembler. More... | |
const LinearSolver & | linearSolver () const |
Access the linear solver. More... | |
Protected Member Functions | |
LinearSolver & | linearSolver () |
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... | |
template<class M > | |
bool | checkSizesOfSubMatrices (const M &) const |
Default implementation for any matrix type. More... | |
using Dumux::PDESolver< A, LS >::Assembler = A |
using Dumux::PDESolver< A, LS >::LinearSolver = LS |
using Dumux::PDESolver< A, LS >::Variables = Detail::PDESolver::AssemblerVariables<Assembler> |
|
inline |
assembler | pointer to the assembler of the linear system |
linearSolver | pointer to the solver of the resulting linear system |
|
virtualdefault |
|
pure virtual |
vars | instance of the Variables class representing a numerical solution, defining primary and possibly secondary variables and information on the time level. |
Variables
will represent the solution. If the solver does not converge, it may be the case that they are in some intermediate (implementation-dependent) state. Implemented in Dumux::LinearPDESolver< Assembler, LinearSolver, Comm >, Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::MPIHelper::MPICommunicator > >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::No_Comm > >, and Dumux::NewtonSolver< Assembler, LinearSolver, PartialReassembler< Assembler >, Dune::Communication< Dune::MPIHelper::MPICommunicator > >.
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
pure virtual |
vars | instance of the Variables class representing a numerical solution, defining primary and possibly secondary variables and information on the time level. |
Implemented in Dumux::LinearPDESolver< Assembler, LinearSolver, Comm >, Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::MPIHelper::MPICommunicator > >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::No_Comm > >, and Dumux::NewtonSolver< Assembler, LinearSolver, PartialReassembler< Assembler >, Dune::Communication< Dune::MPIHelper::MPICommunicator > >.
|
inlinevirtual |
vars | instance of the Variables class representing a numerical solution |
timeLoop | a reference to the current time loop |
Reimplemented in Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::MPIHelper::MPICommunicator > >, Dumux::NewtonSolver< Assembler, LinearSolver, DefaultPartialReassembler, Dune::Communication< Dune::No_Comm > >, and Dumux::NewtonSolver< Assembler, LinearSolver, PartialReassembler< Assembler >, Dune::Communication< Dune::MPIHelper::MPICommunicator > >.