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

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

parent c991d389
...@@ -247,15 +247,15 @@ namespace AMDiS { ...@@ -247,15 +247,15 @@ namespace AMDiS {
void printTimeErrorLowInfo() void printTimeErrorLowInfo()
{ {
for (unsigned int i = 0; i < scalContents.size(); i++){ for (unsigned int i = 0; i < scalContents.size(); i++){
std::cout << " Time error estimate = " std::cout << " Time error estimate ["<<i<<"] = "
<< getTimeEstCombined(i) << "\n" << getTimeEstCombined(i) << "\n"
<< " Time error estimate sum = " << " Time error estimate sum ["<<i<<"] = "
<< scalContents[i]->est_t_sum << "\n" << scalContents[i]->est_t_sum << "\n"
<< " Time error estimate max = " << " Time error estimate max ["<<i<<"] = "
<< scalContents[i]->est_t_max << "\n" << scalContents[i]->est_t_max << "\n"
<< " Time error low bound = " << " Time error low bound ["<<i<<"] = "
<< scalContents[i]->timeErrLow << "\n" << scalContents[i]->timeErrLow << "\n"
<< " Time error high bound = " << " Time error high bound ["<<i<<"] = "
<< scalContents[i]->timeTolerance << "\n"; << scalContents[i]->timeTolerance << "\n";
} }
} }
......
...@@ -235,7 +235,7 @@ namespace AMDiS { ...@@ -235,7 +235,7 @@ namespace AMDiS {
void AdaptInstationary::simpleAdaptiveTimeStrategy() void AdaptInstationary::simpleAdaptiveTimeStrategy()
{ {
FUNCNAME("AdaptInstationary::explicitTimeStrategy()"); FUNCNAME("AdaptInstationary::simpleAdaptiveTimeStrategy()");
// estimate before first adaption // estimate before first adaption
if (adaptInfo->getTime() <= adaptInfo->getStartTime()) if (adaptInfo->getTime() <= adaptInfo->getStartTime())
...@@ -250,6 +250,12 @@ namespace AMDiS { ...@@ -250,6 +250,12 @@ namespace AMDiS {
problemIteration->oneIteration(adaptInfo, FULL_ITERATION); problemIteration->oneIteration(adaptInfo, FULL_ITERATION);
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep()); 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 // First, check for increase of timestep
if (!fixedTimestep && adaptInfo->timeErrorLow()) if (!fixedTimestep && adaptInfo->timeErrorLow())
...@@ -360,6 +366,7 @@ namespace AMDiS { ...@@ -360,6 +366,7 @@ namespace AMDiS {
Parameters::get(aName + "->time delta 2", timeDelta2); Parameters::get(aName + "->time delta 2", timeDelta2);
Parameters::get(aName + "->info", info); Parameters::get(aName + "->info", info);
Parameters::get(aName + "->break when stable", breakWhenStable); 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->runtime", queueRuntime);
Parameters::get(aName + "->queue->serialization filename", Parameters::get(aName + "->queue->serialization filename",
queueSerializationFilename); queueSerializationFilename);
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <petsc.h> #include <petsc.h>
#include <petscsys.h> #include <petscsys.h>
#include <petscao.h> #include <petscao.h>
#include <petscksp.h>
namespace AMDiS { namespace AMDiS {
......
Supports Markdown
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