Commit a4c463df by Thomas Witkowski

### And some more work on demos and tutorial.

parent 4b9e369e
 ... @@ -28,12 +28,9 @@ ... @@ -28,12 +28,9 @@ namespace AMDiS { namespace AMDiS { /// Contains boundary constants /// Flag to denote interior boundaryies. typedef enum { typedef enum { INTERIOR = 0, /**< interior => no boundary (b = 0) */ INTERIOR = 0 DIRICHLET = 1, /**< dirichlet boundary (b > 0) */ NEUMANN = -1, /**< neumann boundary (-100 < b < 0) */ ROBIN = -100 /**< robin boundary (b <= -100) */ } BoundaryConstants; } BoundaryConstants; /// Type specifier for the different boundary types /// Type specifier for the different boundary types ... ...
 ... @@ -491,12 +491,16 @@ namespace AMDiS { ... @@ -491,12 +491,16 @@ namespace AMDiS { void MacroInfo::dirichletBoundary() void MacroInfo::dirichletBoundary() { { // === Traverse all elements and set either interior boundaries, if the === // === element has a neighbour on this bound. Otherwise set some arbitrary === // === Dirichlet boundary conditions. === for (int i = 0; i < static_cast(mel.size()); i++) for (int i = 0; i < static_cast(mel.size()); i++) for (int k = 0; k < mesh->getGeo(NEIGH); k++) for (int k = 0; k < mesh->getGeo(NEIGH); k++) if (mel[i]->neighbour[k]) if (mel[i]->neighbour[k]) mel[i]->boundary[k] = INTERIOR; mel[i]->boundary[k] = INTERIOR; else else mel[i]->boundary[k] = DIRICHLET; mel[i]->boundary[k] = 1; } } ... @@ -521,13 +525,17 @@ namespace AMDiS { ... @@ -521,13 +525,17 @@ namespace AMDiS { ++melIt, i++) { ++melIt, i++) { for (int j = 0; j < mesh->getGeo(NEIGH); j++) { for (int j = 0; j < mesh->getGeo(NEIGH); j++) { if ((*melIt)->getBoundary(j) != INTERIOR) { if ((*melIt)->getBoundary(j) != INTERIOR) { if ((*melIt)->getBoundary(j) >= DIRICHLET) { if ((*melIt)->getBoundary(j) > 0) { // Here we have some Dirichlet boundary conditions. int j1 = mel_vertex[i][(j + 1) % 3]; int j1 = mel_vertex[i][(j + 1) % 3]; int j2 = mel_vertex[i][(j + 2) % 3]; int j2 = mel_vertex[i][(j + 2) % 3]; bound[j1] = std::max(bound[j1], (*melIt)->getBoundary(j)); bound[j1] = std::max(bound[j1], (*melIt)->getBoundary(j)); bound[j2] = std::max(bound[j2], (*melIt)->getBoundary(j)); bound[j2] = std::max(bound[j2], (*melIt)->getBoundary(j)); } else if ((*melIt)->getBoundary(j) <= NEUMANN) { } else { // Otherwise we have some Neumann boundary conditions. int j1 = mel_vertex[i][(j + 1) % 3]; int j1 = mel_vertex[i][(j + 1) % 3]; int j2 = mel_vertex[i][(j + 2) % 3]; int j2 = mel_vertex[i][(j + 2) % 3]; ... ...
 ... @@ -26,16 +26,7 @@ ball->adapt->max iteration: 4 ... @@ -26,16 +26,7 @@ ball->adapt->max iteration: 4 ball->adapt->info: 8 ball->adapt->info: 8 ball->output->filename: ball ball->output->filename: ball ball->output->ParaView format: 1 ball->output->ParaView format: 1 ball->output->TecPlot format: 0 ball->output->TecPlot ext: .tec ball->output->AMDiS format: 0 ball->output->AMDiS mesh ext: .mesh ball->output->AMDiS data ext: .dat ball->output->append index: 0 ball->output->append index: 0 ball->output->index length: 6 ball->output->index length: 6 ball->output->index decimals: 3 ball->output->index decimals: 3 ... ...
 ... @@ -16,10 +16,6 @@ ball->estimator: 0 ... @@ -16,10 +16,6 @@ ball->estimator: 0 ball->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS ball->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS ball->output->filename: output/ball ball->output->filename: output/ball ball->output->ParaView format: 1 ball->output->ParaView format: 1 ball->output->AMDiS format: 0 ball->output->AMDiS mesh ext: .mesh ball->output->AMDiS data ext: .dat
 ... @@ -20,27 +20,18 @@ bunny->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM ... @@ -20,27 +20,18 @@ bunny->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM bunny->estimator->C1: 0.1 % constant of jump residual bunny->estimator->C1: 0.1 % constant of jump residual bunny->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS bunny->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS bunny->marker->MSGamma: 0.5 bunny->marker->MSGamma: 0.5 bunny->adapt->tolerance: 1e-8 bunny->adapt->tolerance: 1e-8 bunny->adapt->refine bisections: 1 bunny->adapt->refine bisections: 1 bunny->adapt->max iteration: 0 bunny->adapt->max iteration: 0 bunny->adapt->info: 8 bunny->adapt->info: 8 bunny->output->filename: bunny_fixed bunny->output->filename: bunny_fixed bunny->output->ParaView format: 1 bunny->output->ParaView format: 1 bunny->output->append index: 0 bunny->output->index length: 6 bunny->output->TecPlot format: 0 bunny->output->index decimals: 3 bunny->output->TecPlot ext: .tec bunny->output->AMDiS format: 0 bunny->output->AMDiS mesh ext: .mesh bunny->output->AMDiS data ext: .dat bunny->output->append index: 0 bunny->output->index length: 6 bunny->output->index decimals: 3 WAIT: 1 WAIT: 1
 ... @@ -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->dim: 1 heat->space->mesh: heatMesh heat->space->mesh: heatMesh heat->space->solver: cg heat->space->solver: cg ... ...
 ... @@ -24,10 +24,5 @@ neumann->adapt->tolerance: 1e-2 ... @@ -24,10 +24,5 @@ neumann->adapt->tolerance: 1e-2 neumann->adapt->max iteration: 100 neumann->adapt->max iteration: 100 neumann->adapt->refine bisections: 2 neumann->adapt->refine bisections: 2 neumann->output->filename: output/neumann neumann->output->filename: output/neumann neumann->output->ParaView format: 1 neumann->output->ParaView format: 1 neumann->output->AMDiS format: 0 neumann->output->AMDiS mesh ext: .mesh neumann->output->AMDiS data ext: .dat
 ... @@ -19,7 +19,7 @@ parametric->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM ... @@ -19,7 +19,7 @@ parametric->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM parametric->estimator->C1: 0.1 % constant of jump residual parametric->estimator->C1: 0.1 % constant of jump residual parametric->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS parametric->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS parametric->marker->MSGamma: 0.5 parametric->marker->MSGamma: 0.5 parametric->adapt->tolerance: 1e-8 parametric->adapt->tolerance: 1e-8 parametric->adapt->refine bisections: 1 parametric->adapt->refine bisections: 1 ... @@ -27,19 +27,10 @@ parametric->adapt->max iteration: 8 ... @@ -27,19 +27,10 @@ parametric->adapt->max iteration: 8 parametric->adapt->info: 8 parametric->adapt->info: 8 parametric->output->filename: parametric parametric->output->filename: parametric parametric->output->ParaView format: 1 parametric->output->ParaView format: 1 parametric->output->append index: 0 parametric->output->TecPlot format: 0 parametric->output->index length: 6 parametric->output->TecPlot ext: .tec parametric->output->index decimals: 3 parametric->output->AMDiS format: 0 parametric->output->AMDiS mesh ext: .mesh parametric->output->AMDiS data ext: .dat parametric->output->append index: 0 parametric->output->index length: 6 parametric->output->index decimals: 3 WAIT: 1 WAIT: 1
 dimension of world: 1 dimension of world: 1 periodicMesh->macro file name: ./macro/periodic.macro.1d periodicMesh->macro file name: ./macro/periodic.macro.1d periodicMesh->global refinements: 0 periodicMesh->periodic file: ./init/periodic.per.1d periodicMesh->periodic file: ./init/periodic.per.1d periodicMesh->global refinements: 0 periodicMesh->preserve coarse dofs: 0 periodic->mesh: periodicMesh periodic->mesh: periodicMesh periodic->dim: 1 periodic->dim: 1 ... @@ -26,24 +23,15 @@ periodic->estimator->C1: 0.0 % constant of jump residual ... @@ -26,24 +23,15 @@ periodic->estimator->C1: 0.0 % constant of jump residual periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->MSGamma: 0.5 periodic->marker->MSGamma: 0.5 periodic->adapt->tolerance: 1e-6 periodic->adapt->tolerance: 1e-6 periodic->adapt->max iteration: 14 periodic->adapt->max iteration: 14 periodic->adapt->refine bisections: 2 periodic->adapt->refine bisections: 2 periodic->adapt->coarsen allowed: 0 periodic->adapt->coarsen allowed: 0 periodic->output->filename: periodic periodic->output->filename: periodic periodic->output->ParaView format: 1 periodic->output->ParaView format: 1 periodic->output->append index: 0 periodic->output->TecPlot format: 0 periodic->output->index length: 6 periodic->output->TecPlot ext: .tec periodic->output->index decimals: 3 periodic->output->AMDiS format: 0 periodic->output->AMDiS mesh ext: .mesh periodic->output->AMDiS data ext: .dat periodic->output->append index: 0 periodic->output->index length: 6 periodic->output->index decimals: 3 WAIT: 1 WAIT: 1
 dimension of world: 2 dimension of world: 2 periodicMesh->macro file name: ./macro/periodic.macro.2d periodicMesh->macro file name: ./macro/periodic.macro.2d periodicMesh->global refinements: 0 periodicMesh->periodic file: ./init/periodic.per.2d periodicMesh->global refinements: 0 periodicMesh->periodic file: ./init/periodic.per.2d periodicMesh->preserve coarse dofs: 0 periodic->mesh: periodicMesh periodic->mesh: periodicMesh periodic->dim: 2 periodic->dim: 2 ... @@ -26,24 +23,14 @@ periodic->estimator->C1: 0.0 % constant of jump residual ... @@ -26,24 +23,14 @@ periodic->estimator->C1: 0.0 % constant of jump residual periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->MSGamma: 0.5 periodic->marker->MSGamma: 0.5 periodic->adapt->tolerance: 1e-2 periodic->adapt->tolerance: 1e-2 periodic->adapt->max iteration: 100 periodic->adapt->max iteration: 100 periodic->adapt->refine bisections: 2 periodic->adapt->refine bisections: 2 periodic->adapt->coarsen allowed: 0 periodic->adapt->coarsen allowed: 0 periodic->output->filename: output/periodic periodic->output->filename: output/periodic periodic->output->ParaView format: 1 periodic->output->ParaView format: 1 periodic->output->index length: 6 periodic->output->TecPlot format: 0 periodic->output->index decimals: 3 periodic->output->TecPlot ext: .tec periodic->output->AMDiS format: 0 periodic->output->AMDiS mesh ext: .mesh periodic->output->AMDiS data ext: .dat periodic->output->append index: 0 periodic->output->index length: 6 periodic->output->index decimals: 3 WAIT: 0 WAIT: 0
 dimension of world: 3 dimension of world: 3 periodicMesh->macro file name: ./macro/periodic.macro.3d periodicMesh->macro file name: ./macro/periodic.macro.3d periodicMesh->global refinements: 0 periodicMesh->periodic file: ./init/periodic.per.3d periodicMesh->global refinements: 0 periodicMesh->periodic file: ./init/periodic.per.3d periodicMesh->preserve coarse dofs: 0 periodic->mesh: periodicMesh periodic->mesh: periodicMesh periodic->dim: 3 periodic->dim: 3 ... @@ -26,24 +23,15 @@ periodic->estimator->C1: 0.0 % constant of jump residual ... @@ -26,24 +23,15 @@ periodic->estimator->C1: 0.0 % constant of jump residual periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS periodic->marker->MSGamma: 0.5 periodic->marker->MSGamma: 0.5 periodic->adapt->tolerance: 1e-6 periodic->adapt->tolerance: 1e-6 periodic->adapt->max iteration: 100 periodic->adapt->max iteration: 100 periodic->adapt->refine bisections: 3 periodic->adapt->refine bisections: 3 periodic->adapt->coarsen allowed: 0 periodic->adapt->coarsen allowed: 0 periodic->output->filename: periodic periodic->output->filename: periodic periodic->output->ParaView format: 1 periodic->output->ParaView format: 1 periodic->output->append index: 0 periodic->output->TecPlot format: 0 periodic->output->index length: 6 periodic->output->TecPlot ext: .tec periodic->output->index decimals: 3 periodic->output->AMDiS format: 0 periodic->output->AMDiS mesh ext: .mesh periodic->output->AMDiS data ext: .dat periodic->output->append index: 0 periodic->output->index length: 6 periodic->output->index decimals: 3 WAIT: 1 WAIT: 1
 ... @@ -15,10 +15,7 @@ sphere->solver->left precon: diag ... @@ -15,10 +15,7 @@ sphere->solver->left precon: diag sphere->estimator: 0 sphere->estimator: 0 sphere->marker->strategy: 0 sphere->marker->strategy: 0 sphere->output->filename: output/sphere sphere->output->filename: output/sphere sphere->output->ParaView format: 1 sphere->output->ParaView format: 1 sphere->output->AMDiS format: 0 sphere->output->AMDiS mesh ext: .mesh sphere->output->AMDiS data ext: .dat
 ... @@ -14,9 +14,6 @@ torus->solver->left precon: diag ... @@ -14,9 +14,6 @@ torus->solver->left precon: diag torus->estimator: 0 torus->estimator: 0 torus->marker->strategy: 0 torus->marker->strategy: 0 torus->output->filename: output/torus torus->output->filename: output/torus torus->output->ParaView format: 1 torus->output->ParaView format: 1 torus->output->AMDiS format: 0 torus->output->AMDiS mesh ext: .mesh torus->output->AMDiS data ext: .dat