From ddc24f0f7823247bbf614a35b8a99816b536175b Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Thu, 28 Oct 2010 14:47:50 +0000 Subject: [PATCH] Small bugfixes. --- AMDiS/libtool | 34 +++++++++++++-------------- AMDiS/src/Element.cc | 52 ++++++++++++++++++++--------------------- AMDiS/src/Element.h | 2 +- AMDiS/src/Mesh.cc | 4 ++-- AMDiS/src/Mesh.h | 4 ++-- AMDiS/src/ProblemVec.cc | 5 ++-- AMDiS/src/VtkWriter.cc | 8 ------- 7 files changed, 51 insertions(+), 58 deletions(-) diff --git a/AMDiS/libtool b/AMDiS/libtool index 008d56e2..e3aa9300 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -51,32 +51,32 @@ build_old_libs=yes pic_mode=default # Whether or not to optimize for fast installation. -fast_install=yes +fast_install=needless # The host system. host_alias= -host=i686-redhat-linux-gnu +host=x86_64-unknown-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=i686-redhat-linux-gnu +build=x86_64-unknown-linux-gnu build_os=linux-gnu # A sed program that does not truncate output. -SED="/bin/sed" +SED="/usr/bin/sed" # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # A grep program that handles long lines. -GREP="/bin/grep" +GREP="/usr/bin/grep" # An ERE matcher. -EGREP="/bin/grep -E" +EGREP="/usr/bin/grep -E" # A literal string matcher. -FGREP="/bin/grep -F" +FGREP="/usr/bin/grep -F" # A BSD- or MS-compatible name lister. NM="/usr/bin/nm -B" @@ -85,7 +85,7 @@ NM="/usr/bin/nm -B" LN_S="ln -s" # What is the maximum length of a command? -max_cmd_len=98304 +max_cmd_len=1572864 # Object file suffix (normally "o"). objext=o @@ -204,7 +204,7 @@ runpath_var=LD_RUN_PATH shlibpath_var=LD_LIBRARY_PATH # Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=no +shlibpath_overrides_runpath=yes # Format of library name prefix. libname_spec="lib\$name" @@ -233,10 +233,10 @@ finish_eval="" hardcode_into_libs=yes # Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/openmpi/1.4-gcc/lib /usr/lib /usr/lib/gcc/i386-redhat-linux/4.1.2 /lib" +sys_lib_search_path_spec="/usr/lib64/gcc/x86_64-suse-linux/4.5 /usr/lib64 /lib64 /usr/x86_64-suse-linux/lib" # Run-time system search path for libraries. -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/octave-3.0.1 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib /usr/lib/xulrunner-1.9.2 " +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/lib64/Xaw3d /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/lib/Xaw3d /usr/x86_64-suse-linux/lib /usr/local/lib /opt/kde3/lib /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /opt/kde3/lib64 /usr/lib64/graphviz /usr/lib64/graphviz/sharp /usr/lib64/graphviz/java /usr/lib64/graphviz/perl /usr/lib64/graphviz/php /usr/lib64/graphviz/ocaml /usr/lib64/graphviz/python /usr/lib64/graphviz/lua /usr/lib64/graphviz/tcl /usr/lib64/graphviz/guile /usr/lib64/graphviz/ruby /usr/lib64/octave-3.2.4 " # Whether dlopen is supported. dlopen_support=unknown @@ -253,7 +253,7 @@ striplib="strip --strip-unneeded" # The linker used to build libraries. -LD="/usr/bin/ld" +LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" # Commands used to build an old-style archive. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" @@ -8908,7 +8908,7 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. -LD="/usr/bin/ld" +LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" # Commands used to build an old-style archive. old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" @@ -9039,17 +9039,17 @@ file_list_spec="" hardcode_action=immediate # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=". /usr/lib/openmpi/1.4-gcc/lib /usr/lib/openmpi/1.4-gcc/lib /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/../../.." +compiler_lib_search_dirs="/usr/lib64/gcc/x86_64-suse-linux/4.5 /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib /usr/lib64/gcc/x86_64-suse-linux/4.5/../../.." # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/usr/lib/crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o" -postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o /usr/lib/crtn.o" +predep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.5/crtbeginS.o" +postdep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.5/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crtn.o" predeps="" 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="-L. -L/usr/lib/openmpi/1.4-gcc/lib -L/usr/lib/openmpi/1.4-gcc/lib -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/../../.." +compiler_lib_search_path="-L/usr/lib64/gcc/x86_64-suse-linux/4.5 -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../.." # ### END LIBTOOL TAG CONFIG: CXX diff --git a/AMDiS/src/Element.cc b/AMDiS/src/Element.cc index bff5e1f2..ba79755b 100644 --- a/AMDiS/src/Element.cc +++ b/AMDiS/src/Element.cc @@ -12,31 +12,6 @@ namespace AMDiS { std::map<DegreeOfFreedom*, bool> Element::deletedDOFs; - int Element::getRegion() const - { - if (!elementData) - return -1; - - ElementRegion_ED* red = - dynamic_cast<ElementRegion_ED*>(elementData->getElementData(ELEMENT_REGION)); - - if (red) - return red->getRegion(); - - return -1; - } - - - void Element::setDOFPtrs() - { - FUNCNAME("Element::setDOFPtrs()"); - - TEST_EXIT_DBG(mesh)("no mesh!\n"); - - dof = mesh->createDOFPtrs(); - } - - Element::Element(Mesh *aMesh) { mesh = aMesh; @@ -48,7 +23,7 @@ namespace AMDiS { mark = 0; if (mesh) { - setDOFPtrs(); + setDofPtrs(); } else { mesh = NULL; } @@ -74,6 +49,31 @@ namespace AMDiS { } + int Element::getRegion() const + { + if (!elementData) + return -1; + + ElementRegion_ED* red = + dynamic_cast<ElementRegion_ED*>(elementData->getElementData(ELEMENT_REGION)); + + if (red) + return red->getRegion(); + + return -1; + } + + + void Element::setDofPtrs() + { + FUNCNAME("Element::setDofPtrs()"); + + TEST_EXIT_DBG(mesh)("no mesh!\n"); + + dof = mesh->createDofPtrs(); + } + + bool Element::deleteElementData(int typeID) { FUNCNAME("Element::deleteElementData()"); diff --git a/AMDiS/src/Element.h b/AMDiS/src/Element.h index 9a733d16..e5d226af 100644 --- a/AMDiS/src/Element.h +++ b/AMDiS/src/Element.h @@ -513,7 +513,7 @@ namespace AMDiS { protected: /// Sets Element's \ref dof pointer. Used by friend class Mesh. - void setDOFPtrs(); + void setDofPtrs(); /// Sets Element's \ref index. Used by friend class Mesh. inline void setIndex(int i) diff --git a/AMDiS/src/Mesh.cc b/AMDiS/src/Mesh.cc index cedead16..dd691e3d 100644 --- a/AMDiS/src/Mesh.cc +++ b/AMDiS/src/Mesh.cc @@ -500,9 +500,9 @@ namespace AMDiS { } - DegreeOfFreedom **Mesh::createDOFPtrs() + DegreeOfFreedom **Mesh::createDofPtrs() { - FUNCNAME("Mesh::createDOFPtrs()"); + FUNCNAME("Mesh::createDofPtrs()"); if (nNodeEl <= 0) return NULL; diff --git a/AMDiS/src/Mesh.h b/AMDiS/src/Mesh.h index 1afe8995..eb265b9c 100644 --- a/AMDiS/src/Mesh.h +++ b/AMDiS/src/Mesh.h @@ -220,7 +220,7 @@ namespace AMDiS { const DOFAdmin* getVertexAdmin() const; /// Allocates a array of DOF pointers. The array holds one pointer for each node. - DegreeOfFreedom **createDOFPtrs(); + DegreeOfFreedom **createDofPtrs(); /// Returns \ref preserveCoarseDOFs of the mesh inline bool queryCoarseDOFs() const @@ -406,7 +406,7 @@ namespace AMDiS { void removeMacroElements(std::set<MacroElement*>& macros, const FiniteElemSpace* feSpace); - /// Frees the array of DOF pointers (see \ref createDOFPtrs) + /// Frees the array of DOF pointers (see \ref createDofPtrs) void freeDOFPtrs(DegreeOfFreedom **ptrs); /// Used by \ref findElementAtPoint. diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index ac15d663..d8b2219c 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -138,6 +138,7 @@ namespace AMDiS { // === create marker === if (initFlag.isSet(INIT_MARKER)) createMarker(); + if (adoptProblem && adoptFlag.isSet(INIT_MARKER)) marker = adoptProblem->getMarkers(); @@ -197,8 +198,8 @@ namespace AMDiS { &globalRefinements); #endif - bool initMesh = initFlag.isSet(INIT_MESH) || - (adoptProblem && adoptFlag.isSet(INIT_MESH)); + bool initMesh = initFlag.isSet(INIT_MESH); + // || (adoptProblem && adoptFlag.isSet(INIT_MESH)); // Initialize the meshes if there is no serialization file. diff --git a/AMDiS/src/VtkWriter.cc b/AMDiS/src/VtkWriter.cc index 45a033ed..d4eab046 100644 --- a/AMDiS/src/VtkWriter.cc +++ b/AMDiS/src/VtkWriter.cc @@ -68,8 +68,6 @@ namespace AMDiS { swapfile.close(); } file.push(boost::iostreams::file_descriptor_sink(name, std::ios::trunc)); -// std::ofstream file; -// file.open(name.c_str()); file << "<?xml version=\"1.0\"?>\n"; file << "<VTKFile type=\"PUnstructuredGrid\">\n"; @@ -102,8 +100,6 @@ namespace AMDiS { file << " </PUnstructuredGrid>\n"; file << "</VTKFile>\n"; - -// file.close(); } @@ -121,8 +117,6 @@ namespace AMDiS { swapfile.close(); } file.push(boost::iostreams::file_descriptor_sink(animationFilename, std::ios::trunc)); -// std::ofstream file; -// file.open(animationFilename.c_str()); file << "<?xml version=\"1.0\"?>\n"; file << "<VTKFile type=\"Collection\" version=\"0.1\" >" << "\n"; @@ -140,8 +134,6 @@ namespace AMDiS { file << "</Collection>\n"; file << "</VTKFile>\n"; -// file.close(); - return 0; } -- GitLab