Commit e27212ed authored by Backofen, Rainer's avatar Backofen, Rainer

set debug mode flag in init file for time strategies in AdaptInstat

parent c991d389
......@@ -247,15 +247,15 @@ namespace AMDiS {
void printTimeErrorLowInfo()
{
for (unsigned int i = 0; i < scalContents.size(); i++){
std::cout << " Time error estimate = "
std::cout << " Time error estimate ["<<i<<"] = "
<< getTimeEstCombined(i) << "\n"
<< " Time error estimate sum = "
<< " Time error estimate sum ["<<i<<"] = "
<< scalContents[i]->est_t_sum << "\n"
<< " Time error estimate max = "
<< " Time error estimate max ["<<i<<"] = "
<< scalContents[i]->est_t_max << "\n"
<< " Time error low bound = "
<< " Time error low bound ["<<i<<"] = "
<< scalContents[i]->timeErrLow << "\n"
<< " Time error high bound = "
<< " Time error high bound ["<<i<<"] = "
<< scalContents[i]->timeTolerance << "\n";
}
}
......
......@@ -235,7 +235,7 @@ namespace AMDiS {
void AdaptInstationary::simpleAdaptiveTimeStrategy()
{
FUNCNAME("AdaptInstationary::explicitTimeStrategy()");
FUNCNAME("AdaptInstationary::simpleAdaptiveTimeStrategy()");
// estimate before first adaption
if (adaptInfo->getTime() <= adaptInfo->getStartTime())
......@@ -250,6 +250,12 @@ namespace AMDiS {
problemIteration->oneIteration(adaptInfo, FULL_ITERATION);
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep());
if (dbgMode) {
std::cout << "=== ADAPT INFO DEBUG MODE ===\n";
std::cout << "=== in simpleAdaptiveTimeStrategy() ===\n";
adaptInfo->printTimeErrorLowInfo();
}
// First, check for increase of timestep
if (!fixedTimestep && adaptInfo->timeErrorLow())
......@@ -360,6 +366,7 @@ namespace AMDiS {
Parameters::get(aName + "->time delta 2", timeDelta2);
Parameters::get(aName + "->info", info);
Parameters::get(aName + "->break when stable", breakWhenStable);
Parameters::get(aName + "->time adaptivity debug mode", dbgMode);
Parameters::get(aName + "->queue->runtime", queueRuntime);
Parameters::get(aName + "->queue->serialization filename",
queueSerializationFilename);
......
......@@ -36,6 +36,7 @@
#include <petsc.h>
#include <petscsys.h>
#include <petscao.h>
#include <petscksp.h>
namespace AMDiS {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment