Commit 70c01bd2 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

corrections of last upload

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