Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ErrorRate Class Reference

compare pairwise rates for error estimates. More...

#include <ErrorRate.h>

List of all members.

Public Methods

 ErrorRate ()
 ~ErrorRate ()
void setNameOfUnknown (const String &unknown_name)
bool ok () const
void add (real h, real error, Norm_type norm, int run_no)
void add (real h, real L2_error, real energy_error, int run_no)
void add (real h, real L1_error, real L2_error, real Linf_error, int run_no)
void add (real h, real L1_error, real L2_error, real Linf_error, real energy_error, int run_no)
void add (real h, real L1_error, real L2_error, real Linf_error, real energy_error, real H1_error, int run_no)
void reset ()
void print (Os os) const
void writeExtendedResults (MultipleReporter &rep)


Detailed Description

compare pairwise rates for error estimates.

NAME: ErrorRate - compare pairwise rates for error estimates

DESCRIPTION:

The class offers some utilities for convenient computation of convergence rates. If the programmer can estimate the error in some norms (the "L1", "L2" and "Linf" norms as defined by "enum Norm_type"), the estimates can be fed into a class "ErrorRate" object. At a later stage, one can ask class "ErrorRate" to write a table of the error estimates and compute the pairwise exponent (rate) of the items in the table. Let the error in two rows be "e1" and "e2", and let the corresponding numerical discretization parameters be "h1" and "h2" (one will typically choose "h1" and "h2" as a characteristic length of a grid cell, for example, one can take this length as "1/n**d), where "n" is the number of unknowns and "d" is the number of space dimensions). Then we can use the model "e1=C*h**r", where "**" means exponentiation. Using a similar formula for relating "e2" to "n2", one can easily compute the "r" constant.

The "run_no" argument to the "add" functions is an identification of the problem that led to the current error norms. For example, in a Diffpack simulator employing multiple loops, one can simply send "getMultipleLoopIndex()" as the "run_no" argument. Otherwise one can send some kind of a loop counter (in a loop over decreasing mesh sizes for example).


Constructor & Destructor Documentation

ErrorRate::ErrorRate ( )
 

No special initialization is needed.

ErrorRate::~ErrorRate ( ) [inline]
 


Member Function Documentation

void ErrorRate::add ( real h,
real L1_error,
real L2_error,
real Linf_error,
real energy_error,
real H1_error,
int run_no )
 

See documentation of one of the overloaded functions.

void ErrorRate::add ( real h,
real L1_error,
real L2_error,
real Linf_error,
real energy_error,
int run_no )
 

See documentation of one of the overloaded functions.

void ErrorRate::add ( real h,
real L1_error,
real L2_error,
real Linf_error,
int run_no )
 

See documentation of one of the overloaded functions.

void ErrorRate::add ( real h,
real L2_error,
real energy_error,
int run_no )
 

See documentation of one of the overloaded functions.

void ErrorRate::add ( real h,
real error,
Norm_type norm,
int run_no )
 

adds a new data pair ("h" and one or more error quantities) to the stored data sets.

bool ErrorRate::ok ( ) const
 

returns true of the object contains a consistent data set.

void ErrorRate::print ( Os os ) const
 

computes the error rate by use of "exponent" and present the results in tabular form by printing to an "Os" data stream..

void ErrorRate::reset ( )
 

forgets all recorded data and prepares for a new session.

void ErrorRate::setNameOfUnknown ( const String & unknown_name )
 

defines the name of error quantityl, used for printouts.

void ErrorRate::writeExtendedResults ( MultipleReporter & rep )
 

as "print", but sends the results to a "MultipleReporter".


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.