Commit 6c978c46 authored by Thomas Witkowski's avatar Thomas Witkowski

* ParallelProblemVec debugger

parent 5080eda8
......@@ -30,10 +30,10 @@
# the same distribution terms that you use for the rest of that program.
# A sed program that does not truncate output.
SED="/usr/bin/sed"
SED="/bin/sed"
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="/usr/bin/sed -e 1s/^X//"
Xsed="/bin/sed -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
......@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host p2s103:
# Libtool was configured on host NWRW15:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -66,12 +66,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=i686-redhat-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=i686-redhat-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -82,25 +82,25 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
# A language-specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
CC="gcc"
# Is the compiler the GNU C compiler?
with_gcc=yes
gcc_dir=`gcc -print-file-name=. | /usr/bin/sed 's,/\.$,,'`
gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
gcc_ver=`gcc -dumpversion`
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -174,7 +174,7 @@ dlopen_self=unknown
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
link_static_flag=""
link_static_flag="-static"
# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"
......@@ -328,10 +328,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown
# Compile-time system search path for libraries
sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
sys_lib_search_path_spec=`echo " /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......@@ -7266,7 +7266,7 @@ disable_libs=static
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host p2s103:
# Libtool was configured on host NWRW15:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -7288,12 +7288,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=i686-redhat-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=i686-redhat-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -7304,25 +7304,25 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
# A language-specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpiCC"
CC="g++"
# Is the compiler the GNU C compiler?
with_gcc=yes
gcc_dir=`gcc -print-file-name=. | /usr/bin/sed 's,/\.$,,'`
gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
gcc_ver=`gcc -dumpversion`
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -7396,7 +7396,7 @@ dlopen_self=unknown
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
link_static_flag=""
link_static_flag="-static"
# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"
......@@ -7451,11 +7451,11 @@ striplib="strip --strip-unneeded"
# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=`echo "/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
predep_objects=`echo "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=`echo "/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
postdep_objects=`echo "/usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Dependencies to place before the objects being linked to create a
# shared library.
......@@ -7463,11 +7463,11 @@ predeps=""
# Dependencies to place after the objects being linked to create a
# shared library.
postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=`echo "-L/usr/lib64 -L/licsoft/libraries/openmpi/1.2.6/64bit/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.." | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
compiler_lib_search_path=`echo "-L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.." | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method="pass_all"
......@@ -7547,10 +7547,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown
# Compile-time system search path for libraries
sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
sys_lib_search_path_spec=`echo " /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......@@ -7574,7 +7574,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host p2s103:
# Libtool was configured on host NWRW15:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -7596,12 +7596,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=i686-redhat-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=i686-redhat-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -7612,7 +7612,7 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
......@@ -7621,16 +7621,16 @@ LTCFLAGS="-g -O2"
CC="g77"
# Is the compiler the GNU C compiler?
with_gcc=
with_gcc=yes
gcc_dir=`gcc -print-file-name=. | /usr/bin/sed 's,/\.$,,'`
gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
gcc_ver=`gcc -dumpversion`
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -7858,10 +7858,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown
# Compile-time system search path for libraries
sys_lib_search_path_spec=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
sys_lib_search_path_spec=`echo " /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ /lib/i386-redhat-linux/3.4.6/ /lib/ /usr/lib/i386-redhat-linux/3.4.6/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......
......@@ -43,14 +43,14 @@ namespace AMDiS {
/** \brief
* Constructor
*/
AdaptBase(const ::std::string& name,
AdaptBase(const ::std::string& name,
ProblemIterationInterface *problemIteration,
AdaptInfo *adaptInfo_,
ProblemTimeInterface *problemTime = NULL,
AdaptInfo *initialAdaptInfo = NULL)
AdaptInfo *adaptInfo,
ProblemTimeInterface *problemTime = NULL,
AdaptInfo *initialAdaptInfo = NULL)
: name_(name),
problemIteration_(problemIteration),
adaptInfo(adaptInfo_),
adaptInfo_(adaptInfo),
problemTime_(problemTime),
initialAdaptInfo_(initialAdaptInfo)
{};
......@@ -85,10 +85,10 @@ namespace AMDiS {
};
/** \brief
* Returns \ref adaptInfo
* Returns \ref adaptInfo_
*/
inline AdaptInfo *getAdaptInfo() {
return adaptInfo;
return adaptInfo_;
};
/** \brief
......@@ -123,7 +123,7 @@ namespace AMDiS {
/** \brief
* Main adapt info
*/
AdaptInfo *adaptInfo;
AdaptInfo *adaptInfo_;
/** \brief
* problem time interface
......
......@@ -77,24 +77,24 @@ namespace AMDiS {
FUNCNAME("AdaptInstationary::explicitTimeStrategy()");
// estimate before first adaption
if (adaptInfo->getTime() <= adaptInfo->getStartTime()) {
problemIteration_->oneIteration(adaptInfo, ESTIMATE);
if (adaptInfo_->getTime() <= adaptInfo_->getStartTime()) {
problemIteration_->oneIteration(adaptInfo_, ESTIMATE);
}
// increment time
adaptInfo->setTime(adaptInfo->getTime() + adaptInfo->getTimestep());
adaptInfo_->setTime(adaptInfo_->getTime() + adaptInfo_->getTimestep());
problemTime_->setTime(adaptInfo);
problemTime_->setTime(adaptInfo_);
INFO(info_,6)("time = %e, timestep = %e\n",
adaptInfo->getTime(), adaptInfo->getTimestep());
adaptInfo_->getTime(), adaptInfo_->getTimestep());
adaptInfo->setSpaceIteration(0);
adaptInfo_->setSpaceIteration(0);
// do the iteration
problemIteration_->beginIteration(adaptInfo);
problemIteration_->oneIteration(adaptInfo, FULL_ITERATION);
problemIteration_->endIteration(adaptInfo);
problemIteration_->beginIteration(adaptInfo_);
problemIteration_->oneIteration(adaptInfo_, FULL_ITERATION);
problemIteration_->endIteration(adaptInfo_);
}
void AdaptInstationary::implicitTimeStrategy()
......@@ -102,54 +102,54 @@ namespace AMDiS {
FUNCNAME("AdaptInstationary::implicitTimeStrategy()");
do {
adaptInfo->setTime(adaptInfo->getTime() + adaptInfo->getTimestep());
problemTime_->setTime(adaptInfo);
adaptInfo_->setTime(adaptInfo_->getTime() + adaptInfo_->getTimestep());
problemTime_->setTime(adaptInfo_);
INFO(info_,6)("time = %e, try timestep = %e\n",
adaptInfo->getTime(), adaptInfo->getTimestep());
adaptInfo_->getTime(), adaptInfo_->getTimestep());
problemIteration_->oneIteration(adaptInfo, NO_ADAPTION);
problemIteration_->oneIteration(adaptInfo_, NO_ADAPTION);
adaptInfo->incTimestepIteration();
adaptInfo_->incTimestepIteration();
if (!fixedTimestep_ &&
!adaptInfo->timeToleranceReached() &&
!adaptInfo->getTimestep() <= adaptInfo->getMinTimestep())
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep())
{
adaptInfo->setTime(adaptInfo->getTime() - adaptInfo->getTimestep());
adaptInfo->setTimestep(adaptInfo->getTimestep() * time_delta_1);
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
continue;
}
adaptInfo->setSpaceIteration(0);
adaptInfo_->setSpaceIteration(0);
do {
problemIteration_->beginIteration(adaptInfo);
problemIteration_->beginIteration(adaptInfo_);
if (problemIteration_->oneIteration(adaptInfo, FULL_ITERATION)) {
if (problemIteration_->oneIteration(adaptInfo_, FULL_ITERATION)) {
if (!fixedTimestep_ &&
!adaptInfo->timeToleranceReached() &&
!adaptInfo->getTimestep() <= adaptInfo->getMinTimestep())
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep())
{
adaptInfo->setTime(adaptInfo->getTime() - adaptInfo->getTimestep());
adaptInfo->setTimestep(adaptInfo->getTimestep() * time_delta_1);
problemIteration_->endIteration(adaptInfo);
adaptInfo->incSpaceIteration();
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
problemIteration_->endIteration(adaptInfo_);
adaptInfo_->incSpaceIteration();
break;
}
}
adaptInfo->incSpaceIteration();
problemIteration_->endIteration(adaptInfo);
adaptInfo_->incSpaceIteration();
problemIteration_->endIteration(adaptInfo_);
} while(!adaptInfo->spaceToleranceReached() &&
adaptInfo->getSpaceIteration() <= adaptInfo->getMaxSpaceIteration());
} while(!adaptInfo->timeToleranceReached() &&
!adaptInfo->getTimestep() <= adaptInfo->getMinTimestep() &&
adaptInfo->getTimestepIteration() <= adaptInfo->getMaxTimestepIteration());
} while(!adaptInfo_->spaceToleranceReached() &&
adaptInfo_->getSpaceIteration() <= adaptInfo_->getMaxSpaceIteration());
} while(!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep() &&
adaptInfo_->getTimestepIteration() <= adaptInfo_->getMaxTimestepIteration());
if (!fixedTimestep_ && adaptInfo->timeErrorLow()) {
adaptInfo->setTimestep(adaptInfo->getTimestep() *time_delta_2);
if (!fixedTimestep_ && adaptInfo_->timeErrorLow()) {
adaptInfo_->setTimestep(adaptInfo_->getTimestep() *time_delta_2);
}
}
......@@ -157,7 +157,7 @@ namespace AMDiS {
{
FUNCNAME("AdaptInstationary::oneTimestep");
adaptInfo->setTimestepIteration(0);
adaptInfo_->setTimestepIteration(0);
switch(strategy)
{
......@@ -172,7 +172,7 @@ namespace AMDiS {
explicitTimeStrategy();
}
adaptInfo->incTimestepNumber();
adaptInfo_->incTimestepNumber();
}
int AdaptInstationary::adapt()
......@@ -181,30 +181,29 @@ namespace AMDiS {
int errorCode = 0;
TEST_EXIT(adaptInfo->getTimestep() >= adaptInfo->getMinTimestep())
TEST_EXIT(adaptInfo_->getTimestep() >= adaptInfo_->getMinTimestep())
("timestep < min timestep\n");
TEST_EXIT(adaptInfo->getTimestep() <= adaptInfo->getMaxTimestep())
TEST_EXIT(adaptInfo_->getTimestep() <= adaptInfo_->getMaxTimestep())
("timestep > max timestep\n");
TEST_EXIT(adaptInfo->getTimestep() > 0)("timestep <= 0!\n");
TEST_EXIT(adaptInfo_->getTimestep() > 0)("timestep <= 0!\n");
if (adaptInfo->getTimestepNumber() == 0) {
adaptInfo->setTime(adaptInfo->getStartTime());
initialAdaptInfo_->setStartTime(adaptInfo->getStartTime());
initialAdaptInfo_->setTime(adaptInfo->getStartTime());
if (adaptInfo_->getTimestepNumber() == 0) {
adaptInfo_->setTime(adaptInfo_->getStartTime());
initialAdaptInfo_->setStartTime(adaptInfo_->getStartTime());
initialAdaptInfo_->setTime(adaptInfo_->getStartTime());
problemTime_->setTime(adaptInfo);
problemTime_->setTime(adaptInfo_);
// initial adaption
problemTime_->solveInitialProblem(initialAdaptInfo_);
problemTime_->transferInitialSolution(adaptInfo);
problemTime_->transferInitialSolution(adaptInfo_);
}
// while (adaptInfo->getTime() < adaptInfo->getEndTime() - DBL_TOL) {
while (adaptInfo->getEndTime() - adaptInfo->getTime() > DBL_TOL) {
while (adaptInfo_->getTime() < adaptInfo_->getEndTime() - DBL_TOL) {
iterationTimestamp_ = time(NULL);
problemTime_->initTimestep(adaptInfo);
problemTime_->initTimestep(adaptInfo_);
#ifdef _OPENMP
if (problemTime_->existsDelayedCalculation()) {
......@@ -224,9 +223,9 @@ namespace AMDiS {
oneTimestep();
#endif
problemTime_->closeTimestep(adaptInfo);
problemTime_->closeTimestep(adaptInfo_);
if (breakWhenStable && (adaptInfo->getSolverIterations() == 0)) {
if (breakWhenStable && (adaptInfo_->getSolverIterations() == 0)) {
break;
}
......@@ -270,7 +269,7 @@ namespace AMDiS {
FUNCNAME("AdaptInstationary::serialize()");
problemIteration_->serialize(out);
adaptInfo->serialize(out);
adaptInfo_->serialize(out);
if (problemTime_) {
problemTime_->serialize(out);
}
......@@ -281,7 +280,7 @@ namespace AMDiS {
FUNCNAME("AdaptInstationary::deserialize()");
problemIteration_->deserialize(in);
adaptInfo->deserialize(in);
adaptInfo_->deserialize(in);
if (problemTime_) {
problemTime_->deserialize(in);
}
......@@ -299,20 +298,20 @@ namespace AMDiS {
time_t currentTimestamp = time(NULL);
// Update list with the last iteration runtimes.
lastIterationsDuration.push(currentTimestamp - iterationTimestamp_);
lastIterationsDuration_.push(currentTimestamp - iterationTimestamp_);
// The list should not contain more than 5 elements. If so, delete the oldest one.
if (lastIterationsDuration.size() > 5) {
lastIterationsDuration.pop();
if (lastIterationsDuration_.size() > 5) {
lastIterationsDuration_.pop();
}
// Calculate the avarage of the last iterations.
::std::queue<int> tmpQueue = lastIterationsDuration;
::std::queue<int> tmpQueue = lastIterationsDuration_;
int avrgLastIterations = 0;
while (!tmpQueue.empty()) {
avrgLastIterations += tmpQueue.front();
tmpQueue.pop();
}
avrgLastIterations /= lastIterationsDuration.size();
avrgLastIterations /= lastIterationsDuration_.size();
// Check if there is enough time for a further iteration.
if (initialTimestamp_ + queueRuntime_ - currentTimestamp < avrgLastIterations * 2) {
......
......@@ -186,7 +186,7 @@ namespace AMDiS {
/** \brief
* Stores the runtime (in seconds) of some last timestep iterations.
*/
::std::queue<int> lastIterationsDuration;
::std::queue<int> lastIterationsDuration_;
};
}
......
......@@ -20,26 +20,26 @@ namespace AMDiS {
FUNCNAME("AdaptStationary::adapt()");
// initial iteration
if (adaptInfo->getSpaceIteration() == -1) {
problemIteration_->beginIteration(adaptInfo);
problemIteration_->oneIteration(adaptInfo, NO_ADAPTION);
problemIteration_->endIteration(adaptInfo);
adaptInfo->incSpaceIteration();
if (adaptInfo_->getSpaceIteration() == -1) {
problemIteration_->beginIteration(adaptInfo_);
problemIteration_->oneIteration(adaptInfo_, NO_ADAPTION);
problemIteration_->endIteration(adaptInfo_);
adaptInfo_->incSpaceIteration();
}
// adaption loop
while (!adaptInfo->spaceToleranceReached() &&
(adaptInfo->getSpaceIteration() < adaptInfo->getMaxSpaceIteration() ||
adaptInfo->getMaxSpaceIteration() < 0) ) {
while (!adaptInfo_->spaceToleranceReached() &&
(adaptInfo_->getSpaceIteration() < adaptInfo_->getMaxSpaceIteration() ||
adaptInfo_->getMaxSpaceIteration() < 0) ) {
problemIteration_->beginIteration(adaptInfo);
Flag adapted = problemIteration_->oneIteration(adaptInfo, FULL_ITERATION);
problemIteration_->endIteration(adaptInfo);
problemIteration_->beginIteration(adaptInfo_);
Flag adapted = problemIteration_->oneIteration(adaptInfo_, FULL_ITERATION);
problemIteration_->endIteration(adaptInfo_);
if (!adapted)
break;
adaptInfo->incSpaceIteration();
adaptInfo_->incSpaceIteration();
}
return 0;
......
......@@ -785,24 +785,23 @@ namespace AMDiS {
}
template<typename T>
DOFVector<T>& DOFVector<T>::operator=(const DOFVector<T>& rhs)
DOFVector<T>& DOFVector<T>::operator=(const DOFVector<T>& rhs )
{
feSpace = rhs.feSpace;
vec = rhs.vec;
this->elementVector = NULL;
interFct = rhs.interFct;
refineInter = rhs.refineInter;
coarsenOperation = rhs.coarsenOperation;
this->operators = rhs.operators;
this->operatorFactor = rhs.operatorFactor;
feSpace=rhs.feSpace;
vec=rhs.vec;
this->elementVector=NULL;
interFct=rhs.interFct;
refineInter=rhs.refineInter;
coarsenOperation=rhs.coarsenOperation;
this->operators=rhs.operators;
this->operatorFactor=rhs.operatorFactor;
if (rhs.boundaryManager) {
if (this->boundaryManager)
delete this->boundaryManager;
if(this->boundaryManager) delete this->boundaryManager;
this->boundaryManager = new BoundaryManager(*rhs.boundaryManager);
// boundaryManager->setDOFVector(this);
} else {
this->boundaryManager = NULL;
}
else
this->boundaryManager=NULL;
return *this;
}
......
......@@ -137,6 +137,10 @@ namespace AMDiS {
*/
Mesh* getMesh();
void setMesh(Mesh *mesh) {
mesh_ = mesh;
};
protected:
/** \brief
* Start collecting element and vertex data of the problem.
......
......@@ -36,10 +36,8 @@ namespace AMDiS {
GET_PARAMETER(0, name + "->output->append index", "%d", &appendIndex);
GET_PARAMETER(0, name + "->output->index length", "%d", &indexLength);
GET_PARAMETER(0, name + "->output->index decimals", "%d", &indexDecimals);
GET_PARAMETER(0, name + "->output->write every i-th timestep", "%d", &tsModulo);
TEST_EXIT(tsModulo > 0)
("Init file option \"write every i-th timestep\" is smaller than 1!\n");
GET_PARAMETER(0, name + "->output->write every i-th timestep", "%d",
&tsModulo);
}
void ElementFileWriter::writeFiles(AdaptInfo *adaptInfo, bool force,
......
......@@ -155,9 +155,6 @@ namespace AMDiS {
TEST_EXIT(!delayWriting_ || amdisHaveOpenMP)
("Delayed writing only possible with OpenMP support!\n");
TEST_EXIT(tsModulo > 0)