dune-fem 2.8.0
|
Write a self contained tex table for eoc runs with timing information. More...
#include <dune/fem/misc/femeoc.hh>
Classes | |
class | EOCColumnWriter |
class | ErrorColumnWriter |
Public Member Functions | |
FemEoc () | |
~FemEoc () | |
Static Public Member Functions | |
static FemEoc & | instance () |
static void | clear () |
close file and allow FemEoc to used for a second run | |
static void | initialize (const std::string &path, const std::string &name, const std::string &descript) |
open file path/name and write a description string into tex file | |
static void | initialize (const std::string &name, const std::string &descript) |
open file name and write description string into tex file | |
template<class StrVectorType > | |
static size_t | addEntry (const StrVectorType &descript, size_t size) |
add a vector of new eoc values | |
template<class StrVectorType > | |
static size_t | addEntry (const StrVectorType &descript) |
add a vector of new eoc values | |
static size_t | addEntry (const std::string &descript) |
add a single new eoc output | |
static size_t | addEntry (const char *descript) |
add a single new eoc output | |
template<class VectorType > | |
static void | setErrors (size_t id, const VectorType &err, int size) |
add a vector of error values for the given id (returned by addEntry) | |
template<class VectorType > | |
static void | setErrors (size_t id, const VectorType &err) |
add a vector of error values for the given id (returned by addEntry) | |
template<int SIZE> | |
static void | setErrors (size_t id, const FieldVector< double, SIZE > &err) |
add a vector in a FieldVector of error values for the given id (returned by addEntry) | |
static void | setErrors (size_t id, const double &err) |
add a single error value for the given id (returned by addEntry) | |
static void | write (double h, double size, double time, int counter) |
commit a line to the eoc file | |
static void | write (const double h, const double size, const double time, const int counter, std::ostream &out) |
commit a line to the eoc file | |
static void | write (const double h, const double size, const double time, const int counter, const double avgTimeStep, const double minTimeStep, const double maxTimeStep, const int newton_iterations, const int ils_iterations, const int max_newton_iterations, const int max_ils_iterations) |
commit a line to the eoc file | |
static void | write (const double h, const double size, const double time, const int counter, const std::vector< DoublePairType > &doubleValues, const std::vector< IntPairType > &intValues) |
commit a line to the eoc file | |
static void | write (const double h, const double size, const double time, const int counter, const double avgTimeStep, const double minTimeStep, const double maxTimeStep, const int newton_iterations, const int ils_iterations, const int max_newton_iterations, const int max_ils_iterations, std::ostream &out) |
commit a line to the eoc file | |
static void | write (const double h, const double size, const double time, const int counter, const std::vector< DoublePairType > &doubleValues, const std::vector< IntPairType > &intValues, std::ostream &out) |
commit a line to the eoc file | |
Write a self contained tex table for eoc runs with timing information.
Constructor takes base file name for the tex file and generates two files: filename_timestamp_main.tex and filename_timestamp_body.tex or without the time stamp (by default) in the name depending on the parameter fem.io.eocFileTimeStamp. A time stamp is added to the base file name to prevent the overwriting of a valuable eoc data from the previous simulation. The file filename_timestamp_body.tex holds the actual body of the eoc table which is included in filename_timestamp_main.tex but can also be used to combine e.g. runs with different parameters or for plotting using gnuplot.
The class is singleton and thus new errors for eoc computations can be added in any part of the program. To add a new entry for eoc computations use one of the addEntry methods. These return a unique unsigned int which can be used to add error values to the table with the setErrors methods. The method write is used to write a single line to the eoc table.
|
inline |
|
inline |
|
inlinestatic |
add a single new eoc output
|
inlinestatic |
add a single new eoc output
|
inlinestatic |
add a vector of new eoc values
StrVectorType | a vector type with size() and operator[] returning a string |
|
inlinestatic |
add a vector of new eoc values
StrVectorType | a vector type with operator[] returning a string (a C style array can be used) the size of the vector is given as parameter |
|
inlinestatic |
close file and allow FemEoc to used for a second run
|
inlinestatic |
open file name and write description string into tex file
|
inlinestatic |
open file path/name and write a description string into tex file
|
inlinestatic |
|
inlinestatic |
add a single error value for the given id (returned by addEntry)
|
inlinestatic |
add a vector in a FieldVector of error values for the given id (returned by addEntry)
|
inlinestatic |
add a vector of error values for the given id (returned by addEntry)
VectorType | a vector type with a size() and an operator[] returning a double |
|
inlinestatic |
add a vector of error values for the given id (returned by addEntry)
VectorType | a vector type with an operator[] returning a double (C style array can be used) |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utility class) |
size | number of grid elements |
time | computational time |
counter | number of time steps |
avgTimeStep | average time step for the ODE solver |
minTimeStep | minimal time step for the ODE solver |
maxTimeStep | maximal time step for the ODE solver |
newton_iterations | number of newton iterations |
ils_iterations | number of iteration of the iterative linear solver |
max_newton_iterations | maximal number of newton iterations |
max_ils_iterations | maximal number of iteration of the iterative linear solver |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utility class) |
size | number of grid elements |
time | computational time |
counter | number of time steps |
avgTimeStep | average time step for the ODE solver |
minTimeStep | minimal time step for the ODE solver |
maxTimeStep | maximal time step for the ODE solver |
newton_iterations | number of newton iterations |
ils_iterations | number of iteration of the iterative linear solver |
max_newton_iterations | maximal number of newton iterations |
max_ils_iterations | maximal number of iteration of the iterative linear solver |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utility class) |
size | number of grid elements |
time | computational time |
counter | number of time steps |
doubleValues | list of extra double values to be written |
intValues | list of extra int values to be written |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utility class) |
size | number of grid elements |
time | computational time |
counter | number of time steps |
avgTimeStep | average time step for the ODE solver |
minTimeStep | minimal time step for the ODE solver |
maxTimeStep | maximal time step for the ODE solver |
newton_iterations | number of newton iterations |
ils_iterations | number of iteration of the iterative linear solver |
max_newton_iterations | maximal number of newton iterations |
max_ils_iterations | maximal number of iteration of the iterative linear solver |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utitlity class) |
size | number of elements in the grid or number of dofs... |
time | computational time |
counter | number of timesteps or iterations for a solver... |
out | std::ostream to print data to (e.g. std::cout) |
|
inlinestatic |
commit a line to the eoc file
h | grid width (e.g. given by GridWith utitlity class) |
size | number of elements in the grid or number of dofs... |
time | computational time |
counter | number of timesteps or iterations for a solver... |