Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

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 {
GET_PARAMETER(0, prefix + "->sum factor", "%f", &fac_sum);
GET_PARAMETER(0, prefix + "->max factor", "%f", &fac_max);
timeErrLow = timeTolerance;
timeErrLow = timeTolerance * 0.3;
}
/// Sum of all error estimates
......
......@@ -169,11 +169,11 @@ namespace AMDiS {
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) {
/* === Space iterations === */
// === Space iterations. ===
do {
problemIteration->beginIteration(adaptInfo);
......
......@@ -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->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->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->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
......@@ -22,23 +22,9 @@ ellipt->estimator->C1: 0.1 % constant of jump residual
ellipt->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->MSGamma: 0.5
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10
ellipt->adapt->refine bisections: 2
ellipt->output->filename: ellipt
ellipt->output->filename: output/ellipt
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
ellipt->mesh: elliptMesh
ellipt->dim: 3
ellipt->polynomial degree: 2
ellipt->polynomial degree: 1
ellipt->solver: bicgstab
ellipt->solver: cg
ellipt->solver->max iteration: 1000
ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 2
ellipt->solver->left precon: ilu
ellipt->solver->left precon: diag
ellipt->solver->right precon: no
ellipt->estimator: residual
ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
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->adapt->tolerance: 1e-8
ellipt->adapt->max iteration: 5
ellipt->adapt->info: 8
ellipt->adapt->refine bisections: 3
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->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
heatMesh->global refinements: 0
heat->space->polynomial degree: 1
heat->space->dim: 1
heat->space->mesh: heatMesh
heat->space->solver: cg
......@@ -21,51 +21,31 @@ heat->space->estimator->C3: 1.0
heat->theta: 1.0
heat->adapt->tolerance: 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->rel time error: 0.5
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->max iteration: 1
heat->initial->marker->strategy: 2 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->adapt->tolerance: 0.01
heat->adapt->time tolerance: 0.01
heat->initial->adapt->max iteration: 10
heat->initial->adapt->info: 8
heat->adapt->strategy: 1 % 0=explicit, 1=implicit
heat->adapt->max iteration: 2
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->ESThetaC: 0.05
heat->space->marker->info: 8
heat->space->output->filename: heat
heat->space->output->ParaView format: 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->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
heat->space->marker->ESThetaC: 0.05
heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
WAIT: 0
......
......@@ -7,49 +7,44 @@ heat->space->polynomial degree: 1
heat->space->dim: 2
heat->space->mesh: heatMesh
heat->space->solver: umfpack
heat->space->solver: cg
heat->space->solver->max iteration: 1000
heat->space->solver->tolerance: 1.e-8
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->estimator: residual
heat->space->estimator->C0: 0.1
heat->space->estimator->C1: 0.1
heat->space->estimator->C0: 1.0
heat->space->estimator->C1: 1.0
heat->space->estimator->C3: 1.0
heat->theta: 1.0
heat->adapt->timestep: 0.01
heat->adapt->min timestep: 0.01
heat->adapt->timestep: 0.1
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->rel space error: 0.5
heat->adapt->rel time error: 0.5
heat->adapt->time theta 1: 1.0
heat->adapt->time theta 2: 0.3
heat->adapt->tolerance: 0.05
heat->adapt->time tolerance: 0.05
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->coarsen allowed: 1 % 0|1
heat->adapt->refine bisections: 1
heat->adapt->coarsen bisections: 1
heat->adapt->coarsen allowed: 1
heat->adapt->refine bisections: 2
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->MSGammaC: 0.1
heat->space->output->ParaView animation: 1
heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1
heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
WAIT: 0
......@@ -3,7 +3,7 @@ dimension of world: 3
heatMesh->macro file name: ./macro/macro.stand.3d
heatMesh->global refinements: 3
heat->space->polynomial degree: 2
heat->space->polynomial degree: 1
heat->space->dim: 3
heat->space->mesh: heatMesh
......@@ -21,45 +21,32 @@ heat->space->estimator->C3: 1.0
heat->theta: 1.0
heat->adapt->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->max iteration: 1
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->start time: 0.0
heat->adapt->end time: 1.0
heat->adapt->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->adapt->ESTheta: 0.9
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->tolerance: 0.01
heat->adapt->time tolerance: 0.01
heat->space->output->ParaView format: 1
heat->adapt->strategy: 1 % 0=explicit, 1=implicit
heat->adapt->max iteration: 2
heat->space->output->TecPlot format: 0
heat->space->output->TecPlot ext: .tec
heat->adapt->strategy: 3 % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
heat->adapt->ESTheta: 0.9
heat->adapt->ESThetaC: 0.05
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->adapt->coarsen allowed: 1
heat->adapt->refine bisections: 3
heat->adapt->coarsen bisections: 3
heat->space->output->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
heat->space->output->filename: output/heat
heat->space->output->ParaView format: 1
heat->space->output->ParaView animation: 1
heat->space->output->write every i-th timestep: 1
heat->space->output->append index: 1
heat->space->output->index length: 6
heat->space->output->index decimals: 3
WAIT: 0
......
......@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh
vecellipt->dim: 1
vecellipt->polynomial degree[0]: 2
vecellipt->polynomial degree[1]: 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->tolerance: 1.e-8
vecellipt->solver->info: 2
vecellipt->solver->left precon: diag
vecellipt->solver->left precon: no
vecellipt->solver->right precon: no
vecellipt->estimator[0]: 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[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[1]->tolerance: 1e-4
vecellipt->output->filename: vecellipt
vecellipt->output->ParaView format: 1
vecellipt->info: 8
WAIT: 0
vecellipt->adapt->max iteration: 10
vecellipt->adapt->refine bisections: 2
vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1
......@@ -5,9 +5,7 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh
vecellipt->dim: 2
vecellipt->components: 2
vecellipt->components: 2
vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1
......@@ -29,15 +27,12 @@ vecellipt->marker[0]->MSGamma: 0.5
vecellipt->estimator[1]: 0
vecellipt->marker[1]->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
vecellipt->adapt[0]->tolerance: 1e-2
vecellipt->adapt[1]->tolerance: 1e-3
vecellipt->adapt->max iteration: 100
vecellipt->adapt->max iteration: 10
vecellipt->adapt->refine bisections: 2
vecellipt->output->filename: vecellipt
vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1
WAIT: 0
......@@ -5,16 +5,15 @@ vecelliptMesh->global refinements: 0
vecellipt->mesh: vecelliptMesh
vecellipt->dim: 3
vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1
vecellipt->components: 2
vecellipt->polynomial degree[0]: 1
vecellipt->polynomial degree[1]: 1
vecellipt->solver: bicgstab
vecellipt->solver: umfpack
vecellipt->solver->max iteration: 1000
vecellipt->solver->tolerance: 1.e-8
vecellipt->solver->info: 2
vecellipt->solver->left precon: diag
vecellipt->solver->left precon: no
vecellipt->solver->right precon: no
vecellipt->estimator[0]: 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]->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[1]->tolerance: 1e-4
vecellipt->adapt->max iteration: 10
vecellipt->adapt->refine bisections: 2
vecellipt->output->filename: vecellipt
vecellipt->output->ParaView format: 1
vecellipt->info: 8
WAIT: 0
vecellipt->output->filename: output/vecellipt
vecellipt->output->ParaView format: 1
......@@ -29,7 +29,7 @@ public:
/// Implementation of AbstractFunction::operator().
double operator()(const WorldVector<double>& x) const
{
int dow = x.getSize();
int dow = Global::getGeo(WORLD);
double r2 = (x * x);
double ux = exp(-10.0 * r2);
return -(400.0 * r2 - 20.0 * dow) * ux;
......
......@@ -30,7 +30,7 @@ public:
/// Implementation of AbstractFunction::operator().
double operator()(const WorldVector<double>& x) const
{
int dim = x.getSize();
int dim = Global::getGeo(WORLD);
double r2 = x * x;
double ux = sin(M_PI * (*timePtr)) * exp(-10.0 * r2);
double ut = M_PI * cos(M_PI * (*timePtr)) * exp(-10.0 * r2);
......@@ -58,7 +58,7 @@ public:
WARNING("Use a sufficiently small time step size!!!\n");
}
MSG("theta = %f\n", theta);
theta1 = theta - 1;
theta1 = theta - 1.0;
}
// ===== ProblemInstatBase methods ===================================
......@@ -66,9 +66,10 @@ public:
/// set the time in all needed functions!
void setTime(AdaptInfo *adaptInfo)
{
ProblemInstat::setTime(adaptInfo);
rhsTime = adaptInfo->getTime() - (1 - theta) * adaptInfo->getTimestep();
boundaryTime = adaptInfo->getTime();
tau1 = 1.0 / adaptInfo->getTimestep();
}
void closeTimestep(AdaptInfo *adaptInfo)
......@@ -118,12 +119,6 @@ public:
return &theta1;
}
/// Returns pointer to \ref tau1
double *getTau1Ptr()
{
return &tau1;
}
/// Returns pointer to \ref rhsTime.
double *getRHSTimePtr()
{
......@@ -143,9 +138,6 @@ private:
/// theta - 1
double theta1;
/// 1.0 / timestep
double tau1;
/// time for right hand side functions.
double rhsTime;
......@@ -193,6 +185,13 @@ int main(int argc, char** argv)
adaptInfoInitial);
// ===== create boundary functions =====
G *boundaryFct = new G;
boundaryFct->setTimePtr(heat.getBoundaryTimePtr());
heat.setExactSolution(boundaryFct);
heatSpace.addDirichletBC(1, boundaryFct);
// ===== create rhs functions =====
int degree = heatSpace.getFeSpace()->getBasisFcts()->getDegree();
F *rhsFct = new F(degree);
......@@ -216,8 +215,8 @@ int main(int argc, char** argv)
Operator C(heatSpace.getFeSpace());
C.addZeroOrderTerm(new Simple_ZOT);
C.setUhOld(heat.getOldSolution());
heatSpace.addMatrixOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr());
heatSpace.addVectorOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr());
heatSpace.addMatrixOperator(C, heat.getInvTau(), heat.getInvTau());
heatSpace.addVectorOperator(C, heat.getInvTau(), heat.getInvTau());
// create RHS operator
Operator F(heatSpace.getFeSpace());
......@@ -225,14 +224,6 @@ int main(int argc, char** argv)
heatSpace.addVectorOperator(F);
// ===== create boundary functions =====
G *boundaryFct = new G;
boundaryFct->setTimePtr(heat.getBoundaryTimePtr());
heat.setExactSolution(boundaryFct);
// heatSpace.addDirichletBC(DIRICHLET, boundaryFct);
// ===== start adaption loop =====
int errorCode = adaptInstat.adapt();
......
......@@ -27,7 +27,7 @@ public:
/// Implementation of AbstractFunction::operator().
double operator()(const WorldVector<double>& x) const
{
int dim = x.getSize();
int dim = Global::getGeo(WORLD);
double r2 = (x * x);
double ux = exp(-10.0 * r2);
return -(400.0 * r2 - 20.0 * dim) * ux;
......
......@@ -268,28 +268,29 @@ a finer mesh.
\begin{lstlisting}{}
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->polynomial degree: 3
ellipt->polynomial degree: 1
\end{lstlisting}
Now, we construct the finite element space for the problem
\verb+ellipt+ (see Section \ref{s:ellipt code}). We use the mesh
\verb+elliptMesh+, set the problem dimension to 2, and choose Lagrange
basis functions of degree 3.
basis functions of degree 1.
\begin{lstlisting}{}
ellipt->solver: cg % no bicgstab cg gmres odir ores
ellipt->solver: cg
ellipt->solver->max iteration: 1000
ellipt->solver->tolerance: 1.e-8
ellipt->solver->left precon: diag % no, diag
ellipt->solver->left precon: diag
ellipt->solver->right precon: no
\end{lstlisting}
We use the {\it conjugate gradient method} as iterative solver. The
solving process stops after maximal $1000$ iterations or when a
tolerance of $10^{-8}$ is reached. Furthermore, we apply diagonal
pre-conditioning.
tolerance of $10^{-8}$ is reached. Furthermore, we apply diagonal left
preconditioning, and no right preconditioning.
\begin{lstlisting}{}
ellipt->estimator: residual % residual, recovery
ellipt->estimator: residual
ellipt->estimator->error norm: 1
ellipt->estimator->C0: 0.1
ellipt->estimator->C1: 0.1
......@@ -309,27 +310,23 @@ coarsening. Here, we use the maximum strategy with $\gamma = 0.5$.
\begin{lstlisting}{}
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 100
ellipt->adapt->max iteration: 10
ellipt->adapt->refine bisections: 2
\end{lstlisting}
The adaptation loop stops, when an error tolerance of $10^{-4}$ is
reached, or after maximal $100$ iterations. An element that is marked
reached, or after maximal $10$ iterations. An element that is marked
for refinement, is bisected twice within one iteration. Analog