Commit 168c0db7 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Bugfixes ...

parent 96d3f3e2
......@@ -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=""
......
......@@ -71,7 +71,7 @@ namespace AMDiS {
if (zeroOrderAssembler)
zeroOrderAssembler->calculateElementMatrix(elInfo, mat);
if (rememberElMat)
if (rememberElMat && &userMat != &elementMatrix)
userMat += factor * elementMatrix;
}
......
......@@ -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);
}
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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
*/
......
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