diff --git a/AMDiS/libtool b/AMDiS/libtool index 5fa952208c54f683e23d0f6c5d83d4893087593d..3b6673371f6b9a9c8f45abefeac61e4c5b70b66e 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host lenovo: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -82,13 +82,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="mpicc" +CC="gcc" # Is the compiler the GNU C compiler? with_gcc=yes @@ -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 " /usr/lib/gcc/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/ /lib/i486-linux-gnu/4.2.4/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.2.4/ /usr/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../ /lib/ /usr/lib/" | $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="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib " +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="" @@ -6763,7 +6763,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 lenovo: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -6801,13 +6801,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="mpiCC" +CC="g++" # Is the compiler the GNU C compiler? with_gcc=yes @@ -6893,7 +6893,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" @@ -6948,11 +6948,11 @@ striplib="strip --strip-unneeded" # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=`echo "/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.4/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/lib/gcc/i486-linux-gnu/4.2.4/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/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. @@ -6960,11 +6960,11 @@ predeps="" # Dependencies to place after the objects being linked to create a # shared library. -postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -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/local/lib -L/usr/lib/gcc/i486-linux-gnu/4.2.4 -L/usr/lib/gcc/i486-linux-gnu/4.2.4 -L/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.4/../../.." | $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" @@ -7044,10 +7044,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 " /usr/lib/gcc/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../i486-linux-gnu/4.2.4/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/ /lib/i486-linux-gnu/4.2.4/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.2.4/ /usr/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../ /lib/ /usr/lib/" | $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="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib " +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="" @@ -7071,7 +7071,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host lenovo: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7109,16 +7109,16 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="ifc" +CC="g77" # Is the compiler the GNU C compiler? -with_gcc= +with_gcc=yes gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'` gcc_ver=`gcc -dumpversion` @@ -7241,11 +7241,11 @@ old_archive_from_new_cmds="" old_archive_from_expsyms_cmds="" # Commands used to build and install a shared archive. -archive_cmds="\$CC -shared -nofor_main \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ - \$CC -shared -nofor_main \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" + \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" postinstall_cmds="" postuninstall_cmds="" @@ -7355,10 +7355,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 "" | $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="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib " +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="" diff --git a/AMDiS/src/Assembler.cc b/AMDiS/src/Assembler.cc index 6f816dabce66b58a30692803b94ca5404b758a98..ee9efcf6067a653ac3bbe573051a251ffb7a5b76 100644 --- a/AMDiS/src/Assembler.cc +++ b/AMDiS/src/Assembler.cc @@ -71,7 +71,7 @@ namespace AMDiS { if (zeroOrderAssembler) zeroOrderAssembler->calculateElementMatrix(elInfo, mat); - if (rememberElMat) + if (rememberElMat && &userMat != &elementMatrix) userMat += factor * elementMatrix; } diff --git a/AMDiS/src/ChangeLog b/AMDiS/src/ChangeLog deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/AMDiS/src/DOFMatrix.cc b/AMDiS/src/DOFMatrix.cc index 632551fbf0a7374d78dfb4c3f857705e7946deec..bd206eb2cb75dc166e96f22d31aa26bd69e03c71 100644 --- a/AMDiS/src/DOFMatrix.cc +++ b/AMDiS/src/DOFMatrix.cc @@ -270,9 +270,9 @@ namespace AMDiS { std::vector<double*>::iterator factorIt = operatorFactor.begin(); for (; it != operators.end(); ++it, ++factorIt) { if ((*it)->getNeedDualTraverse() == false) { - (*it)->getElementMatrix(elInfo, - elementMatrix, - *factorIt ? **factorIt : 1.0); + (*it)->getElementMatrix(elInfo, + elementMatrix, + *factorIt ? **factorIt : 1.0); } } diff --git a/AMDiS/src/OEMSolver.h b/AMDiS/src/OEMSolver.h index 8c57763a63eef46061d93209957fc2371291ce0f..a4d964ae23d62db44e2b188e00d72cc47a49138c 100644 --- a/AMDiS/src/OEMSolver.h +++ b/AMDiS/src/OEMSolver.h @@ -121,9 +121,24 @@ namespace AMDiS { DOFVector<double>& x, DOFVector<double>& b) { - mtl::dense_vector<value_type> xx(x.getUsedSize(), &x[0]), - bb(b.getUsedSize(), &b[0]); - return solveSystem(A.getMatrix(), xx, bb); + mtl::dense_vector<value_type> xx(x.getUsedSize()), + bb(b.getUsedSize()); + + // Copy rhs vector + int counter = 0; + DOFVector<double>::Iterator it_b(&b, USED_DOFS); + for (it_b.reset(); !it_b.end(); ++it_b) + bb[counter++] = *it_b; + + int r = solveSystem(A.getMatrix(), xx, bb); + + // Copy solution vector to DOFVector + counter = 0; + DOFVector<double>::Iterator it_x(&x, USED_DOFS); + for (it_x.reset(); !it_x.end(); ++it_x) + *it_x = xx[counter++]; + + return r; } /// Solve a linear system for a vectorial problem. @@ -150,6 +165,7 @@ namespace AMDiS { for (it.reset(); !it.end(); ++it) *it = xx[counter++]; } + return r; } diff --git a/AMDiS/src/ProblemScal.cc b/AMDiS/src/ProblemScal.cc index 841dfd6200687703b51961cb1e8bea8b2be47564..5306b30f58d1bbbcafee931b750de6db474a2cca 100644 --- a/AMDiS/src/ProblemScal.cc +++ b/AMDiS/src/ProblemScal.cc @@ -553,7 +553,7 @@ namespace AMDiS { if (num_rows(base_matrix) != 0) nnz_per_row= int(double(base_matrix.nnz()) / num_rows(base_matrix) * 1.2); if (nnz_per_row < 5) - nnz_per_row= 5; + nnz_per_row= 5; // Correct dimensionality of matrix base_matrix.change_dim(feSpace->getAdmin()->getUsedSize(), @@ -590,9 +590,8 @@ namespace AMDiS { systemMatrix->assemble(1.0, elInfo, bound); rhs->assemble(1.0, elInfo, bound); - if (useGetBound) { + if (useGetBound) FREE_MEMORY(bound, BoundaryType, feSpace->getBasisFcts()->getNumber()); - } if (systemMatrix->getBoundaryManager()) systemMatrix->getBoundaryManager()->fillBoundaryConditions(elInfo, systemMatrix); diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index e59fe7c93e123ca3883133d28f0aeeee389ac9d2..1226a8e731c893dc65da71884be55a1528f7102e 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -508,7 +508,6 @@ namespace AMDiS { TIME_USED(first, clock())); #endif - adaptInfo->setSolverIterations(iter); adaptInfo->setMaxSolverIterations(solver->getMaxIterations()); adaptInfo->setSolverTolerance(solver->getTolerance()); @@ -651,10 +650,8 @@ namespace AMDiS { Mesh::FILL_GRD_LAMBDA | Mesh::FILL_NEIGH; - if (useGetBound) { + if (useGetBound) assembleFlag |= Mesh::FILL_BOUND; - } - for (int i = 0; i < nComponents; i++) { MSG("%d DOFs for %s\n", @@ -669,13 +666,15 @@ namespace AMDiS { int nnz_per_row= 0; if (num_rows(base_matrix) != 0) - nnz_per_row= int(double(base_matrix.nnz()) / num_rows(base_matrix) * 1.2); + nnz_per_row= int(double(base_matrix.nnz()) / num_rows(base_matrix) * 1.2); if (nnz_per_row < 5) - nnz_per_row= 5; + nnz_per_row= 5; // Correct dimensionality of matrix base_matrix.change_dim(componentSpaces[i]->getAdmin()->getUsedSize(), componentSpaces[j]->getAdmin()->getUsedSize()); + + set_to_zero(base_matrix); // Reuse old sparsity information (if available) or default // dof_matrix->startInsertion(nnz_per_row); @@ -797,14 +796,9 @@ namespace AMDiS { nnz += (*systemMatrix)[i][j]->getBaseMatrix().nnz(); } - // clock_t first1 = clock(); solverMatrix.setMatrix(*systemMatrix); - // clock_t first2 = clock(); - createPrecon(); - // clock_t first3 = clock(); - // std::cout << "T1 = " << TIME_USED(first1, first2) << std::endl; - // std::cout << "T2 = " << TIME_USED(first2, first3) << std::endl; + createPrecon(); INFO(info, 8)("fillin of assembled matrix: %d\n", nnz); @@ -814,7 +808,7 @@ namespace AMDiS { #else INFO(info, 8)("buildAfterCoarsen needed %.5f seconds\n", TIME_USED(first, clock())); -#endif +#endif } void ProblemVec::createPrecon() @@ -825,13 +819,13 @@ namespace AMDiS { CreatorInterface<ITL_BasePreconditioner> *preconCreator = CreatorMap<ITL_BasePreconditioner>::getCreator(preconType); - solver->setLeftPrecon( preconCreator->create(solverMatrix.getMatrix()) ); + solver->setLeftPrecon(preconCreator->create(solverMatrix.getMatrix())); preconType= "no"; GET_PARAMETER(0, name + "->solver->right precon", &preconType); preconCreator = CreatorMap<ITL_BasePreconditioner>::getCreator(preconType); - solver->setRightPrecon( preconCreator->create(solverMatrix.getMatrix()) ); + solver->setRightPrecon(preconCreator->create(solverMatrix.getMatrix())); } @@ -1115,8 +1109,9 @@ namespace AMDiS { if (useGetBound) FREE_MEMORY(bound, BoundaryType, basisFcts->getNumber()); - + } // pragma omp parallel + } void ProblemVec::assembleOnDifMeshes(FiniteElemSpace *rowFeSpace, diff --git a/AMDiS/src/ProblemVec.h b/AMDiS/src/ProblemVec.h index 03a644509e514f807b65f6f02de537532db92567..da66a0dd4dec63b916ee1e4481910103426cee7b 100644 --- a/AMDiS/src/ProblemVec.h +++ b/AMDiS/src/ProblemVec.h @@ -24,7 +24,6 @@ #include <vector> #include <list> - #include "AMDiS_fwd.h" #include "ProblemStatBase.h" #include "Parameters.h" @@ -257,8 +256,6 @@ namespace AMDiS { Mesh *mesh, Flag assembleFlag); - // ===== getting-methods ====================================================== - /** \name getting methods * \{ */ @@ -361,8 +358,6 @@ namespace AMDiS { /** \} */ - // ===== setting-methods ====================================================== - /** \name setting methods * \{ */ @@ -421,8 +416,6 @@ namespace AMDiS { */ void writeResidualMesh(int comp, AdaptInfo *adaptInfo, const std::string name); - // ===== Serializable implementation ===== - /// Function that implements the serialization procedure. virtual void serialize(std::ostream &out); diff --git a/AMDiS/src/SolverMatrix.h b/AMDiS/src/SolverMatrix.h index 91c72d93fa1566f09ebc3e7dbbb77fa528dbbf4f..8e6fef89e7e19176f84be86e73bae4ed49d9896d 100644 --- a/AMDiS/src/SolverMatrix.h +++ b/AMDiS/src/SolverMatrix.h @@ -22,16 +22,10 @@ #ifndef AMDIS_SOLVERMATRIX_H #define AMDIS_SOLVERMATRIX_H - #include "DOFMatrix.h" - namespace AMDiS { - // ============================================================================ - // ===== class SolverMatrix =================================================== - // ============================================================================ - /** * \brief Helper class to provide complete matrix for ITL solvers and preconditioners */