diff --git a/AMDiS/libtool b/AMDiS/libtool index 8db611e95ff0fa2724746641eea4eadde8ec54e6..4c12058b50051e5289ce07bce2dfe361962f4675 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host mars: +# Libtool was configured on host deimos101: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -66,12 +66,12 @@ fast_install=yes # The host system. host_alias= -host=ia64-unknown-linux-gnu +host=x86_64-unknown-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=ia64-unknown-linux-gnu +build=x86_64-unknown-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -82,13 +82,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="gcc" +LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="gcc" +CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" # Is the compiler the GNU C compiler? with_gcc=yes @@ -97,7 +97,7 @@ with_gcc=yes EGREP="grep -E" # The linker used to build libraries. -LD="/usr/ia64-suse-linux/bin/ld" +LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -147,7 +147,7 @@ pic_flag=" -fPIC -DPIC" pic_mode=default # What is the maximum length of a command? -max_cmd_len=131072 +max_cmd_len=32768 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" @@ -171,7 +171,7 @@ dlopen_self=unknown dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. -link_static_flag="-static" +link_static_flag="" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" @@ -269,10 +269,10 @@ finish_eval="" global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" # Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var=LD_RUN_PATH @@ -325,10 +325,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=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/" +sys_lib_search_path_spec=" /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib " +sys_lib_dlsearch_path_spec="/lib /usr/lib /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 " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host mars: +# Libtool was configured on host deimos101: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -6782,12 +6782,12 @@ fast_install=yes # The host system. host_alias= -host=ia64-unknown-linux-gnu +host=x86_64-unknown-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=ia64-unknown-linux-gnu +build=x86_64-unknown-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -6798,13 +6798,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="gcc" +LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="g++" +CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpiCC" # Is the compiler the GNU C compiler? with_gcc=yes @@ -6813,7 +6813,7 @@ with_gcc=yes EGREP="grep -E" # The linker used to build libraries. -LD="/usr/ia64-suse-linux/bin/ld" +LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -6863,7 +6863,7 @@ pic_flag=" -fPIC -DPIC" pic_mode=default # What is the maximum length of a command? -max_cmd_len=131072 +max_cmd_len=32768 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" @@ -6887,7 +6887,7 @@ dlopen_self=unknown dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. -link_static_flag="-static" +link_static_flag="" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" @@ -6942,11 +6942,11 @@ striplib="strip --strip-unneeded" # Dependencies to place before the objects being linked to create a # shared library. -predep_objects="/usr/lib/gcc/ia64-suse-linux/4.1.2/../../../crti.o /usr/lib/gcc/ia64-suse-linux/4.1.2/crtbeginS.o" +predep_objects="/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" # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects="/usr/lib/gcc/ia64-suse-linux/4.1.2/crtendS.o /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../crtn.o" +postdep_objects="/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" # Dependencies to place before the objects being linked to create a # shared library. @@ -6954,11 +6954,11 @@ predeps="" # Dependencies to place after the objects being linked to create a # shared library. -postdeps="-lstdc++ -lm -lgcc_s -lunwind -lc -lgcc_s -lunwind" +postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/usr/lib/gcc/ia64-suse-linux/4.1.2 -L/usr/lib/gcc/ia64-suse-linux/4.1.2 -L/usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib -L/usr/lib/gcc/ia64-suse-linux/4.1.2/../../.." +compiler_lib_search_path="-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/../../.." # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" @@ -6982,10 +6982,10 @@ finish_eval="" global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" # Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var=LD_RUN_PATH @@ -7038,10 +7038,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=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/" +sys_lib_search_path_spec=" /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib " +sys_lib_dlsearch_path_spec="/lib /usr/lib /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 " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7065,7 +7065,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host mars: +# Libtool was configured on host deimos101: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7087,12 +7087,12 @@ fast_install=yes # The host system. host_alias= -host=ia64-unknown-linux-gnu +host=x86_64-unknown-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=ia64-unknown-linux-gnu +build=x86_64-unknown-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -7103,22 +7103,22 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="gcc" +LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="gfortran" +CC="g77" # Is the compiler the GNU C compiler? -with_gcc=yes +with_gcc= # An ERE matcher. EGREP="grep -E" # The linker used to build libraries. -LD="/usr/ia64-suse-linux/bin/ld" +LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" # Whether we need hard or soft links. LN_S="ln -s" @@ -7168,7 +7168,7 @@ pic_flag=" -fPIC" pic_mode=default # What is the maximum length of a command? -max_cmd_len=131072 +max_cmd_len=32768 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" @@ -7290,10 +7290,10 @@ finish_eval="" global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" # Transform the output of nm in a proper C declaration -global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'" +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair -global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var=LD_RUN_PATH @@ -7346,10 +7346,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=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/" +sys_lib_search_path_spec=" /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/ /usr/lib/gcc/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../ /lib/x86_64-suse-linux/3.3.5/ /lib/ /usr/lib/x86_64-suse-linux/3.3.5/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib " +sys_lib_dlsearch_path_spec="/lib /usr/lib /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 " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" diff --git a/AMDiS/src/Mesh.cc b/AMDiS/src/Mesh.cc index 560430b39d90f7c5eeb1a231def641433e6bad5f..f411a43fd7fc36804e28b45130fc70b01b2942dd 100644 --- a/AMDiS/src/Mesh.cc +++ b/AMDiS/src/Mesh.cc @@ -338,14 +338,13 @@ namespace AMDiS { delete *macroIt; } - int nRemainDofs = 0; // Check now all the dofs, that have no owner anymore and therefore have to // be removed. for (DofElMap::iterator dofsIt = dofsOwner.begin(); dofsIt != dofsOwner.end(); ++dofsIt) { if (dofsIt->second.size() == 0) - freeDOF(const_cast<DegreeOfFreedom*>(dofsIt->first), + freeDOF(const_cast<DegreeOfFreedom*>(dofsIt->first), dofsPosIndex[dofsIt->first]); else nRemainDofs++; @@ -358,21 +357,21 @@ namespace AMDiS { { FUNCNAME("Mesh::traverse()"); - std::deque<MacroElement*>::iterator mel; ElInfoStack elInfoStack(this); ElInfo* elinfo = elInfoStack.getNextElement(); Traverse tinfo(this, flag, level, el_fct); - int sum = 0; elinfo->setFillFlag(flag); if (flag.isSet(Mesh::CALL_LEAF_EL_LEVEL) || - flag.isSet(Mesh::CALL_EL_LEVEL) || + flag.isSet(Mesh::CALL_EL_LEVEL) || flag.isSet(Mesh::CALL_MG_LEVEL)) { TEST(level >= 0)("invalid level: %d\n", level); } - - for (mel = macroElements.begin(); mel != macroElements.end(); mel++) { + + int sum = 0; + for (std::deque<MacroElement*>::iterator mel = macroElements.begin(); + mel != macroElements.end(); mel++) { elinfo->fillMacroInfo(*mel); sum += tinfo.recursive(&elInfoStack); } @@ -389,7 +388,7 @@ namespace AMDiS { localAdmin->setMesh(this); std::vector<DOFAdmin*>::iterator dai = - std::find(admin.begin(),admin.end(),localAdmin); + std::find(admin.begin(), admin.end(), localAdmin); TEST_EXIT(dai == admin.end()) ("admin %s is already associated to mesh %s\n", @@ -577,18 +576,18 @@ namespace AMDiS { int ndof = nDOF[position]; if (ndof) { if (!dof) { - MSG("dof = NULL, but ndof=%d\n", ndof); + MSG("dof = NULL, but ndof = %d\n", ndof); return; } } else { - if (dof) { - MSG("dof != NULL, but ndof=0\n"); - } + if (dof) + MSG("dof != NULL, but ndof = 0\n"); + return; } TEST_EXIT_DBG(ndof <= MAX_DOF) - ("ndof too big: ndof=%d, MAX_DOF=%d\n", ndof, MAX_DOF); + ("ndof too big: ndof = %d, MAX_DOF = %d\n", ndof, MAX_DOF); for (int i = 0; i < static_cast<int>(admin.size()); i++) { DOFAdmin *localAdmin = admin[i]; diff --git a/AMDiS/src/Mesh.h b/AMDiS/src/Mesh.h index 2b13ff975ddbfdc9bd4170571d980e1d7c2a595b..bb3fff0703c33c60d767ef975af8cbfd9688c8da 100644 --- a/AMDiS/src/Mesh.h +++ b/AMDiS/src/Mesh.h @@ -686,10 +686,13 @@ namespace AMDiS { Parametric *parametric; /** \brief - * If the value is non zero then preserve all DOFs on all levels (can - * be used for multigrid, e.g.); otherwise all DOFs on the parent that are - * not handed over to a child are removed during refinement and added again - * on the parent during coarsening. + * When an element is refined, not all dofs of the coarse element must be + * part of the new elements. An example are centered dofs when using higher + * lagrange basis functions. The midpoint dof of the parents element is not + * a dof of the both children elements. Therefore, the dof can be deleted. In + * some situation, e.g., when using multigrid techniques, it can be necessary to + * store this coarse dofs. Then this variable must be set to true. If false, the + * not required coarse dofs will be deleted. */ bool preserveCoarseDOFs; diff --git a/AMDiS/src/ParallelDomainBase.cc b/AMDiS/src/ParallelDomainBase.cc index 80d50b4881253c30783235d771a356a4a82f4de8..7a5adc29fd1274ffeeb6ae21297831ac785fcf10 100644 --- a/AMDiS/src/ParallelDomainBase.cc +++ b/AMDiS/src/ParallelDomainBase.cc @@ -97,17 +97,17 @@ namespace AMDiS { // === Create new global and local DOF numbering. === // Set of all DOFs of the rank. - std::vector<const DegreeOfFreedom*> rankDOFs; + std::vector<const DegreeOfFreedom*> rankDofs; // Number of DOFs in ranks partition that are owned by the rank. nRankDofs = 0; // Number of all DOFs in the macro mesh. int nOverallDOFs = 0; - createLocalGlobalNumbering(rankDOFs, nRankDofs, nOverallDOFs); + createLocalGlobalNumbering(rankDofs, nRankDofs, nOverallDOFs); // === Create interior boundary information === - createInteriorBoundaryInfo(rankDOFs); + createInteriorBoundaryInfo(rankDofs); // === Remove all macro elements that are not part of the rank partition. === @@ -809,7 +809,7 @@ namespace AMDiS { } - void ParallelDomainBase::createInteriorBoundaryInfo(DofContainer& rankDOFs) + void ParallelDomainBase::createInteriorBoundaryInfo(DofContainer& rankDofs) { FUNCNAME("ParallelDomainBase::createInteriorBoundaryInfo()"); @@ -957,7 +957,7 @@ namespace AMDiS { } - void ParallelDomainBase::createLocalGlobalNumbering(DofContainer& rankDOFs, + void ParallelDomainBase::createLocalGlobalNumbering(DofContainer& rankDofs, int& nRankDofs, int& nOverallDOFs) { @@ -970,9 +970,9 @@ namespace AMDiS { DofContainer rankAllDofs; DofToRank boundaryDofs; - createDOFMemberInfo(partitionDOFs, rankDOFs, rankAllDofs, boundaryDofs, vertexDof); + createDofMemberInfo(partitionDOFs, rankDofs, rankAllDofs, boundaryDofs, vertexDof); - nRankDofs = rankDOFs.size(); + nRankDofs = rankDofs.size(); nOverallDOFs = partitionDOFs.size(); @@ -988,7 +988,7 @@ namespace AMDiS { // === had before. === - // Do not change the indices now, but create a new indexing a store it here. + // Do not change the indices now, but create a new indexing and store it here. DofIndexMap rankDofsNewLocalIndex; isRankDof.clear(); int i = 0; @@ -1002,7 +1002,7 @@ namespace AMDiS { } - // === Create for all rank owned dofs a new global indexing. === + // === Create for all rank owned dofs a new global indexing. === // Stores for dofs in rank a new global index. DofIndexMap rankDofsNewGlobalIndex; @@ -1010,8 +1010,8 @@ namespace AMDiS { DofIndexMap rankOwnedDofsNewLocalIndex; i = 0; - for (DofContainer::iterator dofIt = rankDOFs.begin(); - dofIt != rankDOFs.end(); ++dofIt) { + for (DofContainer::iterator dofIt = rankDofs.begin(); + dofIt != rankDofs.end(); ++dofIt) { rankDofsNewGlobalIndex[*dofIt] = i + rstart; rankOwnedDofsNewLocalIndex[*dofIt] = i; i++; @@ -1187,28 +1187,39 @@ namespace AMDiS { // === Get all DOFs in ranks partition. === ElementDofIterator elDofIt(feSpace); - DofSet rankDOFSet; + DofSet rankDofSet; + + // The vertexDof list must be recreated from the scratch. Otherwise, it is possible + // that it maps dofs, that were removed (this is also possible, if the mesh was + // refined, e.g., center dofs of an element are not dofs of the children). + vertexDof.clear(); + TraverseStack stack; ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL); while (elInfo) { Element *element = elInfo->getElement(); elDofIt.reset(element); do { - rankDOFSet.insert(elDofIt.getDofPtr()); + rankDofSet.insert(elDofIt.getDofPtr()); + + if (elDofIt.getCurrentPos() == 0) + vertexDof[elDofIt.getDofPtr()] = true; + else + vertexDof[elDofIt.getDofPtr()] = false; } while(elDofIt.next()); elInfo = stack.traverseNext(elInfo); } DofContainer rankAllDofs; - for (DofSet::iterator dofIt = rankDOFSet.begin(); dofIt != rankDOFSet.end(); ++dofIt) + for (DofSet::iterator dofIt = rankDofSet.begin(); dofIt != rankDofSet.end(); ++dofIt) rankAllDofs.push_back(*dofIt); sort(rankAllDofs.begin(), rankAllDofs.end(), cmpDofsByValue); - DofContainer rankDOFs = rankAllDofs; + DofContainer rankDofs = rankAllDofs; // === Traverse on interior boundaries and move all not ranked owned DOFs from === - // === rankDOFs to boundaryDOFs. === + // === rankDofs to boundaryDOFs. === RankToDofContainer oldSendDofs = sendDofs; RankToDofContainer oldRecvDofs = recvDofs; @@ -1257,9 +1268,9 @@ namespace AMDiS { if (vertexDof[*iit]) { dofsToRecv.push_back(*iit); - DofContainer::iterator eraseIt = find(rankDOFs.begin(), rankDOFs.end(), *iit); - if (eraseIt != rankDOFs.end()) - rankDOFs.erase(eraseIt); + DofContainer::iterator eraseIt = find(rankDofs.begin(), rankDofs.end(), *iit); + if (eraseIt != rankDofs.end()) + rankDofs.erase(eraseIt); } @@ -1273,9 +1284,9 @@ namespace AMDiS { TEST_EXIT_DBG(find(dofsToRecv.begin(), dofsToRecv.end(), dofs[i]) == dofsToRecv.end()) ("Should not happen!\n"); - DofContainer::iterator eraseIt = find(rankDOFs.begin(), rankDOFs.end(), dofs[i]); - if (eraseIt != rankDOFs.end()) - rankDOFs.erase(eraseIt); + DofContainer::iterator eraseIt = find(rankDofs.begin(), rankDofs.end(), dofs[i]); + if (eraseIt != rankDofs.end()) + rankDofs.erase(eraseIt); dofsToRecv.push_back(dofs[i]); } @@ -1283,7 +1294,7 @@ namespace AMDiS { } } - nRankDofs = rankDOFs.size(); + nRankDofs = rankDofs.size(); // === Get starting position for global rank dof ordering. ==== @@ -1316,8 +1327,8 @@ namespace AMDiS { DofIndexMap rankOwnedDofsNewLocalIndex; i = 0; - for (DofContainer::iterator dofIt = rankDOFs.begin(); - dofIt != rankDOFs.end(); ++dofIt) { + for (DofContainer::iterator dofIt = rankDofs.begin(); + dofIt != rankDofs.end(); ++dofIt) { rankDofsNewGlobalIndex[*dofIt] = i + rstart; rankOwnedDofsNewLocalIndex[*dofIt] = i; i++; @@ -1485,7 +1496,7 @@ namespace AMDiS { } - void ParallelDomainBase::createDOFMemberInfo(DofToPartitions& partitionDofs, + void ParallelDomainBase::createDofMemberInfo(DofToPartitions& partitionDofs, DofContainer& rankOwnedDofs, DofContainer& rankAllDofs, DofToRank& boundaryDofs, @@ -1514,7 +1525,7 @@ namespace AMDiS { vertexDof[elDofIt.getDofPtr()] = true; else vertexDof[elDofIt.getDofPtr()] = false; - } while(elDofIt.next()); + } while (elDofIt.next()); elInfo = stack.traverseNext(elInfo); } @@ -1564,7 +1575,7 @@ namespace AMDiS { } - if (!isInRank) + if (!isInRank) vertexDof.erase(it->first); } diff --git a/AMDiS/src/ParallelDomainBase.h b/AMDiS/src/ParallelDomainBase.h index f7ecd5a91bc18569a386ed6f2cc4a1ddbc6fd536..769162212086ccf4ca1c2acc683d5348e919698d 100644 --- a/AMDiS/src/ParallelDomainBase.h +++ b/AMDiS/src/ParallelDomainBase.h @@ -245,7 +245,7 @@ namespace AMDiS { * \param[out] boundaryDOFs Stores all DOFs in ranks partition that are on an * interior boundary but correspond to another rank. */ - void createDOFMemberInfo(DofToPartitions& partitionDofs, + void createDofMemberInfo(DofToPartitions& partitionDofs, DofContainer& rankOwnedDofs, DofContainer& rankAllDofs, DofToRank& boundaryDofs, @@ -326,6 +326,8 @@ namespace AMDiS { void deserialize(std::istream &in, std::map<const DegreeOfFreedom*, T> &data, std::map<int, const DegreeOfFreedom*> &dofMap) { + FUNCNAME("ParallelDomainBase::deserialize()"); + int mapSize = 0; SerUtil::deserialize(in, mapSize); for (int i = 0; i < mapSize; i++) { @@ -333,6 +335,9 @@ namespace AMDiS { T v2; SerUtil::deserialize(in, v1); SerUtil::deserialize(in, v2); + + TEST_EXIT_DBG(dofMap.count(v1) != 0)("Cannot find DOF %d in map!\n", v1); + data[dofMap[v1]] = v2; } } @@ -475,6 +480,10 @@ namespace AMDiS { */ DofIndexToBool isRankDof; + /** \brief + * Maps every dof pointer in ranks macro mesh to a boolean variable indicating + * wheather this dof is a vertex dof (true) or not (false). + */ DofToBool vertexDof; /// Is the index of the first row of the linear system, which is owned by the rank. diff --git a/AMDiS/src/ParallelDomainVec.h b/AMDiS/src/ParallelDomainVec.h index 4d694d36f3056b2d724231b0919c32e584862768..4d6a7f4fde4d4f42f777443e762d1804c2177c9f 100644 --- a/AMDiS/src/ParallelDomainVec.h +++ b/AMDiS/src/ParallelDomainVec.h @@ -52,11 +52,8 @@ namespace AMDiS { // Reads the object data from an input stream. virtual void deserialize(std::istream &in) { - MSG("DESER 1\n"); probVec->deserialize(in); - MSG("DESER 2\n"); ParallelDomainBase::deserialize(in); - MSG("DESER 3\n"); } protected: diff --git a/AMDiS/src/RefinementManager2d.cc b/AMDiS/src/RefinementManager2d.cc index 382331c9564afe86297c4d1810554b33613f4d10..668151c046e1ee722f5ee7aa3d7b5be97de86b4d 100644 --- a/AMDiS/src/RefinementManager2d.cc +++ b/AMDiS/src/RefinementManager2d.cc @@ -25,20 +25,19 @@ namespace AMDiS { if (el_info->getElement()->getMark() <= 0) { delete refineList; - return el_info; /* element may not be refined */ + + // Element may not be refined. + return el_info; } refineList->setElement(0, el_info->getElement()); int n_neigh = 1; if (el_info->getProjection(0) && - el_info->getProjection(0)->getType() == VOLUME_PROJECTION) { + el_info->getProjection(0)->getType() == VOLUME_PROJECTION) newCoords = true; - } - /****************************************************************************/ - /* give the refinement edge the right orientation */ - /****************************************************************************/ + // === Give the refinement edge the right orientation. === if (el_info->getElement()->getDOF(0,0) < el_info->getElement()->getDOF(1, 0)) { edge[0] = const_cast<int*>(el_info->getElement()->getDOF(0)); @@ -48,20 +47,15 @@ namespace AMDiS { edge[0] = const_cast<int*>(el_info->getElement()->getDOF(1)); } - /****************************************************************************/ - /* get the refinement patch */ - /****************************************************************************/ + // === Get the refinement patch. === + if (getRefinePatch(&el_info, edge, 0, refineList, &n_neigh)) { - /****************************************************************************/ - /* domain's boundary was reached while looping around the refinement edge */ - /****************************************************************************/ + // Domain's boundary was reached while looping around the refinement edge. getRefinePatch(&el_info, edge, 1, refineList, &n_neigh); bound = true; } - // ========================================================================== - // === check for periodic boundary ========================================== - // ========================================================================== + // === Check for periodic boundary === DegreeOfFreedom *next_edge[2]; DegreeOfFreedom *first_edge[2] = {edge[0], edge[1]}; @@ -77,10 +71,8 @@ namespace AMDiS { std::map<int, VertexVector*>::iterator end = mesh->getPeriodicAssociations().end(); while (edge[0] != NULL) { - periodicList = refineList->periodicSplit(edge, - next_edge, - &n_neigh, - &n_neigh_periodic); + periodicList = refineList->periodicSplit(edge, next_edge, + &n_neigh, &n_neigh_periodic); TEST_EXIT_DBG(periodicList)("periodicList = NULL\n"); @@ -129,11 +121,6 @@ namespace AMDiS { } } - - /****************************************************************************/ - /* and now refine the patch */ - /****************************************************************************/ - delete refineList; return el_info; @@ -154,7 +141,7 @@ namespace AMDiS { WorldVector<double> *new_coord = new WorldVector<double>; for (int j = 0; j < dow; j++) - (*new_coord)[j] = (el_info->getCoord(0)[j] + el_info->getCoord(1)[j])*0.5; + (*new_coord)[j] = (el_info->getCoord(0)[j] + el_info->getCoord(1)[j]) * 0.5; projector->project(*new_coord); @@ -166,10 +153,7 @@ namespace AMDiS { void RefinementManager2d::setNewCoords() { - Flag fillFlag = Mesh::CALL_EVERY_EL_PREORDER| - Mesh::FILL_BOUND| - Mesh::FILL_COORDS; - + Flag fillFlag = Mesh::CALL_EVERY_EL_PREORDER | Mesh::FILL_BOUND | Mesh::FILL_COORDS; mesh->traverse(-1, fillFlag, newCoordsFct); } @@ -180,12 +164,12 @@ namespace AMDiS { { FUNCNAME("RefinementManager2d::refinePatch()"); DegreeOfFreedom *dof[3] = {NULL, NULL, NULL}; - Triangle *el = dynamic_cast<Triangle*>(const_cast<Element*>(refineList->getElement(0))); - Triangle *neigh = dynamic_cast<Triangle*>(const_cast<Element*>(refineList->getElement(1))); + Triangle *el = + dynamic_cast<Triangle*>(const_cast<Element*>(refineList->getElement(0))); + Triangle *neigh = + dynamic_cast<Triangle*>(const_cast<Element*>(refineList->getElement(1))); - /****************************************************************************/ - /* there is one new vertex in the refinement edge */ - /****************************************************************************/ + // === There is one new vertex in the refinement edge. === dof[0] = mesh->getDOF(VERTEX); @@ -193,25 +177,20 @@ namespace AMDiS { mesh->incrementNumberOfEdges(1); if (mesh->getNumberOfDOFs(EDGE)) { - /****************************************************************************/ - /* there are two additional dofs in the refinement edge */ - /****************************************************************************/ + // There are two additional dofs in the refinement edge. dof[1] = mesh->getDOF(EDGE); dof[2] = mesh->getDOF(EDGE); } - /****************************************************************************/ - /* first refine the element */ - /****************************************************************************/ + // === First refine the element. === bisectTriangle(el, dof); if (neigh) { DegreeOfFreedom *tmp = dof[1]; - /****************************************************************************/ - /* there is a neighbour; refine it also, but first exchange dof[1] and */ - /* dof[2]; thus, dof[1] is always added on child[0]! */ - /****************************************************************************/ + + // === There is a neighbour; refine it also, but first exchange dof[1] and === + // === dof[2]; thus, dof[1] is always added on child[0]! === dof[1] = dof[2]; dof[2] = tmp; @@ -220,37 +199,30 @@ namespace AMDiS { newCoords = true; } - /****************************************************************************/ - /* if there are functions to interpolate data to the finer grid, do so */ - /****************************************************************************/ + // === If there are functions to interpolate data to the finer grid, do so. int nrAdmin = mesh->getNumberOfDOFAdmin(); for(int iadmin = 0; iadmin < nrAdmin; iadmin++) { - std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); - for(it = admin->beginDOFIndexed(); it != end; it++) + for (std::list<DOFIndexedBase*>::iterator it = admin->beginDOFIndexed(); + it != end; it++) (*it)->refineInterpol(*refineList, n_neigh); } if (!mesh->queryCoarseDOFs()) { - /****************************************************************************/ - /* if there should be no dof information on interior leaf elements remove */ - /* dofs from edges and the centers of parents */ - /****************************************************************************/ + // === If there should be no dof information on interior leaf elements === + // === remove dofs from edges and the centers of parents. === if (mesh->getNumberOfDOFs(EDGE)) { - int node = mesh->getNode(EDGE); - /****************************************************************************/ - /* the only DOF that can be freed is that in the refinement edge; all other*/ - /* DOFs are handed on the children */ - /****************************************************************************/ + // === The only DOF that can be freed is that in the refinement edge; all === + // === other DOFs are handed on the children. === - mesh->freeDOF(const_cast<int*>( el->getDOF(node+2)), EDGE); + mesh->freeDOF(const_cast<int*>(el->getDOF(node+2)), EDGE); } - if (mesh->getNumberOfDOFs(EDGE) || mesh->getNumberOfDOFs(CENTER)) + if (mesh->getNumberOfDOFs(EDGE) || mesh->getNumberOfDOFs(CENTER)) refineList->removeDOFParents(n_neigh); } @@ -273,60 +245,47 @@ namespace AMDiS { child[1]->setMark(newMark); el->setMark(0); - /****************************************************************************/ - /* transfer hidden data from parent to children */ - /****************************************************************************/ + // === Transfer hidden data from parent to children. === - el->refineElementData(child[0], child[1]); // call of subclass-method + // call of subclass-method + el->refineElementData(child[0], child[1]); el->setFirstChild(child[0]); el->setSecondChild(child[1]); if (newMark > 0) doMoreRecursiveRefine = true; - /****************************************************************************/ - /* vertex 2 is the newest vertex */ - /****************************************************************************/ + // === Vertex 2 is the newest vertex. === child[0]->setDOF(2, newDOFs[0]); child[1]->setDOF(2, newDOFs[0]); - /****************************************************************************/ - /* the other vertices are handed on from the parent */ - /****************************************************************************/ + // === The other vertices are handed on from the parent. === for (int i_child = 0; i_child < 2; i_child++) { child[i_child]->setDOF(i_child, const_cast<int*>(el->getDOF(2))); child[i_child]->setDOF(1 - i_child, const_cast<int*>(el->getDOF(i_child))); } - /****************************************************************************/ - /* there is one more leaf element, two hierachical elements and one more */ - /* edge */ - /****************************************************************************/ + // === There is one more leaf element, two hierachical elements and one === + // === more edge. === mesh->incrementNumberOfEdges(1); mesh->incrementNumberOfLeaves(1); mesh->incrementNumberOfElements(2); if (mesh->getNumberOfDOFs(EDGE)) { - /****************************************************************************/ - /* there are dof's in the midpoint of the edges */ - /****************************************************************************/ - DegreeOfFreedom* newEdgeDOFs = mesh->getDOF(EDGE); - + DegreeOfFreedom* newEdgeDOFs = mesh->getDOF(EDGE); + + // There are dofs in the midpoint of the edges. child[0]->setDOF(4, newEdgeDOFs); child[1]->setDOF(3, newEdgeDOFs); - /****************************************************************************/ - /* dofs handed on by the parent */ - /****************************************************************************/ - child[0]->setDOF(5, const_cast<int*>( el->getDOF(4))); - child[1]->setDOF(5, const_cast<int*>( el->getDOF(3))); + // Dofs handed on by the parent. + child[0]->setDOF(5, const_cast<int*>(el->getDOF(4))); + child[1]->setDOF(5, const_cast<int*>(el->getDOF(3))); - /****************************************************************************/ - /* dofs in the refinement edge */ - /****************************************************************************/ + // Dofs in the refinement edge. child[0]->setDOF(3, newDOFs[1]); child[1]->setDOF(4, newDOFs[2]); } @@ -334,9 +293,7 @@ namespace AMDiS { if (mesh->getNumberOfDOFs(CENTER)) { int node = mesh->getNode(CENTER); - /****************************************************************************/ - /* there are dofs at the barycenter of the triangles */ - /****************************************************************************/ + // There are dofs at the barycenter of the triangles. child[0]->setDOF(node, mesh->getDOF(CENTER)); child[1]->setDOF(node, mesh->getDOF(CENTER)); } @@ -350,19 +307,15 @@ namespace AMDiS { FUNCNAME("RefinementManager2d::getRefinePatch()"); if ((*el_info)->getNeighbour(2) && (*el_info)->getOppVertex(2) != 2) { - /****************************************************************************/ - /* neighbour is not compatible devisible; refine neighbour first, store the*/ - /* opp_vertex to traverse back to el */ - /****************************************************************************/ + // Neighbour is not compatible devisible; refine neighbour first, store the + // opp_vertex to traverse back to el. int opp_vertex = (*el_info)->getOppVertex(2); ElInfo *neigh_info = stack->traverseNeighbour2d(*el_info, 2); neigh_info->getElement()->setMark(max(neigh_info->getElement()->getMark(), 1)); neigh_info = refineFunction(neigh_info); - /****************************************************************************/ - /* now go back to the original element and refine the patch */ - /****************************************************************************/ + // Now go back to the original element and refine the patch. *el_info = neigh_info = stack->traverseNeighbour2d(neigh_info, opp_vertex); TEST_EXIT_DBG(neigh_info->getElement() == dynamic_cast<Triangle*>(const_cast<Element*>((*el_info)->getElement())))