ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
List of all members
ryujin::ErrorEvaluation< dim, Number > Class Template Referencefinal

#include <include/ryujin/output/error_evaluation.h>

Inheritance diagram for ryujin::ErrorEvaluation< dim, Number >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::ErrorEvaluation< dim, Number >:
Collaboration graph
[legend]

Public Member Functions

Constructor and setup
 ErrorEvaluation (const Interface::Simulation< dim, Number > &simulation, const std::string &subsection="/ErrorEvaluation")
 
Task
void initialize (TaskContext< Number > &context) override
 
void execute (TaskContext< Number > &context) override
 
void finalize (TaskContext< Number > &context) override
 
- Public Member Functions inherited from ryujin::Interface::Task< Number >
virtual ~Task ()=default
 
virtual void start (TaskContext< Number > &)
 
virtual void prepare (TaskContext< Number > &)
 
virtual void save (boost::archive::binary_oarchive &) const
 
virtual void load (boost::archive::binary_iarchive &)
 

Additional Inherited Members

- Protected Member Functions inherited from ryujin::Interface::Task< Number >
 Task (const std::string &name, TaskPhase phase)
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::ErrorEvaluation< dim, Number >

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 is the task "error evaluation" that writes out the computed error into a log file <base name>-error.log whenever its trigger fires, and prints a summary of the error at the final time.

Definition at line 47 of file error_evaluation.h.

Constructor & Destructor Documentation

◆ ErrorEvaluation()

template<int dim, typename Number = double>
ryujin::ErrorEvaluation< dim, Number >::ErrorEvaluation ( const Interface::Simulation< dim, Number > &  simulation,
const std::string &  subsection = "/ErrorEvaluation< dim, Number >" 
)

Constructor.

Member Function Documentation

◆ initialize()

template<int dim, typename Number = double>
void ryujin::ErrorEvaluation< dim, Number >::initialize ( TaskContext< Number > &  context)
overridevirtual

Initialize error evaluation: validate the selected quantities and norms.

The base name is used for the error log file <basename>-error.log. Calling initialize() resets the log file and writes out a header describing its contents.

Reimplemented from ryujin::Interface::Task< Number >.

◆ execute()

template<int dim, typename Number = double>
void ryujin::ErrorEvaluation< dim, Number >::execute ( TaskContext< Number > &  context)
overridevirtual

Append the error at the current time to the error log file whenever the trigger fires.

Implements ryujin::Interface::Task< Number >.

◆ finalize()

template<int dim, typename Number = double>
void ryujin::ErrorEvaluation< dim, Number >::finalize ( TaskContext< Number > &  context)
overridevirtual

Print a summary of the error at the final time.

Reimplemented from ryujin::Interface::Task< Number >.


The documentation for this class was generated from the following file: