![]() |
ryujin 2.1.1 revision b04fb4aba7bd97ddfa5994a6b4b6e8586eb15db2
|
#include <source/error_evaluation.h>


Public Member Functions | |
Constructor and setup | |
| ErrorEvaluation (const MPIEnsemble &mpi_ensemble, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const Interface::ParabolicSystem ¶bolic_system, const MultiComponentVector< Number > &initial_precomputed, const std::string &subsection="/ErrorEvaluation") | |
| void | prepare (const std::string &name) |
Functions for computing and reporting errors | |
| std::vector< Number > | compute (const StateVector< Number > &state_vector, const StateVector< Number > &analytic) const |
| void | write_out (const StateVector< Number > &state_vector, const StateVector< Number > &analytic, Number t) const |
| void | print_summary (std::ostream &stream, Number t, dealii::types::global_dof_index n_global_dofs, const std::vector< Number > &norms) const |
Typedefs and constexpr constants | |
| using | HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem |
| using | View = typename HyperbolicSystem::template View< dim, Number > |
| static constexpr auto | problem_dimension = View::problem_dimension |
The ErrorEvaluation class computes error norms of the numerical solution with respect to an analytic solution.
The analytic solution is provided by the InitialValues class, i.e., the selected initial state configuration is evaluated at the current time. Consequently, error evaluation is only meaningful for initial state configurations that describe an exact (time-dependent) solution of the underlying equations.
The quantities for which the error is computed can be freely chosen via a configuration file, as well as the error norms (L1, L2, Linf). The individual errors are then consolidated by summing over all selected quantities (and, if applicable, over all MPI ensembles). The result is one number per selected norm.
The class also writes out the computed error into a log file <base name>-error.log.
Definition at line 47 of file error_evaluation.h.
| using ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem |
Definition at line 55 of file error_evaluation.h.
| using ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::View = typename HyperbolicSystem::template View<dim, Number> |
Definition at line 57 of file error_evaluation.h.
| ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::ErrorEvaluation | ( | const MPIEnsemble & | mpi_ensemble, |
| const OfflineData< dim, Number > & | offline_data, | ||
| const HyperbolicSystem & | hyperbolic_system, | ||
| const Interface::ParabolicSystem & | parabolic_system, | ||
| const MultiComponentVector< Number > & | initial_precomputed, | ||
| const std::string & | subsection = "/ErrorEvaluation< HyperbolicDescription, dim, Number >" |
||
| ) |
Constructor.
Definition at line 22 of file error_evaluation.template.h.
| void ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::prepare | ( | const std::string & | name | ) |
Prepare error evaluation. A call to prepare() validates the selected quantities and norms and is necessary before compute(), write_out(), or print_summary() can be called.
The string parameter name is used as base name for the error log file <name>-error.log. Calling prepare() resets the log file and writes out a header describing its contents.
Definition at line 60 of file error_evaluation.template.h.
| std::vector< Number > ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::compute | ( | const StateVector< Number > & | state_vector, |
| const StateVector< Number > & | analytic | ||
| ) | const |
Compute the consolidated error norms of the difference between the state vector state_vector and the analytic solution analytic (interpolated at the same time). The returned vector contains one value per selected norm in the order in which the norms have been selected.
Definition at line 105 of file error_evaluation.template.h.
| void ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::write_out | ( | const StateVector< Number > & | state_vector, |
| const StateVector< Number > & | analytic, | ||
| Number | t | ||
| ) | const |
Compute the consolidated error norms at time t and append a line to the error log file.
Definition at line 186 of file error_evaluation.template.h.
| void ryujin::ErrorEvaluation< HyperbolicDescription, dim, Number >::print_summary | ( | std::ostream & | stream, |
| Number | t, | ||
| dealii::types::global_dof_index | n_global_dofs, | ||
| const std::vector< Number > & | norms | ||
| ) | const |
Print a human readable summary of the error norms norms (as returned by compute()) at time t and for a discretization with n_global_dofs degrees of freedom to stream.
Definition at line 212 of file error_evaluation.template.h.
|
staticconstexpr |
Definition at line 59 of file error_evaluation.h.