Template Class InfNorm
Defined in File InfNorm.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public AnalysisManager::NativeDynamicSolver::ErrorNorm< ScalarT, IdxT >(Template Class ErrorNorm)
Class Documentation
-
template<class ScalarT, typename IdxT>
class InfNorm : public AnalysisManager::NativeDynamicSolver::ErrorNorm<ScalarT, IdxT> The infinity error norm, which requires the error in every component in the system to meet tolerance.
Public Functions
-
virtual RealT errorNorm(State &err, State &y, State &yprev, GridKit::LinearAlgebra::VectorHandler<ScalarT, IdxT> &handler, GridKit::memory::MemorySpace memspace) const final
Calculate an error to be used by a step controller. Typically, an error > 1 indicates an error which does not meet tolerances, while an error < 1 indicates an error which meets tolerances. For that reason, tolerances should be included in the calculation of the error.
- Todo:
Allow this method to fail, since it will likely involve linear algebra calls.
- Parameters:
err – The state error residual being measured.
y – The state that the error was calculated from. Can be used for proper relative error normalization.
yprev – The state from the previous step. Can be used for proper relative error normalization.
handler – A vector handler which can be used to facilitate vector operations.
memspace – The memory space which vector operations should be performed in/.
- Returns:
The error.
Public Members
-
std::unique_ptr<State> out_
The final vector which will have its norm taken.
-
std::unique_ptr<State> scale_
The vector which will be used to scale the error in accordance with the tolerances.
-
struct Parameters
The configurable parameters of the error norm.
Public Members
-
std::unique_ptr<State> abs_tol_
A vector of absolute tolerances for each component. The norm will attempt to reject errors in each component above this tolerance.
-
RealT rel_tol_
The relative tolerance. The norm will attempt to reject any error larger in percentage of the solution’s maximum element than this.
-
std::unique_ptr<State> abs_tol_
-
virtual RealT errorNorm(State &err, State &y, State &yprev, GridKit::LinearAlgebra::VectorHandler<ScalarT, IdxT> &handler, GridKit::memory::MemorySpace memspace) const final