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

corrections of last upload

parent bfc646be
......@@ -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")
......
......@@ -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})
......
......@@ -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)
......@@ -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]);
......
......@@ -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_
......@@ -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);
}
......
......@@ -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
......
......@@ -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]));
}
......
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