DUNE-FEM (unstable)
Write a self contained tex table for eoc runs with timing information. More...
#include <dune/fem/misc/femeoc.hh>
Static Public Member Functions | |
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 More... | |
template<class StrVectorType > | |
static size_t | addEntry (const StrVectorType &descript) |
add a vector of new eoc values More... | |
static size_t | addEntry (const std::string &descript) |
add a single new eoc output More... | |
static size_t | addEntry (const char *descript) |
add a single new eoc output More... | |
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) More... | |
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) More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
Detailed Description
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.
Member Function Documentation
◆ addEntry() [1/4]
|
inlinestatic |
add a single new eoc output
- Returns
- a unique index used to add the error values
References addEntry().
◆ addEntry() [2/4]
|
inlinestatic |
add a single new eoc output
- Returns
- a unique index used to add the error values
References Dune::Fem::Singleton< Object >::instance().
◆ addEntry() [3/4]
|
inlinestatic |
add a vector of new eoc values
- Template Parameters
-
StrVectorType a vector type with size() and operator[] returning a string
- Returns
- a unique index used to add the error values
References Dune::Fem::Singleton< Object >::instance().
◆ addEntry() [4/4]
|
inlinestatic |
add a vector of new eoc values
- Template Parameters
-
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
- Returns
- a unique index used to add the error values
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
Referenced by addEntry().
◆ setErrors() [1/2]
|
inlinestatic |
add a vector of error values for the given id (returned by addEntry)
- Template Parameters
-
VectorType a vector type with a size() and an operator[] returning a double
References Dune::Fem::Singleton< Object >::instance().
◆ setErrors() [2/2]
|
inlinestatic |
add a vector of error values for the given id (returned by addEntry)
- Template Parameters
-
VectorType a vector type with an operator[] returning a double (C style array can be used)
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [1/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [2/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [3/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [4/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [5/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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)
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
◆ write() [6/6]
|
inlinestatic |
commit a line to the eoc file
- Parameters
-
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...
References Dune::Fem::Singleton< Object >::instance(), and Dune::size().
The documentation for this class was generated from the following file:
- dune/fem/misc/femeoc.hh