diff --git a/demo/init/mpcci1.dat.2d b/demo/init/mpcci1.dat.2d
deleted file mode 100644
index af40b270b59250d2ca798122976fa1c4cf22ee00..0000000000000000000000000000000000000000
--- a/demo/init/mpcci1.dat.2d
+++ /dev/null
@@ -1,41 +0,0 @@
-dimension of world:             2
-
-mpcci1Mesh->macro file name:    ./macro/smi.macro.2d
-mpcci1Mesh->global refinements: 0
-
-mpcci1->mesh:                   mpcci1Mesh
-mpcci1->dim:                    2
-mpcci1->polynomial degree:      1
-
-mpcci1->solver:                 cg
-mpcci1->solver->max iteration:  1000
-mpcci1->solver->tolerance:      1.e-8
-mpcci1->solver->info:           2
-mpcci1->solver->left precon:    diag
-mpcci1->solver->right precon:   no
-
-mpcci1->estimator:              residual
-mpcci1->estimator->error norm:  1   % 1: H1_NORM, 2: L2_NORM
-mpcci1->estimator->C0:          0.1 % constant of element residual
-mpcci1->estimator->C1:          0.1 % constant of jump residual
-
-mpcci1->marker->strategy:       2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-mpcci1->marker->MSGamma:        0.5
-
-mpcci1->adapt->tolerance:       1e-8
-mpcci1->adapt->max iteration:   100
-mpcci1->adapt->refine bisections:  2
-
-mpcci1->output->filename:       mpcci1
-
-mpcci1->output->ParaView format:   1
-
-mpcci1->output->AMDiS format:   0
-mpcci1->output->AMDiS mesh ext: .mesh
-mpcci1->output->AMDiS data ext: .dat
-
-mpcci1->output->append index:   0
-mpcci1->output->index length:   6
-mpcci1->output->index decimals: 3
-
-WAIT:                           0
diff --git a/demo/init/mpcci2.dat.2d b/demo/init/mpcci2.dat.2d
deleted file mode 100644
index 5035344a79b62f6b3bf0b81df953910f1861e5c0..0000000000000000000000000000000000000000
--- a/demo/init/mpcci2.dat.2d
+++ /dev/null
@@ -1,41 +0,0 @@
-dimension of world:             2
-
-mpcci2Mesh->macro file name:    ./macro/mpcci.macro.2d
-mpcci2Mesh->global refinements: 8
-
-mpcci2->mesh:                   mpcci2Mesh
-mpcci2->dim:                    2
-mpcci2->polynomial degree:      1
-
-mpcci2->solver:                 cg
-mpcci2->solver->max iteration:  1000
-mpcci2->solver->tolerance:      1.e-8
-mpcci2->solver->info:           2
-mpcci2->solver->left precon:    diag
-mpcci2->solver->right precon:   no
-
-mpcci2->estimator:              residual
-mpcci2->estimator->error norm:  1   % 1: H1_NORM, 2: L2_NORM
-mpcci2->estimator->C0:          0.1 % constant of element residual
-mpcci2->estimator->C1:          0.1 % constant of jump residual
-
-mpcci2->marker->strategy:       2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-mpcci2->marker->MSGamma:        0.5
-
-mpcci2->adapt->tolerance:       1e-2
-mpcci2->adapt->max iteration:   1
-mpcci2->adapt->refine bisections:  2
-
-mpcci2->output->filename:       mpcci2
-
-mpcci2->output->ParaView format: 1
-
-mpcci2->output->AMDiS format:   0
-mpcci2->output->AMDiS mesh ext: .mesh
-mpcci2->output->AMDiS data ext: .dat
-
-mpcci2->output->append index:   0
-mpcci2->output->index length:   6
-mpcci2->output->index decimals: 3
-
-WAIT:                           1
diff --git a/demo/init/mpccitest.dat.2d b/demo/init/mpccitest.dat.2d
deleted file mode 100644
index 0bc43f45173d75d9961c06e3f35663a72e07fa79..0000000000000000000000000000000000000000
--- a/demo/init/mpccitest.dat.2d
+++ /dev/null
@@ -1,36 +0,0 @@
-dimension of world:             2
-
-mpccitestMesh->macro file name:    ./macro/smi.macro.2d
-mpccitestMesh->global refinements: 0
-
-mpccitest->mesh:                   mpccitestMesh
-mpccitest->dim:                    2
-mpccitest->polynomial degree:      1
-
-mpccitest->solver:                 cg
-mpccitest->solver->max iteration:  1000
-mpccitest->solver->tolerance:      1.e-8
-mpccitest->solver->info:           2
-mpccitest->solver->left precon:    diag
-mpccitest->solver->right precon:   no
-
-mpccitest->estimator:              residual
-mpccitest->estimator->error norm:  1   % 1: H1_NORM, 2: L2_NORM
-mpccitest->estimator->C0:          0.1 % constant of element residual
-mpccitest->estimator->C1:          0.1 % constant of jump residual
-
-mpccitest->marker->strategy:       2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-mpccitest->marker->MSGamma:        0.5
-
-mpccitest->adapt->tolerance:       1e-2
-mpccitest->adapt->max iteration:   1
-mpccitest->adapt->refine bisections:  2
-
-mpccitest->output->filename:       mpccitest
-mpccitest->output->ParaView format: 1
-
-mpccitest->output->append index:   0
-mpccitest->output->index length:   6
-mpccitest->output->index decimals: 3
-
-WAIT:                           1
diff --git a/demo/init/navierstokes.dat.2d b/demo/init/navierstokes.dat.2d
deleted file mode 100644
index 9c93b8dff3403a2b123ed608b80925e52049d16a..0000000000000000000000000000000000000000
--- a/demo/init/navierstokes.dat.2d
+++ /dev/null
@@ -1,85 +0,0 @@
-dimension of world:                              2
-
-navierstokesMesh->macro file name:              ./macro/navierstokes.macro.2d
-navierstokesMesh->global refinements:           8
-
-navierstokes->space->mesh:                      navierstokesMesh
-navierstokes->space->dim:                       2
-navierstokes->space->components:                3
-navierstokes->space->polynomial degree[0]:      1
-navierstokes->space->polynomial degree[1]:      1
-navierstokes->space->polynomial degree[2]:      1
-
-navierstokes->adapt->timestep:                  0.05
-navierstokes->adapt->strategy:                  0   % 0=explicit, 1=implicit
-navierstokes->adapt->max iteration:             10
-navierstokes->adapt->max timestep iteration:    10
-
-navierstokes->initial->marker[0]->strategy:     2   % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
-navierstokes->initial->marker[1]->strategy:     2   % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
-navierstokes->initial->marker[2]->strategy:     0   % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
-navierstokes->initial->adapt->max iteration:    10
-
-navierstokes->adapt[0]->refine bisections:      2
-navierstokes->adapt[0]->coarsen bisections:     2
-navierstokes->adapt[1]->refine bisections:      2
-navierstokes->adapt[1]->coarsen bisections:     2
-
-navierstokes->adapt[0]->tolerance:              0.01
-navierstokes->adapt[0]->rel space error:        0.5
-navierstokes->adapt[0]->rel time error:         0.5
-navierstokes->adapt[0]->info:                   8
-navierstokes->adapt[0]->coarsen allowed:        0  % 0|1
-
-navierstokes->adapt[1]->tolerance:              0.01
-navierstokes->adapt[1]->rel space error:        0.5
-navierstokes->adapt[1]->rel time error:         0.5
-navierstokes->adapt[1]->info:                   8
-navierstokes->adapt[1]->coarsen allowed:        1   % 0|1
-
-navierstokes->adapt[2]->tolerance:              0.1
-navierstokes->adapt[2]->rel space error:        0.5
-navierstokes->adapt[2]->rel time error:         0.5
-navierstokes->adapt[2]->info:                   8
-navierstokes->adapt[2]->coarsen allowed:        1   % 0|1
-
-navierstokes->space->solver:                    bicgstab
-navierstokes->space->solver->max iteration:     1000
-navierstokes->space->solver->tolerance:         1.e-8
-navierstokes->space->solver->info:              5
-navierstokes->space->solver->left precon:       ilu
-navierstokes->space->solver->right precon:      no
-
-navierstokes->space->estimator[0]:              residual
-navierstokes->space->estimator[0]->C0:          1.0
-navierstokes->space->estimator[0]->C1:          1.0
-navierstokes->space->estimator[0]->C3:          1.0
-
-navierstokes->space->estimator[1]:              residual
-navierstokes->space->estimator[1]->C0:          1.0
-navierstokes->space->estimator[1]->C1:          1.0
-navierstokes->space->estimator[1]->C3:          1.0
-
-navierstokes->space->marker[0]->strategy:       3    % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
-navierstokes->space->marker[0]->ESTheta:        0.9
-navierstokes->space->marker[0]->ESThetaC:       0.05
-navierstokes->space->marker[0]->info:           8
-
-navierstokes->space->marker[1]->strategy:       3    % 0=none, 1=GR, 2=MS, 3=ES, 4=GERS
-navierstokes->space->marker[1]->ESTheta:        0.9
-navierstokes->space->marker[1]->ESThetaC:       0.05
-navierstokes->space->marker[1]->info:           8
-
-navierstokes->space->output->filename:       navierstokes_
-navierstokes->space->output->ParaView format:   1
-navierstokes->space->output->append index:   1
-navierstokes->space->output->index length:   6
-navierstokes->space->output->index decimals: 3
-
-WAIT:                                           0
-
-nu: 0.1
-epsilon: 1.0
-
-
-
diff --git a/demo/init/nonlin.dat.1d b/demo/init/nonlin.dat.1d
deleted file mode 100644
index e68d33f79f954f6491169357d56d72f43713d0ac..0000000000000000000000000000000000000000
--- a/demo/init/nonlin.dat.1d
+++ /dev/null
@@ -1,39 +0,0 @@
-dimension of world:   1
-
-nonlinMesh->macro file name:      ./macro/macro_big.stand.1d
-nonlinMesh->global refinements:   1
-
-nonlin->mesh:  nonlinMesh
-
-nonlin->dim:                  1
-nonlin->polynomial degree:    1
-
-
-nonlin->newton->tolerance:     1e-4
-nonlin->newton->max iteration: 10
-
-nonlin->solver:                 cg
-nonlin->solver->max iteration:  1000
-nonlin->solver->tolerance:      1.e-8
-nonlin->solver->left precon:    diag
-
-nonlin->estimator:              residual
-nonlin->estimator->error norm:  1   % 1: H1_NORM, 2: L2_NORM
-nonlin->estimator->C0:          0.1 % constant of element residual
-nonlin->estimator->C1:          0.1 % constant of jump residual
-
-nonlin->marker->strategy:       0   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-nonlin->marker->MSGamma:        0.9
-
-nonlin->adapt->tolerance:       1.e-8
-nonlin->adapt->max iteration:   0
-
-nonlin->adapt->refine bisections: 2
-
-nonlin->output->filename:       output/nonlin
-
-nonlin->output->ParaView format: 1
-
-nonlin->output->AMDiS format:   0
-nonlin->output->AMDiS mesh ext: .mesh
-nonlin->output->AMDiS data ext: .dat
diff --git a/demo/init/nonlin.dat.2d b/demo/init/nonlin.dat.2d
deleted file mode 100644
index 57eea338687b25f60982cebe8ae4f72155dcfc90..0000000000000000000000000000000000000000
--- a/demo/init/nonlin.dat.2d
+++ /dev/null
@@ -1,35 +0,0 @@
-dimension of world:   2
-
-nonlinMesh->macro file name:      ./macro/macro_big.stand.2d
-nonlinMesh->global refinements:   0
-
-nonlin->mesh:  nonlinMesh
-
-nonlin->dim:                  2
-nonlin->polynomial degree:    1
-
-nonlin->newton->tolerance:     1e-8
-nonlin->newton->max iteration: 100
-
-nonlin->solver:                 cg
-nonlin->solver->max iteration:  1000
-nonlin->solver->tolerance:      1.e-8
-nonlin->solver->left precon:    diag
-
-nonlin->estimator:              residual
-nonlin->estimator->C0:          0.1
-nonlin->estimator->C1:          0.1
-
-nonlin->marker->strategy:       2
-nonlin->marker->MSGamma:        0.5
-
-nonlin->adapt->tolerance:       1e-3
-nonlin->adapt->max iteration:   12
-
-nonlin->output->filename:       output/nonlin
-
-nonlin->output->ParaView format: 1
-
-nonlin->output->AMDiS format:   0
-nonlin->output->AMDiS mesh ext: .mesh
-nonlin->output->AMDiS data ext: .dat
diff --git a/demo/init/nonlin.dat.3d b/demo/init/nonlin.dat.3d
deleted file mode 100644
index 2127f3c77fd655806c0fa1b2097f20f9466ac118..0000000000000000000000000000000000000000
--- a/demo/init/nonlin.dat.3d
+++ /dev/null
@@ -1,54 +0,0 @@
-dimension of world:                   3
-
-nonlinMesh->macro file name:          ./macro/macro_big.stand.3d
-nonlinMesh->global refinements:       0
-
-nonlin->mesh:                         nonlinMesh
-
-nonlin->dim:                          3
-nonlin->polynomial degree:            2
-
-nonlin->nonlin solver:                newton_fs
-
-nonlin->nonlin solver->tolerance:     1.e-6     % tolerance for Newton
-nonlin->nonlin solver->max iteration: 5     % maximal number of iterations of Newton
-nonlin->nonlin solver->info:          6         % information level of Newton
-nonlin->nonlin solver->restart:       20        % number of iterations for step size control
-nonlin->nonlin solver->norm:          1         % 1:H1, 2:L2
-
-nonlin->solver:                       bicgstab
-nonlin->solver->max iteration:        1000
-nonlin->solver->tolerance:            1.e-7
-nonlin->solver->info:                 0    
-nonlin->solver->left precon:          diag
-nonlin->solver->right precon:         no
-
-nonlin->estimator:                    residual
-nonlin->estimator->error norm:        1   % 1: H1_NORM, 2: L2_NORM
-nonlin->estimator->C0:                0.1 % constant of element residual
-nonlin->estimator->C1:                0.1 % constant of jump residual
-
-nonlin->marker->strategy:             2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-nonlin->marker->MSGamma:              0.9
-
-nonlin->adapt->tolerance:             1.e-8
-nonlin->adapt->max iteration:         8
-nonlin->adapt->info:                  4
-
-nonlin->adapt->refine bisections: 3
-nonlin->adapt->coarsen bisections: 3
-
-nonlin->output->filename:             nonlin
-
-nonlin->output->ParaView format:      1
-
-nonlin->output->TecPlot format:       0
-nonlin->output->TecPlot ext:          .tec
-
-nonlin->output->AMDiS format:         0
-nonlin->output->AMDiS mesh ext:       .mesh
-nonlin->output->AMDiS data ext:       .dat
-
-nonlin->output->append index:         0
-nonlin->output->index length:         6
-nonlin->output->index decimals:       3
diff --git a/demo/init/vecnonlin.dat.1d b/demo/init/vecnonlin.dat.1d
deleted file mode 100644
index 034ef22e765e4d8d21241fa4b2ac78f5b473a8dd..0000000000000000000000000000000000000000
--- a/demo/init/vecnonlin.dat.1d
+++ /dev/null
@@ -1,81 +0,0 @@
-dimension of world:                      1
-
-vecnonlinMesh->macro file name:          ./macro/macro_big.stand.1d
-vecnonlinMesh->global refinements:       2
-
-vecnonlin->dim:                          1
-vecnonlin->mesh:                         vecnonlinMesh
-
-vecnonlin->polynomial degree[0]:            2
-vecnonlin->polynomial degree[1]:            2
-
-vecnonlin->components:                   2
-
-vecnonlin->nonlin solver:                newton_fs   %  no, newton, newton_fs
-
-vecnonlin->nonlin solver->tolerance:     1.e-6     % tolerance for Newton
-vecnonlin->nonlin solver->max iteration: 50    % maximal number of iterations of Newton
-vecnonlin->nonlin solver->info:          2     % information level of Newton
-vecnonlin->nonlin solver->restart:       10    % number of iterations for step size control
-vecnonlin->nonlin solver->norm:          1     % 1: H1_NORM, 2: L2_NORM
-
-vecnonlin->solver:                       cg
-vecnonlin->solver->max iteration:        1000
-vecnonlin->solver->tolerance:            1.e-8
-vecnonlin->solver->info:                 1 
-vecnonlin->solver->left precon:          diag
-vecnonlin->solver->right precon:         no
-
-vecnonlin->estimator[0]:                 residual
-vecnonlin->estimator[0]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[0]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[0]->C1:             0.1 % constant of jump residual
-
-vecnonlin->estimator[1]:                 residual
-vecnonlin->estimator[1]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[1]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[1]->C1:             0.1 % constant of jump residual
-
-vecnonlin->marker[0]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[0]->MSGamma:           0.9
-
-vecnonlin->marker[1]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[1]->MSGamma:           0.9
-
-vecnonlin->adapt->max iteration:         8
-vecnonlin->adapt->info:                  4
-vecnonlin->adapt->refine bisections:     1
-vecnonlin->adapt->coarsen bisections:     1
-
-vecnonlin->adapt[0]->tolerance:          1.e-8
-vecnonlin->adapt[1]->tolerance:          1.e-8
-
-vecnonlin->output[0]->filename:          vecnonlin
-
-vecnonlin->output[0]->ParaView format:    1
-
-vecnonlin->output[0]->TecPlot format:    0
-vecnonlin->output[0]->TecPlot ext:       .tec
-
-vecnonlin->output[0]->AMDiS format:      0
-vecnonlin->output[0]->AMDiS mesh ext:    .mesh
-vecnonlin->output[0]->AMDiS data ext:    .dat
-
-vecnonlin->output[0]->append index:      0
-vecnonlin->output[0]->index length:      6
-vecnonlin->output[0]->index decimals:    3
-
-vecnonlin->output[1]->filename:          vecnonlin
-
-vecnonlin->output[1]->ParaView format:    1
-
-vecnonlin->output[1]->TecPlot format:    0
-vecnonlin->output[1]->TecPlot ext:       .tec
-
-vecnonlin->output[1]->AMDiS format:      0
-vecnonlin->output[1]->AMDiS mesh ext:    .mesh
-vecnonlin->output[1]->AMDiS data ext:    .dat
-
-vecnonlin->output[1]->append index:      0
-vecnonlin->output[1]->index length:      6
-vecnonlin->output[1]->index decimals:    3
diff --git a/demo/init/vecnonlin.dat.2d b/demo/init/vecnonlin.dat.2d
deleted file mode 100644
index 6813d98b131b2167b81f35ed8b603957a0d3a759..0000000000000000000000000000000000000000
--- a/demo/init/vecnonlin.dat.2d
+++ /dev/null
@@ -1,82 +0,0 @@
-dimension of world:                      2
-
-vecnonlinMesh->macro file name:          ./macro/macro.stand.2d
-vecnonlinMesh->global refinements:       2
-
-vecnonlin->dim:                          2
-vecnonlin->mesh:                         vecnonlinMesh
-
-vecnonlin->polynomial degree[0]:            2
-vecnonlin->polynomial degree[1]:            2
-
-vecnonlin->components:                   2
-
-vecnonlin->nonlin solver:                newton_fs   %  no, newton, newton_fs
-
-vecnonlin->nonlin solver->tolerance:     1.e-6     % tolerance for Newton
-vecnonlin->nonlin solver->max iteration: 50    % maximal number of iterations of Newton
-vecnonlin->nonlin solver->info:          2     % information level of Newton
-vecnonlin->nonlin solver->restart:       10    % number of iterations for step size control
-vecnonlin->nonlin solver->norm:          1     % 1: H1_NORM, 2: L2_NORM
-
-vecnonlin->solver:                       cg
-vecnonlin->solver->max iteration:        1000
-vecnonlin->solver->tolerance:            1.e-8
-vecnonlin->solver->info:                 1 
-vecnonlin->solver->left precon:          diag
-vecnonlin->solver->right precon:         no
-
-vecnonlin->estimator[0]:                 residual
-vecnonlin->estimator[0]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[0]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[0]->C1:             0.1 % constant of jump residual
-
-vecnonlin->estimator[1]:                 residual
-vecnonlin->estimator[1]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[1]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[1]->C1:             0.1 % constant of jump residual
-
-vecnonlin->marker[0]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[0]->MSGamma:           0.9
-
-vecnonlin->marker[1]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[1]->MSGamma:           0.9
-
-vecnonlin->adapt->max iteration:         8
-vecnonlin->adapt->info:                  4
-vecnonlin->adapt->refine bisections:     2
-vecnonlin->adapt->coarsen bisections:    2
-
-
-vecnonlin->adapt[0]->tolerance:          1.e-8
-vecnonlin->adapt[1]->tolerance:          1.e-8
-
-vecnonlin->output[0]->filename:          vecnonlin
-
-vecnonlin->output[0]->ParaView format:    1
-
-vecnonlin->output[0]->TecPlot format:    0
-vecnonlin->output[0]->TecPlot ext:       .tec
-
-vecnonlin->output[0]->AMDiS format:      0
-vecnonlin->output[0]->AMDiS mesh ext:    .mesh
-vecnonlin->output[0]->AMDiS data ext:    .dat
-
-vecnonlin->output[0]->append index:      0
-vecnonlin->output[0]->index length:      6
-vecnonlin->output[0]->index decimals:    3
-
-vecnonlin->output[1]->filename:          vecnonlin
-
-vecnonlin->output[1]->ParaView format:    1
-
-vecnonlin->output[1]->TecPlot format:    0
-vecnonlin->output[1]->TecPlot ext:       .tec
-
-vecnonlin->output[1]->AMDiS format:      0
-vecnonlin->output[1]->AMDiS mesh ext:    .mesh
-vecnonlin->output[1]->AMDiS data ext:    .dat
-
-vecnonlin->output[1]->append index:      0
-vecnonlin->output[1]->index length:      6
-vecnonlin->output[1]->index decimals:    3
diff --git a/demo/init/vecnonlin.dat.3d b/demo/init/vecnonlin.dat.3d
deleted file mode 100644
index fd602eabfbe3cdcca2bffd0545f7b6e06d51afe7..0000000000000000000000000000000000000000
--- a/demo/init/vecnonlin.dat.3d
+++ /dev/null
@@ -1,82 +0,0 @@
-dimension of world:                      3
-
-vecnonlinMesh->macro file name:          ./macro/macro.stand.3d
-vecnonlinMesh->global refinements:       0
-
-vecnonlin->dim:                          3
-vecnonlin->mesh:                         vecnonlinMesh
-
-vecnonlin->polynomial degree[0]:            2
-vecnonlin->polynomial degree[1]:            2
-
-vecnonlin->components:                   2
-
-vecnonlin->nonlin solver:                newton_fs   %  no, newton, newton_fs
-
-vecnonlin->nonlin solver->tolerance:     1.e-6     % tolerance for Newton
-vecnonlin->nonlin solver->max iteration: 50    % maximal number of iterations of Newton
-vecnonlin->nonlin solver->info:          2     % information level of Newton
-vecnonlin->nonlin solver->restart:       10    % number of iterations for step size control
-vecnonlin->nonlin solver->norm:          1     % 1: H1_NORM, 2: L2_NORM
-
-vecnonlin->solver:                       cg
-vecnonlin->solver->max iteration:        1000
-vecnonlin->solver->tolerance:            1.e-8
-vecnonlin->solver->info:                 1 
-vecnonlin->solver->left precon:          diag
-vecnonlin->solver->right precon:         no
-
-vecnonlin->estimator[0]:                 residual
-vecnonlin->estimator[0]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[0]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[0]->C1:             0.1 % constant of jump residual
-
-vecnonlin->estimator[1]:                 residual
-vecnonlin->estimator[1]->error norm:     1   % 1: H1_NORM, 2: L2_NORM
-vecnonlin->estimator[1]->C0:             0.1 % constant of element residual
-vecnonlin->estimator[1]->C1:             0.1 % constant of jump residual
-
-vecnonlin->marker[0]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[0]->MSGamma:           0.9
-
-vecnonlin->marker[1]->strategy:          2   % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
-vecnonlin->marker[1]->MSGamma:           0.9
-
-vecnonlin->adapt->max iteration:         8
-vecnonlin->adapt->info:                  4
-vecnonlin->adapt->refine bisections:     3
-vecnonlin->adapt->coarsen bisections:    3
-
-
-vecnonlin->adapt[0]->tolerance:          1.e-8
-vecnonlin->adapt[1]->tolerance:          1.e-8
-
-vecnonlin->output[0]->filename:          vecnonlin
-
-vecnonlin->output[0]->ParaView format:    1
-
-vecnonlin->output[0]->TecPlot format:    0
-vecnonlin->output[0]->TecPlot ext:       .tec
-
-vecnonlin->output[0]->AMDiS format:      0
-vecnonlin->output[0]->AMDiS mesh ext:    .mesh
-vecnonlin->output[0]->AMDiS data ext:    .dat
-
-vecnonlin->output[0]->append index:      0
-vecnonlin->output[0]->index length:      6
-vecnonlin->output[0]->index decimals:    3
-
-vecnonlin->output[1]->filename:          vecnonlin
-
-vecnonlin->output[1]->ParaView format:    1
-
-vecnonlin->output[1]->TecPlot format:    0
-vecnonlin->output[1]->TecPlot ext:       .tec
-
-vecnonlin->output[1]->AMDiS format:      0
-vecnonlin->output[1]->AMDiS mesh ext:    .mesh
-vecnonlin->output[1]->AMDiS data ext:    .dat
-
-vecnonlin->output[1]->append index:      0
-vecnonlin->output[1]->index length:      6
-vecnonlin->output[1]->index decimals:    3
diff --git a/demo/macro/mpcci.macro.2d b/demo/macro/mpcci.macro.2d
deleted file mode 100644
index b173512647c84cc339592980233e3c49ccfcb789..0000000000000000000000000000000000000000
--- a/demo/macro/mpcci.macro.2d
+++ /dev/null
@@ -1,56 +0,0 @@
-DIM: 2
-DIM_OF_WORLD: 2
-
-number of elements: 8  
-number of vertices: 9  
-
-element vertices:
-1 3 0
-3 1 4
-2 4 1
-4 2 5
-4 6 3
-6 4 7
-5 7 4
-7 5 8
-
-element boundaries:
-1 1 0
-0 0 0
-0 1 0
-1 0 0
-1 0 0
-0 1 0
-0 0 0
-1 1 0
-
-vertex coordinates:
- 0.0  0.0  
- 0.5  0.0
- 1.0  0.0
- 0.0  0.5  
- 0.5  0.5
- 1.0  0.5
- 0.0  1.0  
- 0.5  1.0
- 1.0  1.0
-
-element neighbours:
- -1 -1  1
-  2  4  0
-  1 -1  3
- -1  6  2
- -1  1  5
-  6 -1  4
-  5  3  7
- -1 -1  6
-
-element region:
-1
-1
-1
-1
-1
-1
-1
-1
\ No newline at end of file
diff --git a/demo/macro/navierstokes.macro.2d b/demo/macro/navierstokes.macro.2d
deleted file mode 100644
index fd8071970f78cb34708e12b694cfbff95d7c8b8a..0000000000000000000000000000000000000000
--- a/demo/macro/navierstokes.macro.2d
+++ /dev/null
@@ -1,30 +0,0 @@
-DIM: 2
-DIM_OF_WORLD: 2
-
-number of elements: 4  
-number of vertices: 5  
-
-element vertices:
-0 1 4 
-1 2 4  
-2 3 4 
-3 0 4 
-
-element boundaries:
-0 0 1 
-0 0 1
-0 0 2 
-0 0 1 
-
-vertex coordinates:
- 0.0 0.0  
- 1.0 0.0
- 1.0 1.0
- 0.0 1.0
- 0.5 0.5
-
-element neighbours:
-1 3 -1 
-2 0 -1 
-3 1 -1 
-0 2 -1
\ No newline at end of file
diff --git a/demo/mpcci.cci b/demo/mpcci.cci
deleted file mode 100644
index 91c38908bc1d012b2d3a5f1e7522206776f63c3d..0000000000000000000000000000000000000000
--- a/demo/mpcci.cci
+++ /dev/null
@@ -1,60 +0,0 @@
-code simulationcode1
-  quant1(id = 1, where = node, dim = scalar, type = field);
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-code simulationcode2
-  quant1(id = 1, where = node, dim = scalar, type = field);
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-quantities
-  simulationcode1.quant1 = simulationcode2.quant1;
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-switches 
-  output_level  = 0;
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-jobs 
-
-  JobName1 = simulationcode1 (
-    pwd    = ".",
-    exec   = "mpcci1",
-    nprocs = 1
-  );
-  
-  JobName2 = simulationcode2 (
-    pwd    = ".",
-    exec   = "mpcci2",
-    nprocs = 1
-  );
-
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-coupling
-
-  syncpt JobName1(1) : send(quant1/1);
-
-  syncpt JobName2(1) : recv(quant1/1);
-
-  match_syncpt JobName1(1) = JobName2(1);
-
-  comm JobName1(123) : send(quant1/1);
-
-  comm JobName2(124) : recv(quant1/1);
-
-  match_comm JobName1(123) = JobName2(124);
-
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
diff --git a/demo/mpccitest.cci b/demo/mpccitest.cci
deleted file mode 100644
index 7f322ef2d8083a392f0799733167f5e73a4cd8d6..0000000000000000000000000000000000000000
--- a/demo/mpccitest.cci
+++ /dev/null
@@ -1,69 +0,0 @@
-code simulationcode1
-  quant1(id = 1, where = node, dim = scalar, type = field);
-  quant2(id = 2, where = node, dim = scalar, type = field);
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-code simulationcode2
-  quant1(id = 1, where = node, dim = scalar, type = field);
-  quant2(id = 2, where = node, dim = scalar, type = field);
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-quantities
-  simulationcode1.quant1 = simulationcode2.quant1;
-  simulationcode1.quant2 = simulationcode2.quant2;
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-switches 
-  output_level  = 3;
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-jobs 
-
-  JobName1 = simulationcode1 (
-    pwd    = ".",
-    exec   = "mpccitest",
-    nprocs = 1
-  );
-  
-  JobName2 = simulationcode2 (
-    pwd    = ".",
-    exec   = "mpccitest",
-    nprocs = 1
-  );
-
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-coupling
-
-  syncpt JobName1(1) : send(quant1/1),
-                       recv(quant2/1);
-
-  syncpt JobName2(1) : send(quant2/1),
-                       recv(quant1/1);
-
-  match_syncpt JobName1(1) 
-             = JobName2(1);
-
-  comm JobName1(123) : send(quant1/1),
-                       recv(quant2/1);
-
-  comm JobName2(124) : send(quant2/1),
-                       recv(quant1/1);
-
-  match_comm JobName1(123) 
-           = JobName2(124);
-
-end
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
diff --git a/demo/src/mpcci1.cc b/demo/src/mpcci1.cc
deleted file mode 100644
index 231e515d903b85ad73d8df3701486e1f4554a306..0000000000000000000000000000000000000000
--- a/demo/src/mpcci1.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-#include "AMDiS.h"
-#include "MpCCIAdapter.h"
-#include "MultiGridSolver.h"
-#include "GSSmoother.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  F(int degree) : AbstractFunction<double, WorldVector<double> >(degree) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dim = x.getSize();
-    double r2 = x * x;
-    double ux = exp(-10.0 * r2);
-    return -(400.0 * r2 - 20.0 * dim) * ux;
-  }
-};
-
-class WaitingProblem : public ProblemScal
-{
-public:
-  WaitingProblem(const char *name) 
-    : ProblemScal(name) 
-  {}
-
-  void solve(AdaptInfo *adaptInfo) {
-    FUNCNAME("WaitingProblem::solve()");
-
-    static MultiGridSolver *mgSolver = NULL;
-
-    if (!mgSolver) 
-      mgSolver = new MultiGridSolver(feSpace_, 
-				     new GSSmoother(1.0),
-				     systemMatrix_,
-				     solution_,
-				     rhs_);
-
-    mgSolver->solve();
-  }
-};
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: mpcci1 initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== create and init the scalar problem ===== 
-  WaitingProblem mpcci1("mpcci1");
-
-  mpcci1.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("mpcci1->adapt", 1);
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("mpcci1->adapt",
-					       &mpcci1,
-					       adaptInfo);
-  
-  //mpcci1.setAdapt(adapt);
-
-  // ===== add boundary conditions =====
-  mpcci1.addDirichletBC(1, new G);
-
-  // ===== create matrix operator =====
-  Operator matrixOperator(Operator::MATRIX_OPERATOR, mpcci1.getFESpace());
-  matrixOperator.addSecondOrderTerm(new Laplace_SOT);
-  mpcci1.addMatrixOperator(&matrixOperator);
-
-  // ===== create rhs operator =====
-  int degree = mpcci1.getFESpace()->getBasisFcts()->getDegree();
-  Operator rhsOperator(Operator::VECTOR_OPERATOR, mpcci1.getFESpace());
-  rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-  mpcci1.addVectorOperator(&rhsOperator);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-}
-
-
diff --git a/demo/src/mpcci2.cc b/demo/src/mpcci2.cc
deleted file mode 100644
index f6197e7f8eeaede780ef6f735480bef35f94ee67..0000000000000000000000000000000000000000
--- a/demo/src/mpcci2.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "AMDiS.h"
-#include "MpCCIAdapter.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===== main program =====
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: mpcci2 initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== create and init the scalar problem ===== 
-  ProblemScal mpcci2("mpcci2");
-
-  mpcci2.initialize(INIT_ALL);
-
-  int convergence = CCI_CONTINUE;
-  int syncPointID = 1;
-  int quantityID = 1;
-
-  DOFVector<double> *vec[1] = { mpcci2.getSolution() };
-
-  MpCCIAdapter mpcciAdapter(124, 1, 1, 
-			    mpcci2.getFESpace(), 1, -1,
-			    1, &quantityID, vec,
-			    1, &syncPointID);
-
-  while (convergence != CCI_STOP) {
-    mpcciAdapter.checkConvergence(CCI_CONTINUE, &convergence);
-    mpcciAdapter.reachSyncPoint(1);
-    mpcciAdapter.getNodes(1);
-    mpcci2.writeFiles(adaptInfo, true);
-  }
-}
-
-
diff --git a/demo/src/mpccitest.cc b/demo/src/mpccitest.cc
deleted file mode 100644
index 895b677cbaddf1bb308d6d4460abf2da46af91ff..0000000000000000000000000000000000000000
--- a/demo/src/mpccitest.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-#include "AMDiS.h"
-#include "MpCCIAdapter.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  F(int degree) : AbstractFunction<double, WorldVector<double> >(degree) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dim = x.getSize();
-    double r2 = (x * x);
-    double ux = exp(-10.0 * r2);
-    return -(400.0 * r2 - 20.0 * dim) * ux;
-  }
-};
-
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 3)("usage: mpccitest initfile codeID\n");
-
-  int codeID = atoi(argv[2]);
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== create and init the scalar problem ===== 
-  ProblemScal mpccitest("mpccitest");
-
-  mpccitest.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("mpccitest->adapt", 1);
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("mpccitest->adapt",
-					       &mpccitest,
-					       adaptInfo);
-  
-  //mpccitest.setAdapt(adapt);
-
-  // ===== add boundary conditions =====
-  mpccitest.addDirichletBC(1, new G);
-
-  // ===== create matrix operator =====
-  Operator matrixOperator(Operator::MATRIX_OPERATOR, mpccitest.getFESpace());
-  matrixOperator.addSecondOrderTerm(new Laplace_SOT);
-  mpccitest.addMatrixOperator(&matrixOperator);
-
-  // ===== create rhs operator =====
-  int degree = mpccitest.getFESpace()->getBasisFcts()->getDegree();
-  Operator rhsOperator(Operator::VECTOR_OPERATOR, mpccitest.getFESpace());
-  rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-  mpccitest.addVectorOperator(&rhsOperator);
-
-  mpccitest.getMesh()->setPreserveCoarseDOFs(true);
-
-  
-  // ===== start adaption loop =====
-  if(codeID == 1)
-    adapt->adapt();
-
-
-  DOFVector<double> vec1(mpccitest.getFESpace(), "vec1");
-  DOFVector<double> vec2(mpccitest.getFESpace(), "vec2");
-
-  int remoteCodeID;
-  int convergence;
-  int syncPointID = 1;
-  int quantityIDs[2] = {1, 2};
-  DOFVector<double> *vectors[2] = {&vec1, &vec2};
-
-  if (codeID == 1) {
-    MpCCIAdapter mpcciAdapter(123, 1, 1, 
-			      mpccitest.getFESpace(), 1, -1,
-			      2, quantityIDs, vectors,
-			      1, &syncPointID);
-    mpcciAdapter.remesh();
-    mpcciAdapter.checkConvergence(CCI_CONTINUE, &convergence);
-
-    remoteCodeID = 2;
-    vec1.set(1.0);
-    vec2.set(0.0);
-    mpcciAdapter.putNodes(codeID);
-    mpcciAdapter.send(1, &codeID);
-    mpcciAdapter.recv(1, &remoteCodeID);
-    mpcciAdapter.getNodes(remoteCodeID);
-
-    vec1.print();
-    vec2.print();
-
-    WAIT;
-
-    vec1.set(1.0);
-    vec2.set(0.0);
-
-    mpcciAdapter.putNodes(codeID);
-    mpcciAdapter.reachSyncPoint(1);
-    mpcciAdapter.getNodes(remoteCodeID);
-
-    vec1.print();
-    vec2.print();
-  } 
-
-  if (codeID == 2) {
-    MpCCIAdapter mpcciAdapter(124, 1, 1, 
-			      mpccitest.getFESpace(), 1, -1, 
-			      2, quantityIDs, vectors,
-			      1, &syncPointID);
-    mpcciAdapter.checkConvergence(CCI_CONTINUE, &convergence);
-
-    remoteCodeID = 1;
-    vec1.set(0.0);
-    vec2.set(2.0);
-    mpcciAdapter.putNodes(codeID);
-    mpcciAdapter.recv(1, &remoteCodeID);
-    mpcciAdapter.send(1, &codeID);
-    mpcciAdapter.getNodes(remoteCodeID);
-
-    vec1.print();
-    vec2.print();
-
-    WAIT;
-
-    vec1.set(0.0);
-    vec2.set(2.0);
-
-    mpcciAdapter.putNodes(codeID);
-    mpcciAdapter.reachSyncPoint(1);
-    mpcciAdapter.getNodes(remoteCodeID);
-
-    vec1.print();
-    vec2.print();
-  }
-
-}
-
-
diff --git a/demo/src/multigrid.cc b/demo/src/multigrid.cc
deleted file mode 100644
index be05e06d8b22a76a5a218c9848ebce6fbb132a4b..0000000000000000000000000000000000000000
--- a/demo/src/multigrid.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "stdlib.h"
-#include "AMDiS.h"
-#include "MultiGridWrapper.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  F(int degree) : AbstractFunction<double, WorldVector<double> >(degree) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dim = x.getSize();
-    double r2 = (x*x);
-    double ux = exp(-10.0*r2);
-    return -(400.0*r2 - 20.0*dim)*ux;
-  }
-};
-
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: multigrid initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== create and init the scalar problem ===== 
-  ProblemScal multigrid("multigrid");
-  multigrid.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("multigrid->adapt");
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("multigrid->adapt",
-					       &multigrid,
-					       adaptInfo);
-  
-  //multigrid.setAdapt(adapt);
-
-  // ===== add boundary conditions =====
-  multigrid.addDirichletBC(1, new G);
-
-  // ===== create matrix operator =====
-  Operator matrixOperator(Operator::MATRIX_OPERATOR, multigrid.getFESpace());
-  matrixOperator.addSecondOrderTerm(new Laplace_SOT);
-  multigrid.addMatrixOperator(&matrixOperator);
-
-  // ===== create rhs operator =====
-  int degree = multigrid.getFESpace()->getBasisFcts()->getDegree();
-  Operator rhsOperator(Operator::VECTOR_OPERATOR, multigrid.getFESpace());
-  rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-  multigrid.addVectorOperator(&rhsOperator);
-
-  adapt->adapt();
-
-  multigrid.writeFiles(adaptInfo, true);
-}
-
-
diff --git a/demo/src/nonlin.cc b/demo/src/nonlin.cc
deleted file mode 100644
index 4e22f24f00e592a3cf0599b1175ba9abff4b7f7f..0000000000000000000000000000000000000000
--- a/demo/src/nonlin.cc
+++ /dev/null
@@ -1,187 +0,0 @@
-#include "AMDiS.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Constructor
-  F(int degree, double sigma_, double k_, int dim_)
-    : AbstractFunction<double, WorldVector<double> >(degree), 
-      sigma(sigma_), 
-      k(k_), 
-      dim(dim_)
-  {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    double r2 = x * x;
-    double ux = exp(-10.0 * r2);
-    double ux4 = ux * ux * ux * ux;
-    return sigma * ux4 - k * (400.0 * r2 - 20.0 * dim) * ux;
-  }
-
-private:
-  double sigma;
-  double k;
-  int dim;
-};
-
-/// Needed for zero order term.
-class CQPFct : public AbstractFunction<double, double>
-{
-public:
-  CQPFct() : AbstractFunction<double, double>(3) {}
-
-  /// Constructor.
-  CQPFct(double sigma_) : sigma(sigma_) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const double& x) const 
-  {
-    return sigma * x * x * x;
-  }
-
-private:
-  double sigma;
-};
-
-
-// ===========================================================================
-// ===== class NonLin ========================================================
-// ===========================================================================
-
-/// Non linear problem.
-class NonLin : public ProblemNonLinScal
-{
-public:
-  /// Constructor.
-  NonLin()
-    : ProblemNonLinScal("nonlin"),
-      sigma(1.0)
-  {}
-
-  /// Returns \ref sigma.
-  double getSigma() 
-  { 
-    return sigma; 
-  }
-
-  /// Sets \ref sigma.
-  void setSigma(double sig) 
-  { 
-    sigma = sig; 
-  }
-
-private:
-  /// Stefan-Bolzmann constant.
-  double sigma;
-};
-
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: nonlin initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-  
-  // ===== needed constants =====
-  double k = 1.0;
-  double factor1 = 4.0;
-  double factor2 = -1.0;
-
-  // ===== create and init non linear problem =====
-  NonLin nonlin;
-  nonlin.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("nonlin->adapt", 1);
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("nonlin->adapt",
-					       &nonlin,
-					       adaptInfo);
-
-
-  nonlin.setSigma(1.0);
-
-  // ===== create operators =====
-  Operator *nonLinOperator0 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR, 
-					   nonlin.getFESpace());
-
-  nonLinOperator0->setUhOld(nonlin.getSolution());
-
-  nonLinOperator0->addZeroOrderTerm
-    (new VecAtQP_ZOT(NULL, new CQPFct(nonlin.getSigma())));
-
-  nonlin.addMatrixOperator(nonLinOperator0, &factor1, &factor1);
-  nonlin.addVectorOperator(nonLinOperator0);
-
-  Operator *nonLinOperator2 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR,
-					   nonlin.getFESpace());
-
-  nonLinOperator2->setUhOld(nonlin.getSolution());
-
-  nonLinOperator2->addSecondOrderTerm(new FactorLaplace_SOT(&k));
-
-  nonlin.addMatrixOperator(nonLinOperator2);
-  nonlin.addVectorOperator(nonLinOperator2);
-
-
-  int degree = nonlin.getFESpace()->getBasisFcts()->getDegree();
-
-  Operator* rhsFunctionOperator = 
-  new Operator(Operator::VECTOR_OPERATOR, nonlin.getFESpace());
-  rhsFunctionOperator->addZeroOrderTerm
-    (new CoordsAtQP_ZOT(new F(degree, 
-			      nonlin.getSigma(), 
-			      k, 
-			      nonlin.getMesh()->getDim())
-			)
-     );
-  
-  nonlin.addVectorOperator(rhsFunctionOperator, &factor2, &factor2);
-
-  // ===== add boundary conditions =====
-  nonlin.addDirichletBC(DIRICHLET, new G);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-
-  // ===== print solution =====
-  nonlin.writeFiles(adaptInfo, true);
-
-  return 0;
-}
-
-
-
-
-
diff --git a/demo/src/nonlin2.cc b/demo/src/nonlin2.cc
deleted file mode 100644
index 9a5902871100b376c6e60b4605adfef44e0f6fc2..0000000000000000000000000000000000000000
--- a/demo/src/nonlin2.cc
+++ /dev/null
@@ -1,219 +0,0 @@
-#include "AMDi.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-class Zero : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  const double& operator()(const WorldVector<double>& x) const 
-  {
-    return 0.0;
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Constructor
-  F(int degree)
-    : AbstractFunction<double, WorldVector<double> >(degree)
-  {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dow = x.getSize();
-    double r2 = x*x;
-    double ux = exp(-10.0*r2);
-    double ux4 = ux*ux*ux*ux;
-    return ux4 -(400.0*r2 - 20.0*dow)*ux;
-  }
-};
-
-/// Needed for zero order term.
-class X3 : public AbstractFunction<double, double>
-{
-public:
-  X3() : AbstractFunction<double, double>(3) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const double& x) const 
-  {
-    return x * x * x;
-  }
-};
-
-// ===========================================================================
-// ===== class NonLin ========================================================
-// ===========================================================================
-
-/// Non linear problem.
-class NonLin : public ProblemScal
-{
-public:
-  NonLin(const char *name)
-    : ProblemScal(name)
-  {
-    newtonTolerance = 1e-8;
-    GET_PARAMETER(0, std::string(name) + "->newton->tolerance", "%f", 
-		  &newtonTolerance);    
-    newtonMaxIter = 50;
-    GET_PARAMETER(0, std::string(name) + "->newton->max iteration", "%d", 
-		  &newtonMaxIter);    
-  }
-
-  void initialize(Flag initFlag,
-		  ProblemScal *adoptProblem = NULL,
-		  Flag adoptFlag = INIT_NOTHING)
-  {
-    ProblemScal::initialize(initFlag, adoptProblem, adoptFlag);
-    correction = new DOFVector<double>(this->getFESpace(), "old solution");
-    correction->set(0.0);
-
-    dirichletZero = new DirichletBC(1, &zero, feSpace_);
-    dirichletG    = new DirichletBC(1, &g, feSpace_);
-
-    systemMatrix_->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-    solution_->getBoundaryManager()->addBoundaryCondition(dirichletG);
-    rhs_->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-    correction->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-  }
-
-  ~NonLin()
-  { 
-    delete correction; 
-    delete dirichletZero;
-    delete dirichletG;
-  }
-
-  void buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag) {}
-
-  void solve(AdaptInfo *adaptInfo) 
-  {
-    FUNCNAME("NonLin::solve()");
-    DOFVector<double> *sol = solution_;
-    solution_ = correction;
-    double res = 0;
-    int newtonIteration = 0;
-    Flag flag;
-
-    // fill boundary conditions
-    sol->getBoundaryManager()->initVector(sol);
-
-    TraverseStack stack;
-    ElInfo *elInfo = stack.traverseFirst(mesh_, -1, 
-					 Mesh::CALL_LEAF_EL | 
-					 Mesh::FILL_COORDS |
-					 Mesh::FILL_BOUND);
-
-    while(elInfo) {
-      sol->getBoundaryManager()->fillBoundaryConditions(elInfo, sol);
-      elInfo = stack.traverseNext(elInfo);
-    }
-
-    sol->getBoundaryManager()->exitVector(sol);
-
-    do {    
-      newtonIteration++;
-      ProblemScal::buildAfterCoarsen(adaptInfo, flag);    
-      ProblemScal::solve(adaptInfo);
-      *sol -= *correction;
-      res = correction->L2Norm();
-      MSG("newton iteration %d: residual %f (tol: %f)\n",
-	  newtonIteration, res, newtonTolerance);
-    } while((res > newtonTolerance) && (newtonIteration < newtonMaxIter));
-    solution_ = sol;
-  }
-
-private:
-  double newtonTolerance;
-  int newtonMaxIter;
-  DOFVector<double> *correction;
-  Zero zero;
-  G g;
-  DirichletBC *dirichletZero;
-  DirichletBC *dirichletG;
-};
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: nonlin initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  NonLin nonlin("nonlin");
-  nonlin.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("nonlin->adapt", 1);
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("nonlin->adapt",
-					       &nonlin,
-					       adaptInfo);
-
-  // ===== create operators =====
-  double four = 4.0;
-  double one = 1.0;
-  double zero = 0.0;
-  double minusOne = -1.0;
-
-  Operator *nonlinOperator0 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR, 
-					   nonlin.getFESpace());
-
-  nonlinOperator0->setUhOld(nonlin.getSolution());
-  nonlinOperator0->addZeroOrderTerm(new VecAtQP_ZOT(nonlin.getSolution(), 
-						    new X3));
-
-  nonlin.addMatrixOperator(nonlinOperator0, &four, &one);
-  nonlin.addVectorOperator(nonlinOperator0, &one, &zero);
-
-  Operator *nonlinOperator2 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR,
-					   nonlin.getFESpace());
-
-  nonlinOperator2->setUhOld(nonlin.getSolution());
-  nonlinOperator2->addSecondOrderTerm(new Laplace_SOT);
-
-  nonlin.addMatrixOperator(nonlinOperator2, &one, &one);
-  nonlin.addVectorOperator(nonlinOperator2, &one, &zero);
-
-  int degree = nonlin.getFESpace()->getBasisFcts()->getDegree();
-
-  Operator* rhsFunctionOperator = new Operator(Operator::VECTOR_OPERATOR, 
-					       nonlin.getFESpace());
-  rhsFunctionOperator->addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-  
-  nonlin.addVectorOperator(rhsFunctionOperator, &minusOne, &one);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-
-  nonlin.writeFiles(adaptInfo, true);
-}
diff --git a/demo/src/nonlin3.cc b/demo/src/nonlin3.cc
deleted file mode 100644
index 7e0e1da76438b68353e8bd231f964445f258e7c0..0000000000000000000000000000000000000000
--- a/demo/src/nonlin3.cc
+++ /dev/null
@@ -1,305 +0,0 @@
-#include "AMDiS.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-class Zero : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return 0.0;
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Constructor
-  F(int degree)
-    : AbstractFunction<double, WorldVector<double> >(degree)
-  {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dow = x.getSize();
-    double r2 = x *x;
-    double ux = exp(-10.0*r2);
-    double ux4 = ux*ux*ux*ux;
-    return ux4 -(400.0*r2 - 20.0*dow)*ux;
-  }
-};
-
-/// Needed for zero order term.
-class X3 : public AbstractFunction<double, double>
-{
-public:
-  X3() : AbstractFunction<double, double>(3) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const double& x) const 
-  {
-    return x * x * x;
-  }
-};
-
-class NewtonStepInterface
-{
-public:
-  virtual void initNewtonStep(AdaptInfo *adaptInfo) = 0;
-  virtual void exitNewtonStep(AdaptInfo *adaptInfo) = 0;
-  virtual void assembleNewtonStep(AdaptInfo *adaptInfo, Flag flag) = 0;
-  virtual void solveNewtonStep(AdaptInfo *adaptInfo) = 0;
-  virtual DOFVector<double> *getCorrection() = 0;
-};
-
-class NewtonMethod : public ProblemIterationInterface
-{
-public:
-  NewtonMethod(const char *name,
-		  ProblemScal *problem,
-		  NewtonStepInterface *step)
-    : problemNonlin(problem),
-      newtonStep(step),
-      newtonTolerance(1e-8),
-      newtonMaxIter(100)
-  {
-    GET_PARAMETER(0, std::string(name) + "->tolerance", "%f", &newtonTolerance);
-    GET_PARAMETER(0, std::string(name) + "->max iteration", "%d", &newtonMaxIter);
-    solution = problemNonlin->getSolution();
-    correction = newtonStep->getCorrection();
-  }
-
-  
-  void beginIteration(AdaptInfo *adaptInfo) 
-  {
-    FUNCNAME("NewtonMethod::beginIteration()");
-    MSG("\n");
-    MSG("begin of iteration number: %d\n", adaptInfo->getSpaceIteration()+1);
-    MSG("=============================\n");
-  }
-
-  Flag oneIteration(AdaptInfo *adaptInfo, Flag toDo = FULL_ITERATION)
-  {
-    Flag flag = 0, markFlag = 0;
-
-    if(toDo.isSet(MARK)) markFlag = problemNonlin->markElements(adaptInfo);
-    if(toDo.isSet(ADAPT) && markFlag.isSet(MESH_REFINED))
-      flag = problemNonlin->refineMesh(adaptInfo);
-    if(toDo.isSet(ADAPT) && markFlag.isSet(MESH_COARSENED))
-      flag |= problemNonlin->coarsenMesh(adaptInfo);
-
-    if(toDo.isSet(SOLVE)) {
-      newtonStep->initNewtonStep(adaptInfo);
-      int newtonIteration = 0;
-      double res = 0.0;
-      do {    
-	newtonIteration++;
-	newtonStep->assembleNewtonStep(adaptInfo, flag);    
-	newtonStep->solveNewtonStep(adaptInfo);
-	res = correction->L2Norm();
-	*solution -= *correction;
-	MSG("newton iteration %d: residual %f (tol: %f)\n",
-	    newtonIteration, res, newtonTolerance);
-      } while((res > newtonTolerance) && (newtonIteration < newtonMaxIter));    
-
-      newtonStep->exitNewtonStep(adaptInfo);
-    }
-
-    if(toDo.isSet(ESTIMATE)) problemNonlin->estimate(adaptInfo);
-    return flag;
-  }
-  
-  void endIteration(AdaptInfo *adaptInfo) 
-  {
-    FUNCNAME("NewtonMethod::endIteration()");
-    MSG("\n");
-    MSG("end of iteration number: %d\n", adaptInfo->getSpaceIteration()+1);
-    MSG("=============================\n");
-  }
-
-
-  int getNumProblems() { return 1; };
-
-  ProblemStatBase *getProblem(int number = 0) 
-  {
-    FUNCNAME("NewtonMethod::getProblem()");
-    if(number == 0) return problemNonlin;
-    ERROR_EXIT("invalid problem number\n");
-    return NULL;
-  }
-
-private:
-  ProblemScal *problemNonlin;
-  NewtonStepInterface *newtonStep;
-  double newtonTolerance;
-  int newtonMaxIter;
-  DOFVector<double> *solution;
-  DOFVector<double> *correction;
-};
-
-class Nonlin : public ProblemScal,
-	       public NewtonStepInterface
-{
-public:
-  Nonlin(const char *name)
-    : ProblemScal(name)
-  {
-//     newtonTolerance = 1e-8;
-//     GET_PARAMETER(0, std::string(name) + "->newton->tolerance", "%f", 
-// 		  &newtonTolerance);    
-//     newtonMaxIter = 50;
-//     GET_PARAMETER(0, std::string(name) + "->newton->max iteration", "%d", 
-// 		  &newtonMaxIter);    
-  }
-
-  void initialize(Flag initFlag,
-		  ProblemScal *adoptProblem = NULL,
-		  Flag adoptFlag = INIT_NOTHING)
-  {
-    ProblemScal::initialize(initFlag, adoptProblem, adoptFlag);
-    correction = new DOFVector<double>(this->getFESpace(), "old solution");
-    correction->set(0.0);
-
-    dirichletZero = new DirichletBC(1, &zero, feSpace_);
-    dirichletG    = new DirichletBC(1, &g, feSpace_);
-
-    systemMatrix_->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-    solution_->getBoundaryManager()->addBoundaryCondition(dirichletG);
-    rhs_->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-    correction->getBoundaryManager()->addBoundaryCondition(dirichletZero);
-  }
-
-  ~Nonlin()
-  { 
-    delete correction; 
-    delete dirichletZero;
-    delete dirichletG;
-  }
-
-  void initNewtonStep(AdaptInfo *adaptInfo) {
-    solution_->getBoundaryManager()->initVector(solution_);
-    TraverseStack stack;
-    ElInfo *elInfo = stack.traverseFirst(mesh_, -1, 
-					 Mesh::CALL_LEAF_EL | 
-					 Mesh::FILL_COORDS |
-					 Mesh::FILL_BOUND);
-    while(elInfo) {
-      solution_->getBoundaryManager()->fillBoundaryConditions(elInfo, solution_);
-      elInfo = stack.traverseNext(elInfo);
-    }
-    solution_->getBoundaryManager()->exitVector(solution_);
-
-    tmp = solution_;
-    solution_ = correction;
-  }
-
-  void exitNewtonStep(AdaptInfo *adaptInfo) {
-    solution_ = tmp;
-  }
-
-  void assembleNewtonStep(AdaptInfo *adaptInfo, Flag flag) {
-    ProblemScal::buildAfterCoarsen(adaptInfo, flag);
-  }
-
-  void solveNewtonStep(AdaptInfo *adaptInfo) {
-    ProblemScal::solve(adaptInfo);
-  }
-
-  DOFVector<double> *getCorrection() { return correction; };
-
-private:
-//   double newtonTolerance;
-//   int newtonMaxIter;
-  DOFVector<double> *correction;
-  DOFVector<double> *tmp;
-  Zero zero;
-  G g;
-  DirichletBC *dirichletZero;
-  DirichletBC *dirichletG;
-};
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: nonlin initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  Nonlin nonlin("nonlin");
-  nonlin.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("nonlin->adapt", 1);
-
-  NewtonMethod newtonMethod("nonlin->newton", &nonlin, &nonlin);
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("nonlin->adapt",
-					       &newtonMethod,
-					       adaptInfo);
-
-  // ===== create operators =====
-  double four = 4.0;
-  double one = 1.0;
-  double zero = 0.0;
-  double minusOne = -1.0;
-
-  Operator *nonlinOperator0 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR, 
-					   nonlin.getFESpace());
-
-  nonlinOperator0->setUhOld(nonlin.getSolution());
-  nonlinOperator0->addZeroOrderTerm(new VecAtQP_ZOT(nonlin.getSolution(), 
-						    new X3));
-
-  nonlin.addMatrixOperator(nonlinOperator0, &four, &one);
-  nonlin.addVectorOperator(nonlinOperator0, &one, &zero);
-
-  Operator *nonlinOperator2 = new Operator(Operator::MATRIX_OPERATOR | 
-					   Operator::VECTOR_OPERATOR,
-					   nonlin.getFESpace());
-
-  nonlinOperator2->setUhOld(nonlin.getSolution());
-  nonlinOperator2->addSecondOrderTerm(new Laplace_SOT);
-
-  nonlin.addMatrixOperator(nonlinOperator2, &one, &one);
-  nonlin.addVectorOperator(nonlinOperator2, &one, &zero);
-
-  int degree = nonlin.getFESpace()->getBasisFcts()->getDegree();
-
-  Operator* rhsFunctionOperator = new Operator(Operator::VECTOR_OPERATOR, 
-					       nonlin.getFESpace());
-  rhsFunctionOperator->addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-  
-  nonlin.addVectorOperator(rhsFunctionOperator, &minusOne, &one);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-
-  nonlin.writeFiles(adaptInfo, true);
-}
diff --git a/demo/src/vecmultigrid.cc b/demo/src/vecmultigrid.cc
deleted file mode 100644
index b57b219b097bd2cc195e95f0ae2196de6d85f4e0..0000000000000000000000000000000000000000
--- a/demo/src/vecmultigrid.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-#include "AMDiS.h"
-#include "GNUPlotWriter.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0 * (x * x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  F(int degree) : AbstractFunction<double, WorldVector<double> >(degree) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    int dim = x.getSize();
-    double r2 = (x*x);
-    double ux = exp(-10.0*r2);
-    return -(400.0*r2 - 20.0*dim)*ux;
-  };
-};
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: vecmultigrid initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== create and init the scalar problem ===== 
-  ProblemVec vecmultigrid("vecmultigrid");
-  vecmultigrid.initialize(INIT_ALL);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("vecmultigrid->adapt",
-				       vecmultigrid.getNumComponents());
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("vecmultigrid->adapt",
-					       &vecmultigrid,
-					       adaptInfo);
-  
-
-  // ===== add boundary conditions =====
-  vecmultigrid.addDirichletBC(1, 0, 0, new G);
-
-  // ===== create operators =====
-  Operator matrixOperator00(Operator::MATRIX_OPERATOR,
-			    vecmultigrid.getFESpace(0),
-			    vecmultigrid.getFESpace(0));
-  matrixOperator00.addSecondOrderTerm(new Laplace_SOT);
-  vecmultigrid.addMatrixOperator(&matrixOperator00, 0, 0);
-
-  Operator rhsOperator0(Operator::VECTOR_OPERATOR,
-			vecmultigrid.getFESpace(0));
-
-  int degree = vecmultigrid.getFESpace(0)->getBasisFcts()->getDegree();
-
-  rhsOperator0.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
-
-  vecmultigrid.addVectorOperator(&rhsOperator0, 0);
-
-  Operator matrixOperator10(Operator::MATRIX_OPERATOR,
-			    vecmultigrid.getFESpace(1),
-			    vecmultigrid.getFESpace(0));
-
-  Operator matrixOperator11(Operator::MATRIX_OPERATOR,
-			    vecmultigrid.getFESpace(1),
-			    vecmultigrid.getFESpace(1));
-
-  matrixOperator10.addZeroOrderTerm(new Simple_ZOT);
-
-  vecmultigrid.addMatrixOperator(&matrixOperator10, 1, 0);
-
-  matrixOperator11.addZeroOrderTerm(new Simple_ZOT(-1.0));
-
-  vecmultigrid.addMatrixOperator(&matrixOperator11, 1, 1);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-
-  vecmultigrid.writeFiles(adaptInfo, true);
-
-  return 0;
-}
-
-
diff --git a/demo/src/vecnonlin.cc b/demo/src/vecnonlin.cc
deleted file mode 100644
index 64d085c89ba9e908c5c25b3e60819a010b31034e..0000000000000000000000000000000000000000
--- a/demo/src/vecnonlin.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-#include "AMDiS.h"
-
-using namespace std;
-using namespace AMDiS;
-
-// ===========================================================================
-// ===== function definitions ================================================
-// ===========================================================================
-
-/// Dirichlet boundary function
-class G : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    return exp(-10.0*(x*x));
-  }
-};
-
-/// RHS function
-class F : public AbstractFunction<double, WorldVector<double> >
-{
-public:
-  /// Constructor
-  F(int degree, double sigma_, double k_, int dim_)
-    : AbstractFunction<double, WorldVector<double> >(degree), 
-      sigma(sigma_), 
-      k(k_), 
-      dim(dim_)
-  {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const WorldVector<double>& x) const 
-  {
-    double r2 = x*x;
-    double ux = exp(-10.0*r2);
-    double ux4 = ux*ux*ux*ux;
-    return sigma*ux4 - k*(400.0*r2 - 20.0*dim)*ux;
-  }
-
-private:
-  double sigma;
-  double k;
-  int dim;
-};
-
-/// Needed for zero order term.
-class CQPFct : public AbstractFunction<double, double>
-{
-public:
-  CQPFct() : AbstractFunction<double, double>(3) {}
-
-  /// Constructor.
-  CQPFct(double sigma_) : sigma(sigma_) {}
-
-  /// Implementation of AbstractFunction::operator().
-  double operator()(const double& x) const 
-  {
-    return sigma * x * x * x;
-  }
-
-private:
-  double sigma;
-};
-
-
-// ===========================================================================
-// ===== class NonLin ========================================================
-// ===========================================================================
-
-/// Non linear problem.
-class NonLinVec : public ProblemNonLinVec
-{
-public:
-  /// Constructor.
-  NonLinVec(const std::string& name_)
-    : ProblemNonLinVec(name_),
-      sigma(1.0)
-  {}
-
-  /// Returns \ref sigma.
-  double getSigma() 
-  { 
-    return sigma; 
-  }
-
-  /// Sets \ref sigma.
-  void setSigma(double sig) 
-  { 
-    sigma = sig; 
-  }
-
-private:
-  /// Stefan-Bolzmann constant.
-  double sigma;
-};
-
-// ===========================================================================
-// ===== main program ========================================================
-// ===========================================================================
-
-int main(int argc, char* argv[])
-{
-  FUNCNAME("main");
-
-  // ===== check for init file =====
-  TEST_EXIT(argc == 2)("usage: nonlin initfile\n");
-
-  // ===== init parameters =====
-  Parameters::init(false, argv[1]);
-
-  // ===== needed constants =====
-  double k = 1.0;
-  double factor1 = 4.0;
-  double factor2 = -1.0;
-
-  // ===== create and init non linear problem =====
-  NonLinVec vecnonlin("vecnonlin");
-  vecnonlin.initialize(INIT_ALL);
-  vecnonlin.setSigma(1.0);
-
-  // === create adapt info ===
-  AdaptInfo *adaptInfo = new AdaptInfo("vecnonlin->adapt", 
-				       vecnonlin.getNumComponents());
-
-  // === create adapt ===
-  AdaptStationary *adapt = new AdaptStationary("vecnonlin->adapt",
-					       &vecnonlin,
-					       adaptInfo);
-
-  // ===== create operators =====
-  Operator *nonLinOperator0_0 = new Operator(Operator::MATRIX_OPERATOR | 
-					     Operator::VECTOR_OPERATOR, 
-					     vecnonlin.getFESpace(0),
-					     vecnonlin.getFESpace(0));
-  Operator *nonLinOperator0_1 = new Operator(Operator::MATRIX_OPERATOR | 
-					     Operator::VECTOR_OPERATOR, 
-					     vecnonlin.getFESpace(1),
-					     vecnonlin.getFESpace(1));
-
-  nonLinOperator0_0->setUhOld(vecnonlin.getSolution()->getDOFVector(0));
-  nonLinOperator0_1->setUhOld(vecnonlin.getSolution()->getDOFVector(1));
-
-  nonLinOperator0_0->addZeroOrderTerm
-    (new VecAtQP_ZOT(
-		     NULL,  // use uhOld
-		     new CQPFct(vecnonlin.getSigma())
-		     )
-     );
-
-  nonLinOperator0_1->addZeroOrderTerm
-    (new VecAtQP_ZOT(
-		     NULL,  // use uhOld
-		     new CQPFct(vecnonlin.getSigma())
-		    )
-     );
-
-  vecnonlin.addMatrixOperator(nonLinOperator0_0, 0, 0, &factor1, &factor1);
-  vecnonlin.addMatrixOperator(nonLinOperator0_1, 1, 1, &factor1, &factor1);
-  vecnonlin.addVectorOperator(nonLinOperator0_0, 0);
-  vecnonlin.addVectorOperator(nonLinOperator0_1, 1);
-
-  Operator *nonLinOperator2_0 = new Operator(Operator::MATRIX_OPERATOR | 
-					     Operator::VECTOR_OPERATOR,
-					     vecnonlin.getFESpace(0),
-					     vecnonlin.getFESpace(0));
-  Operator *nonLinOperator2_1 = new Operator(Operator::MATRIX_OPERATOR | 
-					     Operator::VECTOR_OPERATOR,
-					     vecnonlin.getFESpace(1),
-					     vecnonlin.getFESpace(1));
-
-  nonLinOperator2_0->setUhOld(vecnonlin.getSolution()->getDOFVector(0));
-  nonLinOperator2_1->setUhOld(vecnonlin.getSolution()->getDOFVector(1));
-
-  nonLinOperator2_0->addSecondOrderTerm(new FactorLaplace_SOT(&k));
-  nonLinOperator2_1->addSecondOrderTerm(new FactorLaplace_SOT(&k));
-
-  vecnonlin.addMatrixOperator(nonLinOperator2_0, 0, 0);
-  vecnonlin.addMatrixOperator(nonLinOperator2_1, 1, 1);
-  vecnonlin.addVectorOperator(nonLinOperator2_0, 0);
-  vecnonlin.addVectorOperator(nonLinOperator2_1, 1);
-
-
-  int dim = vecnonlin.getMesh(0)->getDim();
-  int degree;
-  degree = vecnonlin.getFESpace(0)->getBasisFcts()->getDegree();
-
-  Operator* rhsFunctionOperator_0 = 
-  new Operator(Operator::VECTOR_OPERATOR, vecnonlin.getFESpace(0));
-  rhsFunctionOperator_0->addZeroOrderTerm
-    (new CoordsAtQP_ZOT(new F(degree, vecnonlin.getSigma(), k, dim)));
-  
-  degree = vecnonlin.getFESpace(1)->getBasisFcts()->getDegree();
-
-  Operator* rhsFunctionOperator_1 = 
-  new Operator(Operator::VECTOR_OPERATOR, vecnonlin.getFESpace(1));
-  rhsFunctionOperator_1->addZeroOrderTerm
-    (new CoordsAtQP_ZOT(new F(degree, vecnonlin.getSigma(), k, dim)));
-  
-  vecnonlin.addVectorOperator(rhsFunctionOperator_0, 0, &factor2, &factor2);
-  vecnonlin.addVectorOperator(rhsFunctionOperator_1, 1, &factor2, &factor2);
-
-  // ===== add boundary conditions =====
-  vecnonlin.addDirichletBC(DIRICHLET, 0, 0, new G);
-  vecnonlin.addDirichletBC(DIRICHLET, 1, 1, new G);
-
-  // ===== start adaption loop =====
-  adapt->adapt();
-
-  // ===== print solution =====
-  vecnonlin.getSolution()->getDOFVector(0)->print();
-  vecnonlin.getSolution()->getDOFVector(1)->print();
-
-  return 0;
-}
-
-
-
-
-