Commit 209f7b44 authored by Praetorius, Simon's avatar Praetorius, Simon

changed DEBUG to NOT NDEBUG and removed separate debug target from cmake

parent a877b6da
...@@ -19,11 +19,6 @@ endif() ...@@ -19,11 +19,6 @@ endif()
#TODO: use the cmake build type #TODO: use the cmake build type
SET(MTL_INCLUDE_DIR ${LIB_DIR}/mtl4/ CACHE PATH "mtl4 directory") SET(MTL_INCLUDE_DIR ${LIB_DIR}/mtl4/ CACHE PATH "mtl4 directory")
# set global compile_definitions for all target, depending on build-type
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:Debug>:DEBUG=1>
$<$<CONFIG:Release>:DEBUG=0>)
# find_package(Subversion QUIET) # 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)
......
...@@ -39,9 +39,7 @@ set(CMAKE_BUILD_TYPE @CMAKE_BUILD_TYPE@) ...@@ -39,9 +39,7 @@ set(CMAKE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
add_library(amdis_base INTERFACE) add_library(amdis_base INTERFACE)
add_library(AMDiS ALIAS amdis_base) add_library(AMDiS ALIAS amdis_base)
target_compile_definitions(amdis_base INTERFACE target_compile_definitions(amdis_base INTERFACE)
$<$<CONFIG:Release>:DEBUG=0>
$<$<NOT:$<CONFIG:Release>>:DEBUG=1>)
if (AMDIS_NEED_CXX11) if (AMDIS_NEED_CXX11)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
......
...@@ -204,10 +204,7 @@ add_library(amdis ...@@ -204,10 +204,7 @@ add_library(amdis
${SOURCE_DIR}/time/RosenbrockAdaptInstationary.cc ${SOURCE_DIR}/time/RosenbrockAdaptInstationary.cc
${SOURCE_DIR}/time/RosenbrockMethod.cc ${SOURCE_DIR}/time/RosenbrockMethod.cc
${SOURCE_DIR}/time/RosenbrockStationary.cc ${SOURCE_DIR}/time/RosenbrockStationary.cc
) # debugging files
add_library(amdis_debug INTERFACE)
target_sources(amdis_debug INTERFACE
${SOURCE_DIR}/Debug.cc ${SOURCE_DIR}/Debug.cc
${SOURCE_DIR}/GlobalDOFNumbering.cc # not used by any other class ${SOURCE_DIR}/GlobalDOFNumbering.cc # not used by any other class
${SOURCE_DIR}/GlobalElementNumbering.cc # not used by any other class ${SOURCE_DIR}/GlobalElementNumbering.cc # not used by any other class
...@@ -244,8 +241,7 @@ if (MSVC) ...@@ -244,8 +241,7 @@ if (MSVC)
_CRT_SECURE_NO_WARNINGS) _CRT_SECURE_NO_WARNINGS)
endif (MSVC) endif (MSVC)
target_link_libraries(amdis AMDiS::base muparser target_link_libraries(amdis AMDiS::base muparser)
$<$<CONFIG:Debug>:amdis_debug>)
# specify how to install this target: # specify how to install this target:
# ----------------------------------- # -----------------------------------
......
...@@ -14,6 +14,7 @@ if (ENABLE_PARALLEL_DOMAIN) ...@@ -14,6 +14,7 @@ if (ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/MeshManipulation.cc ${SOURCE_DIR}/parallel/MeshManipulation.cc
${SOURCE_DIR}/parallel/MeshPartitioner.cc ${SOURCE_DIR}/parallel/MeshPartitioner.cc
${SOURCE_DIR}/parallel/MpiHelper.cc ${SOURCE_DIR}/parallel/MpiHelper.cc
${SOURCE_DIR}/parallel/ParallelDebug.cc
${SOURCE_DIR}/parallel/ParallelDofMapping.cc ${SOURCE_DIR}/parallel/ParallelDofMapping.cc
${SOURCE_DIR}/parallel/ParallelProblemStat.cc ${SOURCE_DIR}/parallel/ParallelProblemStat.cc
${SOURCE_DIR}/parallel/ParallelSolver.cc ${SOURCE_DIR}/parallel/ParallelSolver.cc
...@@ -22,10 +23,6 @@ if (ENABLE_PARALLEL_DOMAIN) ...@@ -22,10 +23,6 @@ if (ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/StdMpi.cc ${SOURCE_DIR}/parallel/StdMpi.cc
) )
target_sources(amdis_debug INTERFACE
${SOURCE_DIR}/parallel/ParallelDebug.cc
)
target_compile_definitions(amdis_parallel INTERFACE target_compile_definitions(amdis_parallel INTERFACE
HAVE_PARALLEL_DOMAIN_AMDIS=1) HAVE_PARALLEL_DOMAIN_AMDIS=1)
......
...@@ -73,7 +73,7 @@ namespace AMDiS { ...@@ -73,7 +73,7 @@ namespace AMDiS {
if (obj0.subObj == EDGE) { if (obj0.subObj == EDGE) {
int el0_v0 = obj0.el->getVertexOfEdge(obj0.ithObj, 0); int el0_v0 = obj0.el->getVertexOfEdge(obj0.ithObj, 0);
int el1_v0 = obj0.el->getVertexOfEdge(obj1.ithObj, 0); int el1_v0 = obj0.el->getVertexOfEdge(obj1.ithObj, 0);
#if DEBUG != 0 #ifndef NDEBUG
int el0_v1 = obj0.el->getVertexOfEdge(obj0.ithObj, 1); int el0_v1 = obj0.el->getVertexOfEdge(obj0.ithObj, 1);
int el1_v1 = obj0.el->getVertexOfEdge(obj1.ithObj, 1); int el1_v1 = obj0.el->getVertexOfEdge(obj1.ithObj, 1);
#endif #endif
......
...@@ -29,15 +29,6 @@ ...@@ -29,15 +29,6 @@
#define AMDIS_VERSION "AMDiS: Version 0.9.1" #define AMDIS_VERSION "AMDiS: Version 0.9.1"
#endif #endif
#ifdef DEBUG
#undef DEBUG
#endif
#ifdef NDEBUG
#define DEBUG 0
#else
#define DEBUG 1
#endif
#include <boost/config.hpp> #include <boost/config.hpp>
#define CACHE_LINE 16 #define CACHE_LINE 16
......
...@@ -122,7 +122,7 @@ namespace AMDiS { ...@@ -122,7 +122,7 @@ namespace AMDiS {
feSpaces.resize(0); feSpaces.resize(0);
} }
#if DEBUG #ifndef NDEBUG
FiniteElemSpace* FiniteElemSpace::provideFeSpace(Mesh *mesh) FiniteElemSpace* FiniteElemSpace::provideFeSpace(Mesh *mesh)
{ {
FUNCNAME("FiniteElemSpace::provideFeSpace()"); FUNCNAME("FiniteElemSpace::provideFeSpace()");
......
...@@ -53,7 +53,7 @@ namespace AMDiS { ...@@ -53,7 +53,7 @@ namespace AMDiS {
static void destroyFeSpaces(); static void destroyFeSpaces();
#if DEBUG #ifndef NDEBUG
/// For debugging it may be useful to get some FE space for a given mesh at a /// For debugging it may be useful to get some FE space for a given mesh at a
/// position in code where it is not possible to access the FE space directly. The /// position in code where it is not possible to access the FE space directly. The
/// function assumes that there is only one FE space defined for the mesh. /// function assumes that there is only one FE space defined for the mesh.
......
...@@ -187,7 +187,7 @@ namespace AMDiS { ...@@ -187,7 +187,7 @@ namespace AMDiS {
vsprintf(buff, format, arg); vsprintf(buff, format, arg);
PRINT_LINE((*error), buff); PRINT_LINE((*error), buff);
va_end(arg); va_end(arg);
#if defined HAVE_PARALLEL_DOMAIN_AMDIS && !defined HAVE_PARALLEL_MTL4 && (DEBUG == 0 || defined NDEBUG) #if defined HAVE_PARALLEL_DOMAIN_AMDIS && !defined HAVE_PARALLEL_MTL4 && (defined NDEBUG)
#if (PETSC_VERSION_MINOR >= 5) #if (PETSC_VERSION_MINOR >= 5)
PetscError(MPI_COMM_WORLD, __LINE__, "Msg::print_error_exit", "Global.cc", 1, PETSC_ERROR_INITIAL, buff); PetscError(MPI_COMM_WORLD, __LINE__, "Msg::print_error_exit", "Global.cc", 1, PETSC_ERROR_INITIAL, buff);
#else #else
...@@ -220,11 +220,9 @@ namespace AMDiS { ...@@ -220,11 +220,9 @@ namespace AMDiS {
const char *file, const char *file,
int line) int line)
{ {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS #if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(NDEBUG)
#if (DEBUG == 0)
if (outputMainRank && MPI::COMM_WORLD.Get_rank() != 0) if (outputMainRank && MPI::COMM_WORLD.Get_rank() != 0)
return; return;
#endif
#endif #endif
static int old_line = -1; static int old_line = -1;
...@@ -256,11 +254,9 @@ namespace AMDiS { ...@@ -256,11 +254,9 @@ namespace AMDiS {
void Msg::print_warn(const char *format, ...) void Msg::print_warn(const char *format, ...)
{ {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS #if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(NDEBUG)
#if (DEBUG == 0)
if (outputMainRank && MPI::COMM_WORLD.Get_rank() != 0) if (outputMainRank && MPI::COMM_WORLD.Get_rank() != 0)
return; return;
#endif
#endif #endif
va_list arg; va_list arg;
char buff[255]; char buff[255];
......
...@@ -1161,7 +1161,7 @@ namespace AMDiS { ...@@ -1161,7 +1161,7 @@ namespace AMDiS {
in >> name; in >> name;
in.get(); in.get();
#if DEBUG != 0 #ifndef NDEBUG
int oldVal = dim; int oldVal = dim;
#endif #endif
SerUtil::deserialize(in, dim); SerUtil::deserialize(in, dim);
...@@ -1178,7 +1178,7 @@ namespace AMDiS { ...@@ -1178,7 +1178,7 @@ namespace AMDiS {
SerUtil::deserialize(in, preserveCoarseDOFs); SerUtil::deserialize(in, preserveCoarseDOFs);
#if DEBUG != 0 #ifndef NDEBUG
oldVal = nDofEl; oldVal = nDofEl;
#endif #endif
SerUtil::deserialize(in, nDofEl); SerUtil::deserialize(in, nDofEl);
...@@ -1186,7 +1186,7 @@ namespace AMDiS { ...@@ -1186,7 +1186,7 @@ namespace AMDiS {
nDof.deserialize(in); nDof.deserialize(in);
#if DEBUG != 0 #ifndef NDEBUG
oldVal = nNodeEl; oldVal = nNodeEl;
#endif #endif
SerUtil::deserialize(in, nNodeEl); SerUtil::deserialize(in, nNodeEl);
......
...@@ -280,23 +280,23 @@ namespace AMDiS { ...@@ -280,23 +280,23 @@ namespace AMDiS {
bool cont = true; bool cont = true;
while (cont) { while (cont) {
bool cont1; bool cont1;
#if DEBUG != 0 #ifndef NDEBUG
bool cont2; bool cont2;
#endif #endif
if (structure1->isLeafElement() == structure2->isLeafElement()) { if (structure1->isLeafElement() == structure2->isLeafElement()) {
cont1 = structure1->nextElement(result); cont1 = structure1->nextElement(result);
#if DEBUG != 0 #ifndef NDEBUG
cont2 = structure2->nextElement(); cont2 = structure2->nextElement();
#endif #endif
} else { } else {
if (structure1->isLeafElement()) { if (structure1->isLeafElement()) {
cont1 = structure1->nextElement(); cont1 = structure1->nextElement();
#if DEBUG != 0 #ifndef NDEBUG
cont2 = structure2->skipBranch(result); cont2 = structure2->skipBranch(result);
#endif #endif
} else { } else {
cont1 = structure1->skipBranch(result); cont1 = structure1->skipBranch(result);
#if DEBUG != 0 #ifndef NDEBUG
cont2 = structure2->nextElement(); cont2 = structure2->nextElement();
#endif #endif
} }
...@@ -385,7 +385,7 @@ namespace AMDiS { ...@@ -385,7 +385,7 @@ namespace AMDiS {
} }
if (!finished) { if (!finished) {
#if (DEBUG != 0) #ifndef NDEBUG
int oldMeshIndex = mesh->getChangeIndex(); int oldMeshIndex = mesh->getChangeIndex();
#endif #endif
...@@ -394,7 +394,7 @@ namespace AMDiS { ...@@ -394,7 +394,7 @@ namespace AMDiS {
else else
manager->refineMacroElement(mesh, macroElIndex); manager->refineMacroElement(mesh, macroElIndex);
#if (DEBUG != 0) #ifndef NDEBUG
TEST_EXIT(oldMeshIndex != mesh->getChangeIndex()) TEST_EXIT(oldMeshIndex != mesh->getChangeIndex())
("Mesh has not been changed by refinement procedure!\n"); ("Mesh has not been changed by refinement procedure!\n");
#endif #endif
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
#include "Global.h" #include "Global.h"
#include "BoundaryObject.h" #include "BoundaryObject.h"
#if (DEBUG != 0) #ifndef NDEBUG
#define WITH_ELINDEX true #define WITH_ELINDEX true
#else #else
#define WITH_ELINDEX false #define WITH_ELINDEX false
#endif #endif
namespace AMDiS { namespace AMDiS {
......
...@@ -47,7 +47,7 @@ namespace AMDiS { ...@@ -47,7 +47,7 @@ namespace AMDiS {
inline T& get() inline T& get()
{ {
#if (DEBUG != 0) #ifndef NDEBUG
if (omp_get_thread_num() >= data.size()) { if (omp_get_thread_num() >= data.size()) {
std::cout << "Error in ThreadPrivate::get()!\n"; std::cout << "Error in ThreadPrivate::get()!\n";
exit(0); exit(0);
...@@ -58,7 +58,7 @@ namespace AMDiS { ...@@ -58,7 +58,7 @@ namespace AMDiS {
inline void set(T& val) inline void set(T& val)
{ {
#if (DEBUG != 0) #ifndef NDEBUG
if (omp_get_thread_num() >= data.size()) { if (omp_get_thread_num() >= data.size()) {
std::cout << "Error in ThreadPrivate::set()!\n"; std::cout << "Error in ThreadPrivate::set()!\n";
exit(0); exit(0);
......
...@@ -422,7 +422,7 @@ namespace AMDiS { ...@@ -422,7 +422,7 @@ namespace AMDiS {
return true; return true;
int oppVertex = (*elInfo)->getOppVertex(localNeighbour); int oppVertex = (*elInfo)->getOppVertex(localNeighbour);
#if DEBUG #ifndef NDEBUG
int testIndex = (*elInfo)->getNeighbour(localNeighbour)->getIndex(); int testIndex = (*elInfo)->getNeighbour(localNeighbour)->getIndex();
#endif #endif
ElInfo *neighInfo = stack->traverseNeighbour3d((*elInfo), localNeighbour); ElInfo *neighInfo = stack->traverseNeighbour3d((*elInfo), localNeighbour);
...@@ -573,7 +573,7 @@ namespace AMDiS { ...@@ -573,7 +573,7 @@ namespace AMDiS {
if (neighInfo->getNeighbour(i)) { if (neighInfo->getNeighbour(i)) {
oppVertex = neighInfo->getOppVertex(i); oppVertex = neighInfo->getOppVertex(i);
#if DEBUG #ifndef NDEBUG
int testIndex = neighInfo->getNeighbour(i)->getIndex(); int testIndex = neighInfo->getNeighbour(i)->getIndex();
#endif #endif
...@@ -607,7 +607,7 @@ namespace AMDiS { ...@@ -607,7 +607,7 @@ namespace AMDiS {
("While looping back domains boundary was reached or i == 0\n"); ("While looping back domains boundary was reached or i == 0\n");
oppVertex = refineList.getOppVertex(i--, 0); oppVertex = refineList.getOppVertex(i--, 0);
#if DEBUG #ifndef NDEBUG
int testIndex = neighInfo->getNeighbour(oppVertex)->getIndex(); int testIndex = neighInfo->getNeighbour(oppVertex)->getIndex();
#endif #endif
neighInfo = stack->traverseNeighbour3d(neighInfo, oppVertex); neighInfo = stack->traverseNeighbour3d(neighInfo, oppVertex);
......
...@@ -194,7 +194,7 @@ namespace AMDiS { ...@@ -194,7 +194,7 @@ namespace AMDiS {
Parallel::InteriorBoundary &intBoundary = Parallel::InteriorBoundary &intBoundary =
Parallel::MeshDistributor::globalMeshDistributor->getIntBoundary(0); Parallel::MeshDistributor::globalMeshDistributor->getIntBoundary(0);
#if (DEBUG != 0) #ifndef NDEBUG
// Make sure interior boundary is correct // Make sure interior boundary is correct
Parallel::ParallelDebug::testInteriorBoundary(*(Parallel::MeshDistributor::globalMeshDistributor)); Parallel::ParallelDebug::testInteriorBoundary(*(Parallel::MeshDistributor::globalMeshDistributor));
#endif #endif
......
...@@ -228,7 +228,7 @@ namespace AMDiS { namespace io { ...@@ -228,7 +228,7 @@ namespace AMDiS { namespace io {
} }
for (int j = 0; j < dim; j++) { for (int j = 0; j < dim; j++) {
#ifdef DEBUG #ifndef NDEBUG
{ {
unsigned initData(melVertex[el1][verticesEl1[j]]); unsigned initData(melVertex[el1][verticesEl1[j]]);
unsigned oldData((*associated)[melVertex[el1][verticesEl1[j]]]); unsigned oldData((*associated)[melVertex[el1][verticesEl1[j]]]);
...@@ -272,7 +272,7 @@ namespace AMDiS { namespace io { ...@@ -272,7 +272,7 @@ namespace AMDiS { namespace io {
} }
} }
#if (DEBUG != 0) #ifndef NDEBUG
std::map<BoundaryType, VertexVector*>::iterator assoc; std::map<BoundaryType, VertexVector*>::iterator assoc;
std::map<BoundaryType, VertexVector*>::iterator assocEnd = std::map<BoundaryType, VertexVector*>::iterator assocEnd =
mesh->periodicAssociations.end(); mesh->periodicAssociations.end();
......
...@@ -54,7 +54,7 @@ namespace AMDiS { namespace Parallel { ...@@ -54,7 +54,7 @@ namespace AMDiS { namespace Parallel {
createContainer(mesh, boundary, boundary.getOwn(), sendDofs); createContainer(mesh, boundary, boundary.getOwn(), sendDofs);
createContainer(mesh, boundary, boundary.getOther(), recvDofs); createContainer(mesh, boundary, boundary.getOther(), recvDofs);
#if (DEBUG != 0) #ifndef NDEBUG
{ {
std::set<DegreeOfFreedom> sds; std::set<DegreeOfFreedom> sds;
for (DofComm::Iterator it(sendDofs, feSpaces[0]); for (DofComm::Iterator it(sendDofs, feSpaces[0]);
......
...@@ -452,7 +452,7 @@ namespace AMDiS { namespace Parallel { ...@@ -452,7 +452,7 @@ namespace AMDiS { namespace Parallel {
// === in a symmetric way, i.e., if A -> B for a specific boundary type, === // === in a symmetric way, i.e., if A -> B for a specific boundary type, ===
// === there must be a mapping B -> A with the same boundary type. === // === there must be a mapping B -> A with the same boundary type. ===
#if (DEBUG != 0) #ifndef NDEBUG
for (PerBoundMap<DegreeOfFreedom>::iterator it = periodicVertices.begin(); for (PerBoundMap<DegreeOfFreedom>::iterator it = periodicVertices.begin();
it != periodicVertices.end(); ++it) { it != periodicVertices.end(); ++it) {
pair<DegreeOfFreedom, DegreeOfFreedom> testVertex = pair<DegreeOfFreedom, DegreeOfFreedom> testVertex =
......
...@@ -334,7 +334,7 @@ namespace AMDiS { namespace Parallel { ...@@ -334,7 +334,7 @@ namespace AMDiS { namespace Parallel {
onnz[i] = std::min(onnz[i], nOverallCols - nRankCols); onnz[i] = std::min(onnz[i], nOverallCols - nRankCols);
} }
#if (DEBUG != 0) #ifndef NDEBUG
int nMax = 0; int nMax = 0;
int nSum = 0; int nSum = 0;
for (int i = 0; i < nRankRows; i++) { for (int i = 0; i < nRankRows; i++) {
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include "parallel/MeshDistributor.h" #include "parallel/MeshDistributor.h"
#include "parallel/MeshManipulation.h" #include "parallel/MeshManipulation.h"
#if (DEBUG != 0) #ifndef NDEBUG
#include "parallel/ParallelDebug.h" #include "parallel/ParallelDebug.h"
#endif #endif
#include "parallel/StdMpi.h" #include "parallel/StdMpi.h"
#include "parallel/MeshPartitioner.h" #include "parallel/MeshPartitioner.h"
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
#include "ProblemStat.h" #include "ProblemStat.h"
#include "ProblemInstat.h" #include "ProblemInstat.h"
#include "RefinementManager3d.h" #include "RefinementManager3d.h"
#if (DEBUG != 0) #ifndef NDEBUG
#include "Debug.h" #include "Debug.h"
#endif #endif
#include "Timer.h" #include "Timer.h"
#include "io/MacroReader.h" #include "io/MacroReader.h"
...@@ -264,7 +264,7 @@ namespace AMDiS { namespace Parallel { ...@@ -264,7 +264,7 @@ namespace AMDiS { namespace Parallel {
// already refined in some way. // already refined in some way.
testForMacroMesh(); testForMacroMesh();
#if (DEBUG != 0) #ifndef NDEBUG
// Check whether meshes come from the same macro mesh. The way is to compare // Check whether meshes come from the same macro mesh. The way is to compare
// the node coords of each macro element in the meshes. // the node coords of each macro element in the meshes.
debug::ElementIdxToCoords macroCoords; debug::ElementIdxToCoords macroCoords;
...@@ -297,7 +297,7 @@ namespace AMDiS { namespace Parallel { ...@@ -297,7 +297,7 @@ namespace AMDiS { namespace Parallel {
elObjDb.setData(partitionMap, levelData); elObjDb.setData(partitionMap, levelData);
#if (DEBUG != 0) #ifndef NDEBUG
TEST_EXIT_DBG(dofMaps.size())("No DOF mapping defined!\n"); TEST_EXIT_DBG(dofMaps.size())("No DOF mapping defined!\n");
ParallelDebug::writeDebugFile(feSpaces[feSpaces.size() - 1], ParallelDebug::writeDebugFile(feSpaces[feSpaces.size() - 1],
*(dofMaps[0]), *(dofMaps[0]),
...@@ -313,7 +313,7 @@ namespace AMDiS { namespace Parallel { ...@@ -313,7 +313,7 @@ namespace AMDiS { namespace Parallel {
createInitialPartitioning(); createInitialPartitioning();
#if (DEBUG != 0) #ifndef NDEBUG
std::vector<debug::ElementIdxToDofs> elMap(meshes.size()); std::vector<debug::ElementIdxToDofs> elMap(meshes.size());
for (size_t i = 0; i < meshes.size(); i++) { for (size_t i = 0; i < meshes.size(); i++) {
debug::createSortedDofs(meshes[i], elMap[i]); debug::createSortedDofs(meshes[i], elMap[i]);
...@@ -407,7 +407,7 @@ namespace AMDiS { namespace Parallel { ...@@ -407,7 +407,7 @@ namespace AMDiS { namespace Parallel {
// === If in debug mode, make some tests. === // === If in debug mode, make some tests. ===
#if (DEBUG != 0) #ifndef NDEBUG
MSG("AMDiS runs in debug mode, so make some test ...\n"); MSG("AMDiS runs in debug mode, so make some test ...\n");
ParallelDebug::testAllElements(*this); ParallelDebug::testAllElements(*this);
...@@ -424,7 +424,7 @@ namespace AMDiS { namespace Parallel { ...@@ -424,7 +424,7 @@ namespace AMDiS { namespace Parallel {
// Remove periodic boundary conditions in sequential problem definition. // Remove periodic boundary conditions in sequential problem definition.
removePeriodicBoundaryConditions(); removePeriodicBoundaryConditions();
#if (DEBUG != 0) #ifndef NDEBUG
ParallelDebug::testPeriodicBoundary(*this); ParallelDebug::testPeriodicBoundary(*this);
#endif #endif
...@@ -471,7 +471,7 @@ namespace AMDiS { namespace Parallel { ...@@ -471,7 +471,7 @@ namespace AMDiS { namespace Parallel {
} }
updateDofRelatedStruct(meshes[i]); updateDofRelatedStruct(meshes[i]);
#if (DEBUG != 0) #ifndef NDEBUG
ParallelDebug::testPeriodicBoundary(*this); ParallelDebug::testPeriodicBoundary(*this);
#endif #endif
} }
...@@ -946,7 +946,7 @@ namespace AMDiS { namespace Parallel { ...@@ -946,7 +946,7 @@ namespace AMDiS { namespace Parallel {
pair<Element*, int> edge1 = pair<Element*, int> edge1 =
make_pair(elObjDb.getElementPtr(*elIt, meshes[i]), edgeNoInEl[*elIt]); make_pair(elObjDb.getElementPtr(*elIt, meshes[i]), edgeNoInEl[*elIt]);
#if (DEBUG != 0) #ifndef NDEBUG
DofEdge dofEdge0 = edge0.first->getEdge(edge0.second); DofEdge dofEdge0 = edge0.first->getEdge(edge0.second);
DofEdge dofEdge1 = edge1.first->getEdge(edge1.second); DofEdge dofEdge1 = edge1.first->getEdge(edge1.second);
...@@ -1226,7 +1226,7 @@ namespace AMDiS { namespace Parallel { ...@@ -1226,7 +1226,7 @@ namespace AMDiS { namespace Parallel {
vector<int> meshAllValues(meshes.size(), 0); vector<int> meshAllValues(meshes.size(), 0);
for (size_t i = 0; i < meshes.size(); i++) { for (size_t i = 0; i < meshes.size(); i++) {
#if (DEBUG != 0) #ifndef NDEBUG
MSG("mesh[%d] change index = %d, stored last index = %d.\n", MSG("mesh[%d] change index = %d, stored last index = %d.\n",
i, meshes[i]->getChangeIndex(), lastMeshChangeIndexs[meshes[i]]); i, meshes[i]->getChangeIndex(), lastMeshChangeIndexs[meshes[i]]);
#endif #endif
...@@ -1280,7 +1280,7 @@ namespace AMDiS { namespace Parallel { ...@@ -1280,7 +1280,7 @@ namespace AMDiS { namespace Parallel {
bool meshChanged = false; bool meshChanged = false;
// === Check the boundaries and adapt mesh if necessary. === // === Check the boundaries and adapt mesh if necessary. ===
#if (DEBUG != 0) #ifndef NDEBUG
MSG("Run checkAndAdaptBoundary for mesh[%d]...\n", i); MSG("Run checkAndAdaptBoundary for mesh[%d]...\n", i);
#endif #endif