Commit ef5ea94a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed some demos to get same results as in older AMDiS versions.

parent 59408860
...@@ -70,7 +70,7 @@ namespace AMDiS { ...@@ -70,7 +70,7 @@ namespace AMDiS {
GET_PARAMETER(0, prefix + "->sum factor", "%f", &fac_sum); GET_PARAMETER(0, prefix + "->sum factor", "%f", &fac_sum);
GET_PARAMETER(0, prefix + "->max factor", "%f", &fac_max); GET_PARAMETER(0, prefix + "->max factor", "%f", &fac_max);
timeErrLow = timeTolerance; timeErrLow = timeTolerance * 0.3;
} }
/// Sum of all error estimates /// Sum of all error estimates
......
...@@ -169,11 +169,11 @@ namespace AMDiS { ...@@ -169,11 +169,11 @@ namespace AMDiS {
adaptInfo->setSpaceIteration(0); adaptInfo->setSpaceIteration(0);
/* === Do only space iterations only if the maximum is higher than 0. === */ // === Do only space iterations only if the maximum is higher than 0. ===
if (adaptInfo->getMaxSpaceIteration() > 0) { if (adaptInfo->getMaxSpaceIteration() > 0) {
/* === Space iterations === */ // === Space iterations. ===
do { do {
problemIteration->beginIteration(adaptInfo); problemIteration->beginIteration(adaptInfo);
......
...@@ -19,30 +19,12 @@ ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM ...@@ -19,30 +19,12 @@ ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ellipt->estimator->C0: 0.1 % constant of element residual ellipt->estimator->C0: 0.1 % constant of element residual
ellipt->estimator->C1: 0.1 % constant of jump residual ellipt->estimator->C1: 0.1 % constant of jump residual
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10
ellipt->adapt->info: 8
ellipt->adapt->refine bisections: 1
ellipt->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS ellipt->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->MSGamma: 0.5 ellipt->marker->MSGamma: 0.5
ellipt->marker->info: 8
ellipt->output->filename: ellipt ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10
ellipt->adapt->refine bisections: 2
ellipt->output->filename: output/ellipt
ellipt->output->ParaView format: 1 ellipt->output->ParaView format: 1
ellipt->output->TecPlot format: 0
ellipt->output->TecPlot ext: .tec
ellipt->output->AMDiS format: 0
ellipt->output->AMDiS mesh ext: .mesh
ellipt->output->AMDiS data ext: .dat
ellipt->output->append index: 0
ellipt->output->index length: 6
ellipt->output->index decimals: 3
WAIT: 0
...@@ -26,19 +26,5 @@ ellipt->adapt->tolerance: 1e-4 ...@@ -26,19 +26,5 @@ ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10 ellipt->adapt->max iteration: 10
ellipt->adapt->refine bisections: 2 ellipt->adapt->refine bisections: 2
ellipt->output->filename: ellipt ellipt->output->filename: output/ellipt
ellipt->output->ParaView format: 1 ellipt->output->ParaView format: 1
ellipt->output->TecPlot format: 0
ellipt->output->TecPlot ext: .tec
ellipt->output->AMDiS format: 0
ellipt->output->AMDiS mesh ext: .mesh
ellipt->output->AMDiS data ext: .dat
ellipt->output->append index: 0
ellipt->output->index length: 6
ellipt->output->index decimals: 3
WAIT: 1
...@@ -5,42 +5,25 @@ elliptMesh->global refinements: 0 ...@@ -5,42 +5,25 @@ elliptMesh->global refinements: 0
ellipt->mesh: elliptMesh ellipt->mesh: elliptMesh
ellipt->dim: 3 ellipt->dim: 3
ellipt->polynomial degree: 2 ellipt->polynomial degree: 1
ellipt->solver: bicgstab ellipt->solver: cg
ellipt->solver->max iteration: 1000 ellipt->solver->max iteration: 1000
ellipt->solver->tolerance: 1.e-8 ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 2 ellipt->solver->info: 2
ellipt->solver->left precon: ilu ellipt->solver->left precon: diag
ellipt->solver->right precon: no ellipt->solver->right precon: no
ellipt->estimator: residual ellipt->estimator: residual
ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ellipt->estimator->C1: 0.01 % constant of jump residual ellipt->estimator->C1: 0.01 % constant of jump residual
ellipt->marker->strategy: 3 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS ellipt->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->MSGamma: 0.5 ellipt->marker->MSGamma: 0.5
ellipt->adapt->tolerance: 1e-8 ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 5 ellipt->adapt->max iteration: 10
ellipt->adapt->info: 8 ellipt->adapt->refine bisections: 2
ellipt->adapt->refine bisections: 3
ellipt->output->filename: ellipt
ellipt->output->filename: output/ellipt
ellipt->output->ParaView format: 1 ellipt->output->ParaView format: 1
ellipt->output->TecPlot format: 0
ellipt->output->TecPlot ext: .tec
ellipt->output->AMDiS format: 0
ellipt->output->AMDiS mesh ext: .mesh
ellipt->output->AMDiS data ext: .dat
ellipt->output->append index: 0
ellipt->output->index length: 6
ellipt->output->index decimals: 3
WAIT: 0
...@@ -4,7 +4,7 @@ heatMesh->macro file name: ./macro/macro.stand.1d ...@@ -4,7 +4,7 @@ heatMesh->macro file name: ./macro/macro.stand.1d
heatMesh->global refinements: 0 heatMesh->global refinements: 0
heat->space->polynomial degree: 1 heat->space->polynomial degree: 1
heat->space->dim: 1
heat->space->mesh: heatMesh heat->space->mesh: heatMesh
heat->space->solver: cg heat->space->solver: cg
...@@ -21,48 +21,28 @@ heat->space->estimator->C3: 1.0 ...@@ -21,48 +21,28 @@ heat->space->estimator->C3: 1.0
heat->theta: 1.0 heat->theta: 1.0
heat->adapt->tolerance: 0.01
heat->adapt->timestep: 0.01 heat->adapt->timestep: 0.01
heat->adapt->start time: 0.0
heat->adapt->end time: 1.0
heat->adapt->rel space error: 0.5 heat->adapt->tolerance: 0.01
heat->adapt->rel time error: 0.5 heat->adapt->time tolerance: 0.01
heat->adapt->max iteration: 2
heat->adapt->info: 8
heat->adapt->coarsen allowed: 1 % 0|1
heat->adapt->refine bisections: 1
heat->adapt->coarsen bisections: 1
heat->adapt->strategy: 1 % 0=explicit, 1=implicit heat->adapt->strategy: 1 % 0=explicit, 1=implicit
heat->adapt->max iteration: 1 heat->adapt->max iteration: 2
heat->initial->marker->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->initial->adapt->max iteration: 10
heat->initial->adapt->info: 8
heat->space->dim: 1 heat->adapt->coarsen allowed: 1
heat->adapt->refine bisections: 1
heat->adapt->coarsen bisections: 1
heat->space->marker->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS heat->space->marker->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->space->marker->ESTheta: 0.9 heat->space->marker->ESTheta: 0.9
heat->space->marker->ESThetaC: 0.05 heat->space->marker->ESThetaC: 0.05
heat->space->marker->info: 8 heat->space->output->filename: output/heat
heat->space->output->filename: heat
heat->space->output->ParaView format: 1 heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->TecPlot format: 0
heat->space->output->TecPlot ext: .tec
heat->space->output->AMDiS format: 0
heat->space->output->AMDiS mesh ext: .mesh
heat->space->output->AMDiS data ext: .dat
heat->space->output->write every i-th timestep: 1 heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1 heat->space->output->append index: 1
heat->space->output->index length: 6 heat->space->output->index length: 6
heat->space->output->index decimals: 3 heat->space->output->index decimals: 3
......
...@@ -7,46 +7,41 @@ heat->space->polynomial degree: 1 ...@@ -7,46 +7,41 @@ heat->space->polynomial degree: 1
heat->space->dim: 2 heat->space->dim: 2
heat->space->mesh: heatMesh heat->space->mesh: heatMesh
heat->space->solver: umfpack heat->space->solver: cg
heat->space->solver->max iteration: 1000 heat->space->solver->max iteration: 1000
heat->space->solver->tolerance: 1.e-8 heat->space->solver->tolerance: 1.e-8
heat->space->solver->info: 2 heat->space->solver->info: 2
heat->space->solver->left precon: no heat->space->solver->left precon: diag
heat->space->solver->right precon: no heat->space->solver->right precon: no
heat->space->estimator: residual heat->space->estimator: residual
heat->space->estimator->C0: 0.1 heat->space->estimator->C0: 1.0
heat->space->estimator->C1: 0.1 heat->space->estimator->C1: 1.0
heat->space->estimator->C3: 1.0
heat->theta: 1.0 heat->theta: 1.0
heat->adapt->timestep: 0.01 heat->adapt->timestep: 0.1
heat->adapt->min timestep: 0.01
heat->adapt->start time: 0.0 heat->adapt->start time: 0.0
heat->adapt->end time: 10.0 heat->adapt->end time: 1.0
heat->adapt->tolerance: 0.0001 heat->adapt->tolerance: 0.05
heat->adapt->rel space error: 0.5 heat->adapt->time tolerance: 0.05
heat->adapt->rel time error: 0.5
heat->adapt->time theta 1: 1.0
heat->adapt->time theta 2: 0.3
heat->adapt->strategy: 1 % 0=explicit, 1=implicit heat->adapt->strategy: 1 % 0=explicit, 1=implicit
heat->adapt->time delta 1: 0.7071
heat->adapt->time delta 2: 1.4142
heat->adapt->max iteration: 100 heat->adapt->max iteration: 100
heat->adapt->coarsen allowed: 1 % 0|1 heat->adapt->coarsen allowed: 1
heat->adapt->refine bisections: 1 heat->adapt->refine bisections: 2
heat->adapt->coarsen bisections: 1 heat->adapt->coarsen bisections: 2
heat->space->marker->strategy: 4 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS heat->space->marker->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->space->marker->MSGamma: 0.5 heat->space->marker->MSGamma: 0.5
heat->space->marker->MSGammaC: 0.1 heat->space->marker->MSGammaC: 0.1
heat->space->output->ParaView animation: 1
heat->space->output->filename: output/heat heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1 heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->write every i-th timestep: 1 heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1 heat->space->output->append index: 1
heat->space->output->index length: 6 heat->space->output->index length: 6
......
...@@ -3,7 +3,7 @@ dimension of world: 3 ...@@ -3,7 +3,7 @@ dimension of world: 3
heatMesh->macro file name: ./macro/macro.stand.3d heatMesh->macro file name: ./macro/macro.stand.3d
heatMesh->global refinements: 3 heatMesh->global refinements: 3
heat->space->polynomial degree: 2 heat->space->polynomial degree: 1
heat->space->dim: 3 heat->space->dim: 3
heat->space->mesh: heatMesh heat->space->mesh: heatMesh
...@@ -21,42 +21,29 @@ heat->space->estimator->C3: 1.0 ...@@ -21,42 +21,29 @@ heat->space->estimator->C3: 1.0
heat->theta: 1.0 heat->theta: 1.0
heat->adapt->timestep: 0.01
heat->adapt->start time: 0.0
heat->adapt->end time: 1.0
heat->adapt->tolerance: 0.01 heat->adapt->tolerance: 0.01
heat->adapt->time tolerance: 0.01
heat->adapt->timestep: 0.01
heat->adapt->rel space error: 0.5
heat->adapt->rel time error: 0.5
heat->adapt->strategy: 1 % 0=explicit, 1=implicit heat->adapt->strategy: 1 % 0=explicit, 1=implicit
heat->adapt->max iteration: 1 heat->adapt->max iteration: 2
heat->adapt->info: 2
heat->initial->adapt->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->initial->adapt->max iteration: 10
heat->initial->adapt->info: 2
heat->adapt->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS heat->adapt->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->adapt->ESTheta: 0.9 heat->adapt->ESTheta: 0.9
heat->adapt->ESThetaC: 0.05 heat->adapt->ESThetaC: 0.05
heat->adapt->max iteration: 2
heat->adapt->coarsen allowed: 1 % 0|1
heat->adapt->info: 2
heat->adapt->refine bisections: 3
heat->adapt->coarsen bisections: 3
heat->space->output->filename: heat heat->adapt->coarsen allowed: 1
heat->adapt->refine bisections: 3
heat->adapt->coarsen bisections: 3
heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1 heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->TecPlot format: 0 heat->space->output->write every i-th timestep: 1
heat->space->output->TecPlot ext: .tec
heat->space->output->AMDiS format: 0
heat->space->output->AMDiS mesh ext: .mesh
heat->space->output->AMDiS data ext: .dat
heat->space->output->write every i-th timestep: 100
heat->space->output->append index: 1 heat->space->output->append index: 1
heat->space->output->index length: 6 heat->space->output->index length: 6
heat->space->output->index decimals: 3 heat->space->output->index decimals: 3
......
...@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0 ...@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh vecellipt->mesh: vecelliptMesh
vecellipt->dim: 1 vecellipt->dim: 1
vecellipt->polynomial degree[0]: 2
vecellipt->polynomial degree[1]: 2
vecellipt->components: 2 vecellipt->components: 2
vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1
vecellipt->solver: bicgstab vecellipt->solver: ufmpack
vecellipt->solver->max iteration: 1000 vecellipt->solver->max iteration: 1000
vecellipt->solver->tolerance: 1.e-8 vecellipt->solver->tolerance: 1.e-8
vecellipt->solver->info: 2 vecellipt->solver->info: 2
vecellipt->solver->left precon: diag vecellipt->solver->left precon: no
vecellipt->solver->right precon: no vecellipt->solver->right precon: no
vecellipt->estimator[0]: residual vecellipt->estimator[0]: residual
...@@ -33,18 +32,11 @@ vecellipt->estimator[1]->C1: 0.1 % constant of jump residual ...@@ -33,18 +32,11 @@ vecellipt->estimator[1]->C1: 0.1 % constant of jump residual
vecellipt->marker[0]->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS vecellipt->marker[0]->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
vecellipt->marker[1]->MSGamma: 0.5 vecellipt->marker[1]->MSGamma: 0.5
vecellipt->adapt->max iteration: 8
vecellipt->adapt->info: 8
vecellipt->adapt->refine bisections: 1
vecellipt->adapt[0]->tolerance: 1e-4 vecellipt->adapt[0]->tolerance: 1e-4
vecellipt->adapt[1]->tolerance: 1e-4 vecellipt->adapt[1]->tolerance: 1e-4
vecellipt->output->filename: vecellipt vecellipt->adapt->max iteration: 10
vecellipt->output->ParaView format: 1 vecellipt->adapt->refine bisections: 2
vecellipt->info: 8
WAIT: 0
vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1
...@@ -5,9 +5,7 @@ vecelliptMesh->global refinements: 0 ...@@ -5,9 +5,7 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh vecellipt->mesh: vecelliptMesh
vecellipt->dim: 2 vecellipt->dim: 2
vecellipt->components: 2 vecellipt->components: 2
vecellipt->polynomial degree[0]: 1 vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1 vecellipt->polynomial degree[1]: 1
...@@ -29,15 +27,12 @@ vecellipt->marker[0]->MSGamma: 0.5 ...@@ -29,15 +27,12 @@ vecellipt->marker[0]->MSGamma: 0.5
vecellipt->estimator[1]: 0 vecellipt->estimator[1]: 0
vecellipt->marker[1]->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS vecellipt->marker[1]->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
vecellipt->adapt[0]->tolerance: 1e-2 vecellipt->adapt[0]->tolerance: 1e-2
vecellipt->adapt[1]->tolerance: 1e-3 vecellipt->adapt[1]->tolerance: 1e-3
vecellipt->adapt->max iteration: 100 vecellipt->adapt->max iteration: 10
vecellipt->adapt->refine bisections: 2 vecellipt->adapt->refine bisections: 2
vecellipt->output->filename: vecellipt vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1 vecellipt->output->ParaView format: 1
WAIT: 0
...@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0 ...@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh vecellipt->mesh: vecelliptMesh
vecellipt->dim: 3 vecellipt->dim: 3
vecellipt->components: 2
vecellipt->polynomial degree[0]: 1 vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1 vecellipt->polynomial degree[1]: 1
vecellipt->components: 2 vecellipt->solver: umfpack
vecellipt->solver: bicgstab
vecellipt->solver->max iteration: 1000 vecellipt->solver->max iteration: 1000
vecellipt->solver->tolerance: 1.e-8 vecellipt->solver->tolerance: 1.e-8
vecellipt->solver->info: 2 vecellipt->solver->info: 2
vecellipt->solver->left precon: diag vecellipt->solver->left precon: no
vecellipt->solver->right precon: no vecellipt->solver->right precon: no
vecellipt->estimator[0]: residual vecellipt->estimator[0]: residual
...@@ -33,21 +32,11 @@ vecellipt->estimator[1]->C1: 0.1 % constant of jump residual ...@@ -33,21 +32,11 @@ vecellipt->estimator[1]->C1: 0.1 % constant of jump residual
vecellipt->marker[1]->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS vecellipt->marker[1]->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
vecellipt->marker[1]->MSGamma: 0.5 vecellipt->marker[1]->MSGamma: 0.5
vecellipt->adapt->max iteration: 5
vecellipt->adapt->info: 8
vecellipt->adapt->refine bisections[0]: 3
vecellipt->adapt->refine bisections[1]: 3
vecellipt->adapt[0]->tolerance: 1e-4 vecellipt->adapt[0]->tolerance: 1e-4
vecellipt->adapt[1]->tolerance: 1e-4 vecellipt->adapt[1]->tolerance: 1e-4
vecellipt->adapt->max iteration: 10
vecellipt->adapt->refine bisections: 2
vecellipt->output->filename: vecellipt vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1 vecellipt->output->ParaView format: 1
vecellipt->info: 8
WAIT: 0
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
/// Implementation of AbstractFunction::operator(). /// Implementation of AbstractFunction::operator().
double operator()(const WorldVector<double>& x) const double operator()(const WorldVector<double>& x) const
{ {
int dow = x.getSize(); int dow = Global::getGeo(WORLD);
double r2 = (x * x); double r2 = (x * x);
double ux = exp(-10.0 * r2); double ux = exp(-10.0 * r2);
return -(400.0 * r2 - 20.0 * dow) * ux; return -(400.0 * r2 - 20.0 * dow) * ux;
......
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
/// Implementation of AbstractFunction::operator(). /// Implementation of AbstractFunction::operator().
double operator()(const WorldVector<double>& x) const double operator()(const WorldVector<double>& x) const
{ {
int dim = x.getSize(); int dim = Global::getGeo(WORLD);
double r2 = x * x; double r2 = x * x;
double ux = sin(M_PI * (*timePtr)) * exp(-10.0 * r2); double ux = sin(M_PI * (*timePtr)) * exp(-10.0 * r2);
double ut = M_PI * cos(M_PI * (*timePtr)) * exp(-10.0 * r2); double ut = M_PI * cos(M_PI * (*timePtr)) * exp(-10.0 * r2);
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
WARNING("Use a sufficiently small time step size!!!\n"); WARNING("Use a sufficiently small time step size!!!\n");
} }
MSG("theta = %f\n", theta); MSG("theta = %f\n", theta);
theta1 = theta - 1; theta1 = theta - 1.0;
} }
// ===== ProblemInstatBase methods =================================== // ===== ProblemInstatBase methods ===================================
...@@ -66,9 +66,10 @@ public: ...@@ -66,9 +66,10 @@ public:
/// set the time in all needed functions! /// set the time in all needed functions!
void setTime(AdaptInfo *adaptInfo) void setTime(AdaptInfo *adaptInfo)
{ {
ProblemInstat::setTime(adaptInfo);
rhsTime = adaptInfo->getTime() - (1 - theta) * adaptInfo->getTimestep(); rhsTime = adaptInfo->getTime() - (1 - theta) * adaptInfo->getTimestep();
boundaryTime = adaptInfo->getTime(); boundaryTime = adaptInfo->getTime();
tau1 = 1.0 / adaptInfo->getTimestep();
} }
void closeTimestep(AdaptInfo *adaptInfo) void closeTimestep(AdaptInfo *adaptInfo)
...@@ -118,12 +119,6 @@ public: ...@@ -118,12 +119,6 @@ public:
return &theta1; return &theta1;
} }