Class Scine::Utils::ConvergenceCheck¶
-
class
ConvergenceCheck
¶ The base class for all convergence checks.
Similar to the actual Optimizer the convergence check is abstracted into a class that shall allow both usage via Settings object and as a ‘raw’ class using the public members to adjust the convergence criteria.
To this end the base class defines and enforces the presence of the functions that parse the
Settings into these members and vice versa.In general, it is adviseable to derive classes that also only require the use of a default constructor, after all the convergence checks are mostly defined by a set of thresholds and any data should be required in the actual optimization cycles and not upon creation of the derived object.
Subclassed by Scine::Utils::GradientBasedCheck
Public Functions
-
ConvergenceCheck
()¶ Default Constructor.
-
virtual void
addSettingsDescriptors
(UniversalSettings::DescriptorCollection &collection) const = 0¶ Adds all relevant options to the given UniversalSettings::DescriptorCollection thus expanding it to include these ConvergenceCheck’s options.
This function has to be implemented in derived classes in order to allow for all ConvergenceChecks to be used and configured at runtime by end users.
- Parameters
collection
: The DescriptorCollection to which new fields shall be added.
-
virtual void
applySettings
(const Settings &settings) = 0¶ Updates the ConvergenceCheck’s options with those values given in the Settings.
This function has to be implemented in derived classes in order to allow for all ConvergenceChecks to be used and configured at runtime by end users.
Note: Additional settings that are not used by the optimizer shall not generate errors, or warnings, they shall simply be ignored.
- Parameters
settings
: The settings to update the option of this optimizer with.
-