Commit c8cd584a authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

speicherfehler in robinbc, ausgabe bei zu kleinem element in 1d, compiler...

speicherfehler in robinbc, ausgabe bei zu kleinem element in 1d, compiler fehler in rosenbrock und itl_oemsolver.hh
parent 9a7aa655
project(demotest)
ENABLE_TESTING()
include_directories(${AMDiS_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src)
add_library(comparer src/Comparer.cpp)
file(GLOB PROJECTFILES ${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src/*Project.cpp)
foreach(projectfile ${PROJECTFILES})
#create creatorname
get_filename_component(CppName ${projectfile} NAME_WE)
string(REPLACE "Project" "" creatorsuffix ${CppName})
set(PROJECTINCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src/${CppName}.h")
set(CURRENTPROJECTTYPE "${creatorsuffix}demo")
string(TOLOWER "${creatorsuffix}" creatorsuffix_lower)
set(BASENAME "${creatorsuffix_lower}")
configure_file(src/tester_base.cpp src/tester${creatorsuffix}.cpp @ONLY)
add_executable(tester${creatorsuffix} src/tester${creatorsuffix}.cpp)
target_link_libraries(tester${creatorsuffix} ${AMDiS_LIBS} demoimpl comparer)
file(GLOB initfiles RELATIVE ${CMAKE_CURRENT_BINARY_DIR} init/${creatorsuffix_lower}*.dat*)
foreach(initfile ${initfiles})
get_filename_component(initfile_ext ${initfile} EXT)
string(REPLACE ".dat." "" initfile_ext "${initfile_ext}")
set(curoutputdatafile "../testdata/${creatorsuffix_lower}_${initfile_ext}.arh")
add_test(${creatorsuffix}_${initfile_ext}_Test tester${creatorsuffix} ${initfile} ${curoutputdatafile})
endforeach(initfile)
endforeach(projectfile)
../testdata/init
\ No newline at end of file
../testdata/macro
\ No newline at end of file
#include "Project.h"
#include "io/ArhReader.h"
#include "MeshStructure.h"
#include "Global.h"
bool operator==(DOFVector< double >& l, DOFVector< double >& r)
{
if(l.getUsedSize() != r.getUsedSize())
return false;
DOFIterator< double > lit(&l, USED_DOFS);
DOFIterator< double > rit(&r, USED_DOFS);
lit.reset();
rit.reset();
while(!lit.end()) {
if(abs(*lit - *rit)>1e-12)
return false;
++lit;
++rit;
}
return true;
}
bool compare(SolutionInformation& info, std::string filename)
{
if(info.sysVec != NULL) {
assert(false);
}else if(info.dofVec != NULL) {
DOFVector< double > filevec(info.dofVec->getFeSpace(), "fileVec");
Mesh* solMesh=info.dofVec->getFeSpace()->getMesh();
std::cout<<"initing swap mesh with name "<<solMesh->getName()<<"\n";
std::cout<<"swap dimension: "<<solMesh->getDim()<<"\n";
Mesh fileMesh(solMesh->getName(),solMesh->getDim());
fileMesh.initialize();
std::cout<<"reading mesh from file "<<filename<<"\n";
ArhReader::read(filename, &fileMesh, &filevec);
DOFVector< double > nsolvec(*(info.dofVec));
MeshStructure nsolvestructure;
nsolvestructure.init(solMesh);
MeshStructure filestructure;
filestructure.init(&fileMesh);
return nsolvec == filevec && nsolvestructure.compare(filestructure);
}else
assert(false);
return false;
}
#include "Parameters.h"
#include "Project.h"
#include "@PROJECTINCLUDE@"
bool compare(SolutionInformation& info, std::string filename);
typedef @CURRENTPROJECTTYPE@ ProjectType;
std::string basename="@BASENAME@";
int main(int argc, char** argv) {
if(argc < 2) {
std::cout<<" need initfile "<<basename<<"*\n";
return 1;
}
if(argc < 3) {
std::cout<<" also need a destination file "<<basename<<"*\n";
return 2;
}
std::string initfile(argv[1]);
std::string destinationfile(argv[2]);
AMDiS::Parameters::init(false, initfile);
ProjectType project;
ProjectInfo info(&project, initfile, destinationfile);
info.create();
SolutionInformation solinfo;
info.solve(solinfo);
if(compare(solinfo, info.getFilename()))
return 0;
return 1;
}
dimension of world: 1
periodicMesh->macro file name: ./macro/periodic.macro.1d
periodicMesh->global refinements: 0
periodicMesh->periodic file: ./init/periodic.per.1d
periodicMesh->preserve coarse dofs: 0
periodic->mesh: periodicMesh
periodic->dim: 1
periodic->polynomial degree: 1
periodic->solver: cg
periodic->solver->max iteration: 1000
periodic->solver->tolerance: 1.e-8
periodic->solver->info: 2
periodic->solver->left precon: diag
periodic->solver->right precon: no
periodic->estimator: residual
periodic->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
periodic->estimator->C0: 0.1 % constant of element residual
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->MSGamma: 0.5
periodic->adapt->tolerance: 1e-6
periodic->adapt->max iteration: 14
periodic->adapt->refine bisections: 2
periodic->adapt->coarsen allowed: 0
periodic->output->filename: periodic
periodic->output->ParaView format: 1
periodic->output->TecPlot format: 0
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: 1
dimension of world: 2
ballMesh->macro file name: ./macro/macro.ball.2d
ballMesh->global refinements: 13
ball->mesh: ballMesh
ball->dim: 2
ball->polynomial degree: 1
ball->solver: cg
ball->solver->max iteration: 1000
ball->solver->tolerance: 1.e-8
ball->solver->info: 2
ball->solver->left precon: diag
ball->solver->right precon: no
ball->estimator: residual % residual, recovery
ball->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ball->estimator->C1: 0.1 % constant of jump residual
ball->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ball->marker->MSGamma: 0.5
ball->adapt->tolerance: 1e-8
ball->adapt->max iteration: 4
ball->adapt->info: 8
ball->output->filename: ball2d
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->index length: 6
ball->output->index decimals: 3
WAIT: 1
dimension of world: 3
ballMesh->macro file name: ./macro/macro.ball.3d
ballMesh->global refinements: 13
ball->mesh: ballMesh
ball->dim: 3
ball->polynomial degree: 1
ball->solver: cg
ball->solver->max iteration: 1000
ball->solver->tolerance: 1.e-8
ball->solver->left precon: diag
ball->estimator: 0
ball->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ball->output->filename: ball3d
ball->output->ParaView format: 1
ball->output->AMDiS format: 0
ball->output->AMDiS mesh ext: .mesh
ball->output->AMDiS data ext: .dat
dimension of world: 3
bunnyMesh->macro file name: ./macro/bunny_fixed.macro
bunnyMesh->check: 0
bunnyMesh->global refinements: 0
bunny->mesh: bunnyMesh
bunny->dim: 2
bunny->polynomial degree: 1
bunny->solver: cg
bunny->solver->max iteration: 100
bunny->solver->tolerance: 1.e-8
bunny->solver->info: 5
bunny->solver->left precon: diag
bunny->solver->right precon: no
bunny->estimator: residual % residual, recovery
bunny->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
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->MSGamma: 0.5
bunny->adapt->tolerance: 1e-8
bunny->adapt->refine bisections: 1
bunny->adapt->max iteration: 0
bunny->adapt->info: 8
bunny->output->filename: bunny_fixed
bunny->output->ParaView format: 1
bunny->output->TecPlot format: 0
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
dimension of world: 2
couple->adapt->tolerance: 1e-8
couple->adapt->max iteration: 10
couple->adapt->refine bisections: 2
coupleMesh->macro file name: ./macro/macro.stand.2d
coupleMesh->global refinements: 0
problem1->mesh: coupleMesh
problem1->dim: 2
problem1->polynomial degree: 1
problem1->solver: cg
problem1->solver->max iteration: 1000
problem1->solver->tolerance: 1.e-8
problem1->solver->left precon: diag
problem1->estimator: residual
problem1->estimator->C0: 0.1 % constant of element residual
problem1->estimator->C1: 0.1 % constant of jump residual
problem1->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
problem1->marker->MSGamma: 0.5
problem1->output->filename: output/problem1
problem1->output->ParaView format: 1
problem1->output->AMDiS format: 0
problem1->output->AMDiS mesh ext: .mesh
problem1->output->AMDiS data ext: .dat
problem2->dim: 2
problem2->polynomial degree: 1
problem2->solver: cg
problem2->solver->max iteration: 1000
problem2->solver->tolerance: 1.e-8
problem2->solver->left precon: diag
problem2->estimator: 0
problem2->marker->strategy: 0
problem2->output->filename: output/problem2
problem2->output->ParaView format: 1
problem2->output->AMDiS format: 0
problem2->output->AMDiS mesh ext: .mesh
problem2->output->AMDiS data ext: .dat
dimension of world: 1
elliptMesh->macro file name: ./macro/macro.stand.1d
elliptMesh->global refinements: 3
ellipt->mesh: elliptMesh
ellipt->dim: 1
ellipt->polynomial degree: 1
ellipt->solver: cg
ellipt->solver->max iteration: 1000
ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 2
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->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->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
dimension of world: 2
elliptMesh->macro file name: ./macro/macro.stand.2d
elliptMesh->global refinements: 0
ellipt->mesh: elliptMesh
ellipt->dim: 2
ellipt->polynomial degree: 1
ellipt->solver: cg
ellipt->solver->max iteration: 1000
ellipt->solver->tolerance: 1.e-8
ellipt->solver->info: 2
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->C0: 0.1 % constant of element residual
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->refine bisections: 2
ellipt->output->filename: 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment