![]() |
Peano
|
Abstract base class for all solvers. More...
#include <Solver.h>
Public Member Functions | |
Solver (const std::string &name, double tolerance) | |
Construct the solver. | |
virtual bool | terminationCriterionHolds () |
void | updateGlobalResidual (double residual, const tarch::la::Vector< Dimensions, double > &h) |
void | updateGlobalSolutionUpdates (double deltaU, const tarch::la::Vector< Dimensions, double > &h) |
void | updateMinMaxMeshSize (const tarch::la::Vector< Dimensions, double > &h) |
double | getGlobalResidualMaxNorm () const |
virtual std::string | toString () const |
virtual void | beginMeshSweep ()=0 |
End the traversal. | |
virtual void | endMeshSweep ()=0 |
Begin the traversal. | |
Protected Member Functions | |
void | clearGlobalResidualAndSolutionUpdate () |
Clear the global mesh stats. | |
void | synchroniseGlobalResidualAndSolutionUpdate () |
Synchronise the global stats between MPI ranks. | |
Protected Attributes | |
std::string | _name |
Name of solver. | |
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 |
tarch::multicore::BooleanSemaphore | _semaphore |
Semaphore for global residual values. | |
Static Protected Attributes | |
static tarch::logging::Log | _log |
mghype::matrixfree::solvers::Solver::Solver | ( | const std::string & | name, |
double | tolerance ) |
Construct the solver.
name | Name of solver as used by toString() |
tolerance | Tolerance 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. |
Definition at line 12 of file Solver.cpp.
References _name.
|
pure virtual |
End the traversal.
Has to be implemented in subclass. Most solvers synchronise the global statistics, and then print some output.
|
protected |
Clear the global mesh stats.
Most solvers call this one in beginMeshSweep().
Definition at line 83 of file Solver.cpp.
|
pure virtual |
Begin the traversal.
Most solvers invoke clearGlobalResidualAndSolutionUpdate().
double mghype::matrixfree::solvers::Solver::getGlobalResidualMaxNorm | ( | ) | const |
Definition at line 37 of file Solver.cpp.
|
protected |
Synchronise the global stats between MPI ranks.
Becomes nop if there is no MPI. The routine also takes care of the minimum and maximum mesh size tracked.
Definition at line 147 of file Solver.cpp.
References tarch::mpi::Rank::getGlobalMasterRank(), and tarch::mpi::Rank::getInstance().
|
virtual |
Definition at line 42 of file Solver.cpp.
References tarch::la::equals(), logDebug, logInfo, and logWarning.
|
virtual |
Definition at line 132 of file Solver.cpp.
void mghype::matrixfree::solvers::Solver::updateGlobalResidual | ( | double | residual, |
const tarch::la::Vector< Dimensions, double > & | h ) |
Definition at line 100 of file Solver.cpp.
References std::abs(), and tarch::la::volume().
void mghype::matrixfree::solvers::Solver::updateGlobalSolutionUpdates | ( | double | deltaU, |
const tarch::la::Vector< Dimensions, double > & | h ) |
Definition at line 112 of file Solver.cpp.
References std::abs(), and tarch::la::volume().
void mghype::matrixfree::solvers::Solver::updateMinMaxMeshSize | ( | const tarch::la::Vector< Dimensions, double > & | h | ) |
Definition at line 124 of file Solver.cpp.
References tarch::la::max(), and tarch::la::min().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
Name of solver.
Usually only used for debuggin purposes
Definition at line 81 of file Solver.h.
Referenced by exahype2.solvers.aderdg.ADERDG.ADERDG::__str__(), exahype2.solvers.elliptic.AMRMarker.AMRMarker::__str__(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::__str__(), exahype2.solvers.fv.FV.FV::__str__(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::__str__(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::__str__(), solvers.api.Solver.Solver::__str__(), exahype2.solvers.fv.EnclaveTasking.EnclaveTasking::_enclave_task_name(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking::_enclave_task_name(), dastgen2.attributes.Enumeration.Enumeration::_enum_name(), exahype2.solvers.aderdg.ADERDG.ADERDG::_generate_kernels(), exahype2.solvers.aderdg.ADERDG.ADERDG::_init_dictionary_with_default_parameters(), exahype2.solvers.fv.FV.FV::_init_dictionary_with_default_parameters(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_init_dictionary_with_default_parameters(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_init_dictionary_with_default_parameters(), exahype2.solvers.aderdg.ADERDG.ADERDG::_interpolate_face_data_default_guard(), exahype2.solvers.aderdg.SingleSweep.SingleSweep::_interpolate_face_data_default_guard(), SBH.Limiter::_load_cell_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_load_cell_data_default_guard(), exahype2.solvers.fv.FV.FV::_load_cell_data_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_load_cell_data_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_load_cell_data_default_guard(), SBH.Limiter::_load_face_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_load_face_data_default_guard(), exahype2.solvers.fv.FV.FV::_load_face_data_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_load_face_data_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_load_face_data_default_guard(), SBH.Limiter::_provide_cell_data_to_compute_kernels_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_provide_cell_data_to_compute_kernels_default_guard(), exahype2.solvers.fv.FV.FV::_provide_cell_data_to_compute_kernels_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_provide_cell_data_to_compute_kernels_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_provide_cell_data_to_compute_kernels_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_provide_face_data_to_compute_kernels_default_guard(), exahype2.solvers.fv.FV.FV::_provide_face_data_to_compute_kernels_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_provide_face_data_to_compute_kernels_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_provide_face_data_to_compute_kernels_default_guard(), exahype2.solvers.aderdg.SingleSweep.SingleSweep::_restrict_face_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_store_boundary_data_default_guard(), SBH.Limiter::_store_cell_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_store_cell_data_default_guard(), exahype2.solvers.fv.FV.FV::_store_cell_data_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_store_cell_data_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_store_cell_data_default_guard(), SBH.Limiter::_store_face_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_store_face_data_default_guard(), exahype2.solvers.fv.FV.FV::_store_face_data_default_guard(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_store_face_data_default_guard(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_store_face_data_default_guard(), exahype2.solvers.aderdg.ADERDG.ADERDG::_unknown_identifier(), exahype2.solvers.elliptic.AMRMarker.AMRMarker::_unknown_identifier(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::_unknown_identifier(), exahype2.solvers.fv.FV.FV::_unknown_identifier(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_unknown_identifier(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_unknown_identifier(), exahype2.solvers.fv.FV.FV::add_actions_to_checkpoint_solution(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::add_actions_to_checkpoint_solution(), exahype2.solvers.fv.EnclaveTasking.EnclaveTasking::add_actions_to_create_grid(), exahype2.solvers.fv.EnclaveTasking.EnclaveTasking::add_actions_to_init_grid(), exahype2.solvers.aderdg.ADERDG.ADERDG::add_actions_to_plot_solution(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::add_actions_to_plot_solution(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::add_actions_to_plot_solution(), exahype2.solvers.fv.FV.FV::add_actions_to_plot_solution(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::add_actions_to_plot_solution(), exahype2.solvers.fv.EnclaveTasking.EnclaveTasking::add_entries_to_text_replacement_dictionary(), exahype2.solvers.rkdg.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking::add_entries_to_text_replacement_dictionary(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking::add_entries_to_text_replacement_dictionary(), exahype2.solvers.aderdg.ADERDG.ADERDG::add_implementation_files_to_project(), exahype2.solvers.elliptic.AMRMarker.AMRMarker::add_to_Peano4_datamodel(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::add_to_Peano4_datamodel(), SBH.Limiter::create_action_sets(), exahype2.solvers.aderdg.SingleSweep.SingleSweep::create_action_sets(), exahype2.solvers.fv.rusanov.LocalTimeStepWithEnclaveTasking.LocalTimeStepWithEnclaveTasking::create_action_sets(), exahype2.solvers.fv.rusanov.SubcyclingAdaptiveTimeStepWithEnclaveTasking.SubcyclingAdaptiveTimeStepWithEnclaveTasking::create_action_sets(), exahype2.solvers.fv.rusanov.SubcyclingFixedTimeStep.SubcyclingFixedTimeStep::create_action_sets(), exahype2.solvers.fv.rusanov.SubcyclingFixedTimeStepWithEnclaveTasking.SubcyclingFixedTimeStepWithEnclaveTasking::create_action_sets(), exahype2.solvers.rkdg.SeparateSweeps.SeparateSweeps::create_action_sets(), exahype2.solvers.fv.SingleSweep.SingleSweep::create_data_structures(), exahype2.solvers.rkfd.OneSweepPerRungeKuttaStep.OneSweepPerRungeKuttaStep::create_data_structures(), exahype2.solvers.rkfd.SeparateSweeps.SeparateSweeps::create_data_structures(), exahype2.solvers.rkfd.SeparateSweepsWithEnclaveTasking.SeparateSweepsWithEnclaveTasking::create_data_structures(), dastgen2.attributes.Attribute.Attribute::get_accessor_name(), dastgen2.attributes.BooleanArray.BooleanArray::get_constructor_arguments(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_constructor_arguments(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_constructor_arguments(), api.solvers.CollocatedLowOrderDiscretisation.AssemblePetscMatrix::get_constructor_body(), dastgen2.attributes.BooleanArray.BooleanArray::get_first_plain_C_attribute(), dastgen2.attributes.DoubleArray.DoubleArray::get_first_plain_C_attribute(), dastgen2.attributes.IntegerArray.IntegerArray::get_first_plain_C_attribute(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_first_plain_C_attribute(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_first_plain_C_attribute(), dastgen2.attributes.Boolean.Boolean::get_method_body(), dastgen2.attributes.BooleanArray.BooleanArray::get_method_body(), dastgen2.attributes.Double.Double::get_method_body(), dastgen2.attributes.DoubleArray.DoubleArray::get_method_body(), dastgen2.attributes.Enumeration.Enumeration::get_method_body(), dastgen2.attributes.Integer.Integer::get_method_body(), dastgen2.attributes.IntegerArray.IntegerArray::get_method_body(), dastgen2.attributes.String.String::get_method_body(), dastgen2.attributes.UserDefinedType.UserDefinedType::get_method_body(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_method_body(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_method_body(), dastgen2.attributes.BooleanArray.BooleanArray::get_methods(), dastgen2.attributes.DoubleArray.DoubleArray::get_methods(), dastgen2.attributes.IntegerArray.IntegerArray::get_methods(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_methods(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_methods(), exahype2.solvers.aderdg.ADERDG.ADERDG::get_name_of_global_instance(), exahype2.solvers.elliptic.AMRMarker.AMRMarker::get_name_of_global_instance(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::get_name_of_global_instance(), exahype2.solvers.fv.FV.FV::get_name_of_global_instance(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::get_name_of_global_instance(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::get_name_of_global_instance(), dastgen2.attributes.Boolean.Boolean::get_plain_C_attributes(), dastgen2.attributes.BooleanArray.BooleanArray::get_plain_C_attributes(), dastgen2.attributes.Double.Double::get_plain_C_attributes(), dastgen2.attributes.DoubleArray.DoubleArray::get_plain_C_attributes(), dastgen2.attributes.Integer.Integer::get_plain_C_attributes(), dastgen2.attributes.IntegerArray.IntegerArray::get_plain_C_attributes(), dastgen2.attributes.String.String::get_plain_C_attributes(), dastgen2.attributes.UserDefinedType.UserDefinedType::get_plain_C_attributes(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_plain_C_attributes(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_plain_C_attributes(), dastgen2.attributes.String.String::get_setter_getter_name(), dastgen2.attributes.Boolean.Boolean::get_to_string(), dastgen2.attributes.BooleanArray.BooleanArray::get_to_string(), dastgen2.attributes.Double.Double::get_to_string(), dastgen2.attributes.DoubleArray.DoubleArray::get_to_string(), dastgen2.attributes.Enumeration.Enumeration::get_to_string(), dastgen2.attributes.Integer.Integer::get_to_string(), dastgen2.attributes.IntegerArray.IntegerArray::get_to_string(), dastgen2.attributes.UserDefinedType.UserDefinedType::get_to_string(), peano4.dastgen2.Peano4DoubleArray.Peano4DoubleArray::get_to_string(), peano4.dastgen2.Peano4IntegerArray.Peano4IntegerArray::get_to_string(), dastgen2.attributes.Attribute.Attribute::name(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells::name(), exahype2.solvers.fv.FV.FV::name(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::name(), solvers.api.Solver.Solver::name(), api.solvers.Solver.Solver::name(), Solver(), solvers.api.Solver.Solver::typename(), and api.solvers.Solver.Solver::typename().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |