Peano
Loading...
Searching...
No Matches
mghype::matrixfree::solvers::Solver Class Referenceabstract

Abstract base class for all solvers. More...

#include <Solver.h>

Inheritance diagram for mghype::matrixfree::solvers::Solver:
Collaboration diagram for mghype::matrixfree::solvers::Solver:

Public Member Functions

 Solver (const std::string &name, double tolerance)
 Construct the solver.
virtual std::string toString () const
virtual void beginMeshSweep ()=0
 End the traversal.
virtual void endMeshSweep ()=0
 Begin the traversal.
Public Member Functions inherited from mghype::matrixfree::solvers::SolverStatistics
 SolverStatistics (double tolerance=0.0)
bool terminationCriterionHolds ()
void updateGlobalResidual (double residual, const tarch::la::Vector< Dimensions, double > &h)
 Update the global residual.
void updateGlobalPrecondResidual (double residual)
void updateGlobalSolutionUpdates (double deltaU, const tarch::la::Vector< Dimensions, double > &h)
void updateMinMaxMeshSize (const tarch::la::Vector< Dimensions, double > &h)
void clearGlobalPrecondResidualUpdate ()
double getGlobalResidualMaxNorm () const
std::array< double, 2 > getGlobalPrecondResidualNorms () const
std::string toString () const
void merge (const SolverStatistics &statistics)
std::string reportPrecondNorms () const
void clearGlobalResidualAndSolutionUpdate ()
 Clear the global mesh stats.
void synchroniseGlobalResidualAndSolutionUpdate ()
 Synchronise the global stats between MPI ranks.

Protected Attributes

std::string _name
 Name of solver.
Protected Attributes inherited from mghype::matrixfree::solvers::SolverStatistics
const double _tolerance
double _minH
 Observed mesh width.
double _maxH
 Observed mesh width.
double _globalResidualMaxNorm
double _globalResidualEukledianNormSquared
double _globalResidualHNormSquared
double _initialGlobalResidualMaxNorm
double _initialGlobalResidualEukledianNormSquared
double _initialGlobalResidualHNormSquared
double _previousGlobalResidualMaxNorm
double _previousGlobalResidualEukledianNormSquared
double _previousGlobalResidualHNormSquared
double _globalDeltaUMaxNorm
double _globalDeltaUEukledianNormSquared
double _globalDeltaUHNormSquared
double _globalPrecondResidualMaxNorm
double _globalPrecondResidualEukledianNormSquared

Static Protected Attributes

static tarch::logging::Log _log
Static Protected Attributes inherited from mghype::matrixfree::solvers::SolverStatistics
static tarch::logging::Log _log

Detailed Description

Abstract base class for all solvers.

Definition at line 30 of file Solver.h.

Constructor & Destructor Documentation

◆ Solver()

mghype::matrixfree::solvers::Solver::Solver ( const std::string & name,
double tolerance )

Construct the solver.

Parameters
nameName of solver as used by toString()
toleranceTolerance where solver should terminate. If you pass in 0.1, then the solver will terminate as soon as all residuals have been reduced to 10% of their initial value.

Member Function Documentation

◆ beginMeshSweep()

virtual void mghype::matrixfree::solvers::Solver::beginMeshSweep ( )
pure virtual

End the traversal.

Has to be implemented in subclass. Most solvers synchronise the global statistics, and then print some output.

◆ endMeshSweep()

virtual void mghype::matrixfree::solvers::Solver::endMeshSweep ( )
pure virtual

Begin the traversal.

Most solvers invoke clearGlobalResidualAndSolutionUpdate().

◆ toString()

virtual std::string mghype::matrixfree::solvers::Solver::toString ( ) const
virtual

Field Documentation

◆ _log

tarch::logging::Log mghype::matrixfree::solvers::Solver::_log
staticprotected

Definition at line 60 of file Solver.h.

◆ _name

std::string mghype::matrixfree::solvers::Solver::_name
protected

Name of solver.

Usually only used for debuggin purposes

Definition at line 67 of file Solver.h.

Referenced by api.Tree.Tree::__str__(), solvers.aderdg.ADERDG.ADERDG::__str__(), solvers.elliptic.AMRMarker.AMRMarker::__str__(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::__str__(), solvers.fv.FV.FV::__str__(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::__str__(), solvers.fv.EnclaveTasking.EnclaveTasking::_enclave_task_name(), solvers.aderdg.ADERDG.ADERDG::_generate_kernels(), solvers.aderdg.ADERDG.ADERDG::_init_dictionary_with_default_parameters(), solvers.fv.FV.FV::_init_dictionary_with_default_parameters(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_init_dictionary_with_default_parameters(), solvers.aderdg.ADERDG.ADERDG::_interpolate_face_data_default_guard(), solvers.aderdg.SingleSweep.SingleSweep::_interpolate_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_load_cell_data_default_guard(), solvers.fv.FV.FV::_load_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_load_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_load_face_data_default_guard(), solvers.fv.FV.FV::_load_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_load_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_provide_cell_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV::_provide_cell_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_provide_cell_data_to_compute_kernels_default_guard(), solvers.aderdg.ADERDG.ADERDG::_provide_face_data_to_compute_kernels_default_guard(), solvers.fv.FV.FV::_provide_face_data_to_compute_kernels_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_provide_face_data_to_compute_kernels_default_guard(), solvers.aderdg.SingleSweep.SingleSweep::_restrict_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_store_boundary_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_store_cell_data_default_guard(), solvers.fv.FV.FV::_store_cell_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_store_cell_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_store_face_data_default_guard(), solvers.fv.FV.FV::_store_face_data_default_guard(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_store_face_data_default_guard(), solvers.aderdg.ADERDG.ADERDG::_unknown_identifier(), solvers.elliptic.AMRMarker.AMRMarker::_unknown_identifier(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::_unknown_identifier(), solvers.fv.FV.FV::_unknown_identifier(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_unknown_identifier(), solvers.fv.FV.FV::add_actions_to_checkpoint_solution(), solvers.fv.EnclaveTasking.EnclaveTasking::add_actions_to_create_grid(), solvers.fv.EnclaveTasking.EnclaveTasking::add_actions_to_init_grid(), solvers.aderdg.ADERDG.ADERDG::add_actions_to_plot_solution(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::add_actions_to_plot_solution(), solvers.fv.FV.FV::add_actions_to_plot_solution(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::add_actions_to_plot_solution(), solvers.fv.EnclaveTasking.EnclaveTasking::add_entries_to_text_replacement_dictionary(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking::add_entries_to_text_replacement_dictionary(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation::add_implementation_files_to_project(), api.solvers.DiscontinuousGalerkinDiscretisation.DiscontinuousGalerkinDiscretisation::add_implementation_files_to_project(), solvers.aderdg.ADERDG.ADERDG::add_implementation_files_to_project(), solvers.elliptic.AMRMarker.AMRMarker::add_to_Peano4_datamodel(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::add_to_Peano4_datamodel(), api.solvers.CollocatedLowOrderDiscretisation.CollocatedLowOrderDiscretisation::add_to_plot(), solvers.aderdg.SingleSweep.SingleSweep::create_action_sets(), solvers.fv.rusanov.LocalTimeStepWithEnclaveTasking.LocalTimeStepWithEnclaveTasking::create_action_sets(), solvers.fv.rusanov.SubcyclingAdaptiveTimeStepWithEnclaveTasking.SubcyclingAdaptiveTimeStepWithEnclaveTasking::create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStep.SubcyclingFixedTimeStep::create_action_sets(), solvers.fv.rusanov.SubcyclingFixedTimeStepWithEnclaveTasking.SubcyclingFixedTimeStepWithEnclaveTasking::create_action_sets(), solvers.rkdg.SeparateSweeps.SeparateSweeps::create_action_sets(), solvers.fv.SingleSweep.SingleSweep::create_data_structures(), solvers.aderdg.ADERDG.ADERDG::get_name_of_global_instance(), solvers.elliptic.AMRMarker.AMRMarker::get_name_of_global_instance(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::get_name_of_global_instance(), solvers.fv.FV.FV::get_name_of_global_instance(), solvers.rkdg.RungeKuttaDG.RungeKuttaDG::get_name_of_global_instance(), api.solvers.Solver.Solver::name(), solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::name(), solvers.fv.FV.FV::name(), and api.solvers.Solver.Solver::typename().


The documentation for this class was generated from the following file:
  • src/mghype/matrixfree/solvers/Solver.h