Skip to content
Snippets Groups Projects
Commit 464b4ee6 authored by Robert K's avatar Robert K
Browse files

pass extra values as vector.

parent 928c4588
No related branches found
No related tags found
No related merge requests found
......@@ -174,10 +174,8 @@ void compute(Algorithm& algorithm)
{
std::stringstream eocInfo ;
// generate EOC information
Dune::Fem::FemEoc::write( monitor.gridWidth, monitor.elements, runTime,
monitor.timeSteps, monitor.avgTimeStep, monitor.minTimeStep,
monitor.maxTimeStep, monitor.total_newton_iterations, monitor.total_ils_iterations,
monitor.max_newton_iterations, monitor.max_ils_iterations, eocInfo );
Dune::Fem::FemEoc::write( monitor.gridWidth, monitor.elements, runTime, monitor.timeSteps,
monitor.doubleValues(), monitor.intValues(), eocInfo );
// in verbose mode write EOC info to std::cout
if( ParameterType :: verbose() )
......
......@@ -41,7 +41,9 @@ struct EocDataOutputParameters : /*@LST1S@*/
class SolverMonitor
{
public:
//std::map< std::string, >
typedef std::pair< std::string, double > DoublePairType;
typedef std::pair< std::string, int > IntPairType;
double gridWidth;
double avgTimeStep;
double minTimeStep;
......@@ -99,6 +101,27 @@ public:
elements = el;
}
std::vector< DoublePairType > doubleValues() const
{
std::vector< DoublePairType > values;
values.reserve( 3 );
values.push_back( DoublePairType("avg dt", avgTimeStep ) );
values.push_back( DoublePairType("min dt", minTimeStep ) );
values.push_back( DoublePairType("max dt", maxTimeStep ) );
return std::move( values );
}
std::vector< IntPairType > intValues() const
{
std::vector< IntPairType > values;
values.reserve( 4 );
values.push_back( IntPairType("Newton", total_newton_iterations ) );
values.push_back( IntPairType("ILS", total_ils_iterations ) );
values.push_back( IntPairType("max{Newton/linS}", max_newton_iterations ) );
values.push_back( IntPairType("max{ILS/linS}", max_ils_iterations ) );
return std::move( values );
}
void dump( std::ostream& out ) const
{
out << "SolverMonitorInfo (timesteps):" << std::endl;
......@@ -199,6 +222,9 @@ public:
//! finalize this EOC loop and possibly calculate EOC ...
virtual void finalizeStep(TimeProviderType& tp) = 0;
//! add all persistent objects to PersistenceManager
virtual void addPersistentObjects() {}
//! restore all data from check point (overload to do something)
//! return true if the simulation was newly started
virtual bool restoreFromCheckPoint( TimeProviderType& tp ) { abort(); return true; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment