diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt index 426e439d1a8382a60e299434a22f9a15cdb3bd33..a2ab1b1fa6ded4d0bb65afca1ced8c97c1d8dd5c 100644 --- a/AMDiS/CMakeLists.txt +++ b/AMDiS/CMakeLists.txt @@ -20,12 +20,12 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG=1> $<$<CONFIG:Release>:DEBUG=0>) -find_package(Subversion) -if(Subversion_FOUND) - Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} svn_info) - #message("svn-rev: ${svn_info_WC_REVISION}") - set(AMDIS_SUB_MINOR "${svn_info_WC_REVISION}") -endif() +# find_package(Subversion QUIET) +# if(Subversion_FOUND) +# Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} svn_info) +# #message("svn-rev: ${svn_info_WC_REVISION}") +# set(AMDIS_SUB_MINOR "${svn_info_WC_REVISION}") +# endif() set(CurrentRevision "0.9") if(NOT AMDIS_MAJOR) set(AMDIS_MAJOR "0") diff --git a/AMDiS/cmake/CTestConfig.cmake b/AMDiS/CTestConfig.cmake similarity index 100% rename from AMDiS/cmake/CTestConfig.cmake rename to AMDiS/CTestConfig.cmake diff --git a/AMDiS/cmake/AMDISConfig.cmake.in b/AMDiS/cmake/AMDISConfig.cmake.in index 36b160de7c75f5b17f06de059192070401ca0a60..dcbdf8db1be8c205f9c9acf3d22130d5ffd46006 100644 --- a/AMDiS/cmake/AMDISConfig.cmake.in +++ b/AMDiS/cmake/AMDISConfig.cmake.in @@ -61,10 +61,13 @@ unset(_AMDIS_LIB CACHE) set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@) set(AMDIS_NEED_COMPRESSION @ENABLE_COMPRESSION@) -set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time zlib) -if(WIN32 AND AMDIS_NEED_COMPRESSION) - list(APPEND BOOST_LIBS_REQUIRED bzip2) -endif(WIN32 AND AMDIS_NEED_COMPRESSION) +set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time) +if(WIN32) + list(APPEND BOOST_LIBS_REQUIRED zlib) + if (AMDIS_NEED_COMPRESSION) + list(APPEND BOOST_LIBS_REQUIRED bzip2) + endif () +endif() set(BOOST_VERSION "1.42") if(AMDIS_HAS_PARALLEL_DOMAIN) @@ -110,7 +113,7 @@ set(AMDIS_COMPILEFLAGS "@COMPILEFLAGS@") set(AMDIS_VERSION @CurrentRevision@) set(AMDIS_MAJOR_VERSION @AMDIS_MAJOR@) set(AMDIS_MINOR_VERSION @AMDIS_MINOR@) -set(AMDIS_SUB_MINOR_VERSION @AMDIS_SUB_MINOR@) +#set(AMDIS_SUB_MINOR_VERSION @AMDIS_SUB_MINOR@) if(CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Release") @@ -291,7 +294,7 @@ if(AMDIS_NEED_UMFPACK) if (WIN32) set(SuiteSparse_USE_LAPACK_BLAS ON) endif (WIN32) - find_package(SuiteSparse) + find_package(SuiteSparse QUIET) if (SuiteSparse_FOUND) include(${USE_SuiteSparse}) diff --git a/AMDiS/cmake/enable_umfpack.cmake b/AMDiS/cmake/enable_umfpack.cmake index 085358a10fb05ef1788861722bd864a59d7d3556..10e5b15988f50e9621b8974b98f548ae31d6be60 100644 --- a/AMDiS/cmake/enable_umfpack.cmake +++ b/AMDiS/cmake/enable_umfpack.cmake @@ -3,7 +3,8 @@ if (ENABLE_UMFPACK) if (WIN32) set(SuiteSparse_USE_LAPACK_BLAS ON) endif (WIN32) - find_package(SuiteSparse) + # try to use a cmake-package of suitesparse + find_package(SuiteSparse QUIET) if (SuiteSparse_FOUND) include(${USE_SuiteSparse}) @@ -20,5 +21,5 @@ if (ENABLE_UMFPACK) message(FATAL_ERROR "Could not find the UMFPACK header umfpack.h.") endif() endif (SuiteSparse_FOUND) - SET(RPM_DEPEND_STR "blas") + SET(RPM_DEPEND_STR "blas") endif (ENABLE_UMFPACK) diff --git a/AMDiS/src/DOFVector.hh b/AMDiS/src/DOFVector.hh index fe319b301d72938948e044c391f46a32a47eec63..4c229e78bc3fed3acf22cf7bb23774cc3f0c734e 100644 --- a/AMDiS/src/DOFVector.hh +++ b/AMDiS/src/DOFVector.hh @@ -1036,13 +1036,13 @@ namespace AMDiS { template<typename T> void DOFVector<T>::refineInterpolImpl(RCNeighbourList& list, int n, id<double>) { - switch (refineOperation) { + switch (DOFIndexedBase::refineOperation) { case NO_OPERATION: return; break; case REFINE_INTERPOL: default: - (const_cast<BasisFunction*>(feSpace->getBasisFcts()))->refineInter(this, &list, n); + (const_cast<BasisFunction*>(this->feSpace->getBasisFcts()))->refineInter(this, &list, n); break; } } @@ -1051,17 +1051,17 @@ namespace AMDiS { template<typename T> void DOFVector<T>::refineInterpolImpl(RCNeighbourList& list, int n, id<WorldVector<double> >) { - if (refineOperation == NO_OPERATION) + if (DOFIndexedBase::refineOperation == NO_OPERATION) return; if (n < 1) return; Element *el = list.getElement(0); - int n0 = feSpace->getAdmin()->getNumberOfPreDofs(VERTEX); + int n0 = this->feSpace->getAdmin()->getNumberOfPreDofs(VERTEX); DegreeOfFreedom dof0 = el->getDof(0, n0); DegreeOfFreedom dof1 = el->getDof(1, n0); - DegreeOfFreedom dof_new = el->getChild(0)->getDof(feSpace->getMesh()->getDim(), n0); + DegreeOfFreedom dof_new = el->getChild(0)->getDof(this->feSpace->getMesh()->getDim(), n0); vec[dof_new] = vec[dof0]; vec[dof_new] += vec[dof1]; vec[dof_new] *= 0.5; @@ -1073,8 +1073,8 @@ namespace AMDiS { double DOFVector<T>::evalAtPointImpl(WorldVector<double> const& p, ElInfo *oldElInfo, id<double>) const { - Mesh *mesh = feSpace->getMesh(); - const BasisFunction *basFcts = feSpace->getBasisFcts(); + Mesh *mesh = this->feSpace->getMesh(); + const BasisFunction *basFcts = this->feSpace->getBasisFcts(); int dim = mesh->getDim(); int nBasFcts = basFcts->getNumber(); @@ -1096,7 +1096,7 @@ namespace AMDiS { oldElInfo = elInfo; if (inside) { - basFcts->getLocalIndices(elInfo->getElement(), feSpace->getAdmin(), localIndices); + basFcts->getLocalIndices(elInfo->getElement(), this->feSpace->getAdmin(), localIndices); ElementVector uh(nBasFcts); for (int i = 0; i < nBasFcts; i++) uh[i] = operator[](localIndices[i]); @@ -1124,8 +1124,8 @@ namespace AMDiS { WorldVector<double> DOFVector<T>::evalAtPointImpl(WorldVector<double> const& p, ElInfo *oldElInfo, id<WorldVector<double> >) const { - Mesh *mesh = feSpace->getMesh(); - const BasisFunction *basFcts = feSpace->getBasisFcts(); + Mesh *mesh = this->feSpace->getMesh(); + const BasisFunction *basFcts = this->feSpace->getBasisFcts(); int dim = mesh->getDim(); int nBasFcts = basFcts->getNumber(); @@ -1146,7 +1146,7 @@ namespace AMDiS { oldElInfo = elInfo; if (inside) { - basFcts->getLocalIndices(elInfo->getElement(), feSpace->getAdmin(), localIndices); + basFcts->getLocalIndices(elInfo->getElement(), this->feSpace->getAdmin(), localIndices); mtl::dense_vector<WorldVector<double> > uh(nBasFcts); for (int i = 0; i < nBasFcts; i++) uh[i] = operator[](localIndices[i]); diff --git a/AMDiS/src/FixVecConvert.h b/AMDiS/src/FixVecConvert.h index dcf352f784e41c18ece6c5bf15c876e580c23b02..d6fa6fbc022307f0c7b99cb4ff147eab8137a035 100644 --- a/AMDiS/src/FixVecConvert.h +++ b/AMDiS/src/FixVecConvert.h @@ -23,7 +23,7 @@ /** \file FixVecConvert.h */ #ifndef AMDIS_FIXVECCONVERT_H_ -#define AMSID_FIXVECCONVERT_H_ +#define AMDIS_FIXVECCONVERT_H_ #include "Global.h" @@ -42,4 +42,4 @@ namespace AMDiS { } -#endif +#endif // AMDIS_FIXVECCONVERT_H_ diff --git a/AMDiS/src/ProblemStat.cc b/AMDiS/src/ProblemStat.cc index 741025d4411a73dfdf955ca6f40d1cf9f0b6c29f..5fe1c12a670623fe0b6f2043120a21ffe95db37f 100644 --- a/AMDiS/src/ProblemStat.cc +++ b/AMDiS/src/ProblemStat.cc @@ -1194,7 +1194,7 @@ namespace AMDiS { matrix->assemble2(1.0, mainElInfo, auxElInfo, dualElInfo.smallElInfo, dualElInfo.largeElInfo, bound); - if (componentMeshes[i] == meshes[0] && newEl0 || componentMeshes[i] == meshes[1] && newEl1) + if ((componentMeshes[i] == meshes[0] && newEl0) || (componentMeshes[i] == meshes[1] && newEl1)) if (matrix && matrix->getBoundaryManager()) matrix->getBoundaryManager()->fillBoundaryConditions(mainElInfo, matrix); @@ -1220,7 +1220,7 @@ namespace AMDiS { matrix->assemble(1.0, rowElInfo, colElInfo, dualElInfo.smallElInfo, dualElInfo.largeElInfo, bound); - if (componentMeshes[i] == meshes[0] && newEl0 || componentMeshes[i] == meshes[1] && newEl1) + if ((componentMeshes[i] == meshes[0] && newEl0) || (componentMeshes[i] == meshes[1] && newEl1)) if (matrix->getBoundaryManager()) matrix->getBoundaryManager()->fillBoundaryConditions(rowElInfo, matrix); } diff --git a/AMDiS/src/io/detail/Arh3Reader.cc b/AMDiS/src/io/detail/Arh3Reader.cc index a8bb436562d3d92047599306a868470f1917db34..d97fd865d592ac9e649cfd849f360968a6d6b339 100644 --- a/AMDiS/src/io/detail/Arh3Reader.cc +++ b/AMDiS/src/io/detail/Arh3Reader.cc @@ -627,7 +627,7 @@ namespace AMDiS { namespace io { } } } else { - for (nProc_f; nProc_f < nProcs + 1; nProc_f++) { + for (nProc_f = 0; nProc_f < nProcs + 1; nProc_f++) { string fn = filenameWithoutExt + "_p" + boost::lexical_cast<string>(nProc_f) + ".arh"; if(!boost::filesystem::exists(fn)) break; } @@ -643,9 +643,10 @@ namespace AMDiS { namespace io { TEST_EXIT(nProc_f == nProcs) ("Number of arh files doesn't match number of processors: %d vs %d\n", nProc_f, nProcs); - if (parhExists) + if (parhExists) { TEST_EXIT(nProc_f == nProcs_) ("Number of arh files doesn't match the label in parh file: %d vs %d", nProc_f, nProcs_); + } if (!parhExists) { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS diff --git a/extensions/Refinement.h b/extensions/Refinement.h index 9069e5b49647843d1480a78c9bd3fa9ff7e6588f..931e6c37fe6169685577b5099520432e3324dcc9 100644 --- a/extensions/Refinement.h +++ b/extensions/Refinement.h @@ -205,8 +205,8 @@ public: FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT); coords = elInfo->getCoords(); double h = 0.0; - for (int i = 0; i < coords.size(); i++) { - for (int j = 0; j < coords.size(); j++) { + for (int i = 0; i < coords.getSize(); i++) { + for (int j = 0; j < coords.getSize(); j++) { if (i != j) h = std::max(h,norm(coords[i]-coords[j])); }