Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit 02ff3473 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

NULL replaced by nullptr and a lot of small changes

parent 0b697d70
......@@ -29,7 +29,9 @@
# message(WARNING "the environment variable LIBRARY_PATH is set. this can lead to problems during linking. \n You can unset it in your CMakeLists.txt with the command unset(ENV{LIBRARY_PATH}).\n")
#endif()
##################################################################
#try to detect the AMDiS include directory
# try to detect the AMDiS include directory
# -------------------------------------------
find_file(_AMDIS_H AMDiS.h PATHS ${AMDIS_INCLUDE_DIR} ${AMDIS_DIR}/../../include/amdis/ /usr/include/amdis/)
if(_AMDIS_H)
get_filename_component(AMDIS_INCLUDE_DIR ${_AMDIS_H} PATH CACHE)
......@@ -38,32 +40,46 @@ else()
message(ERROR "could not detect the AMDiS include directory. Please set the variable AMDIS_INCLUDE_DIR to the directory containing the AMDiS headers.")
endif()
unset(_AMDIS_H CACHE)
set(MTL_DIR ${AMDIS_INCLUDE_DIR}/mtl4 CACHE PATH "the mtl directory")
set(MTL_DIR @MTL_INCLUDE_DIR@ CACHE PATH "the mtl directory")
list(APPEND AMDIS_INCLUDE_DIRS ${MTL_DIR})
if(WIN32)
set(LIBEXT lib)
else()
set(LIBEXT so)
endif()
# AMDiS base libraries
# --------------------
find_library(_AMDIS_LIB amdis PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/ /usr/include/amdis)
if(_AMDIS_LIB)
get_filename_component(AMDIS_LIBRARY_DIR ${_AMDIS_LIB} PATH CACHE)
set(AMDIS_LIBRARY_DIRS ${AMDIS_LIBRARY_DIR})
set(AMDIS_LIBRARIES "${_AMDIS_LIB};${AMDIS_LIBRARY_DIR}/libmuparser.${LIBEXT}" CACHE STRING "amdis libraries")
set(AMDIS_LIBRARIES "${_AMDIS_LIB}" CACHE STRING "amdis libraries")
else()
message(ERROR "could not detect the AMDiS library directory. Please set the variable AMDIS_LIBRARY_DIR to the directory containg the AMDiS library")
endif()
unset(_AMDIS_LIB CACHE)
find_package(Boost 1.42 REQUIRED system iostreams filesystem program_options)
# Boost libraries
# ---------------
if(WIN32)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.42 REQUIRED system iostreams filesystem program_options date_time zlib bzip2)
else()
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost 1.42 REQUIRED system iostreams filesystem program_options date_time)
endif()
if(Boost_FOUND)
list(APPEND AMDIS_LIBRARIES ${Boost_LIBRARIES})
list(APPEND AMDIS_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
list(APPEND AMDIS_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
else()
message(ERROR "Boost libraries not found")
endif(Boost_FOUND)
# more libraries and include-directories added by default
# -------------------------------------------------------
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/reinit)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/compositeFEM)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/muparser)
# ------------------------------------------------------------------
set(AMDIS_NEED_ZOLTAN @ENABLE_ZOLTAN@)
set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDIS_OPENMP @ENABLE_OPENMP@)
......@@ -95,6 +111,61 @@ if(AMDIS_OPENMP)
endif()
endif(AMDIS_OPENMP)
# AMDiS-Extensions library
# ------------------------
if(AMDIS_NEED_EXTENSIONS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/time)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/nanoflann)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/pugixml)
find_library(_EXTENSIONS_LIB extensions PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
if(_EXTENSIONS_LIB)
list(APPEND AMDIS_LIBRARIES ${_EXTENSIONS_LIB})
endif()
unset(_EXTENSIONS_LIB CACHE)
endif(AMDIS_NEED_EXTENSIONS)
# AMDiS BaseProblems libraries
# ----------------------------
if(AMDIS_NEED_BASE_PROBLEMS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/base_problems)
find_library(_BASE_PROBLEMS_LIB base_problems PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
if(_BASE_PROBLEMS_LIB)
list(APPEND AMDIS_LIBRARIES ${_BASE_PROBLEMS_LIB})
endif()
unset(_BASE_PROBLEMS_LIB CACHE)
endif(AMDIS_NEED_BASE_PROBLEMS)
# ----------------------------
find_library(_REINIT_LIB reinit PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
find_library(_COMPOSITE_FEM_LIB compositeFEM PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
find_library(_MUPARSER_LIB muparser PATHS ${AMDIS_LIBRARY_DIR} ${AMDIS_DIR}/../../lib/amdis/)
if(_REINIT_LIB)
list(APPEND AMDIS_LIBRARIES ${_REINIT_LIB})
else()
message(ERROR "Reinit library not found")
endif()
unset(_REINIT_LIB CACHE)
if(_COMPOSITE_FEM_LIB)
list(APPEND AMDIS_LIBRARIES ${_COMPOSITE_FEM_LIB})
else()
message(ERROR "CompositeFEM library not found")
endif()
unset(_COMPOSITE_FEM_LIB CACHE)
if(_MUPARSER_LIB)
list(APPEND AMDIS_LIBRARIES ${_MUPARSER_LIB})
else()
message(ERROR "MuParser library not found")
endif()
unset(_MUPARSER_LIB CACHE)
# ----------------------------
if(AMDIS_NEED_UMFPACK)
set(AMDIS_UMFPACK_PATH @UMFPACK_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_UMFPACK_PATH})
......@@ -121,11 +192,11 @@ if(AMDIS_NEED_UMFPACK)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARY})
list(APPEND AMDIS_LIBRARY_DIRS ${BLAS_LIBRARY_DIR})
else()
find_package(BLAS REQUIRED)
find_package(BLAS)
if(BLAS_FOUND)
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARIES})
else()
message(FATAL_ERROR "Could not find the BLAS library. Please set the variable BLAS_LIBRARY to the blas library with full path")
message(STATUS "Could not find the BLAS library. Please set the variable BLAS_LIBRARY to the blas library with full path")
endif()
endif()
endif("$ENV{BLA_VENDOR}" STREQUAL "ACML")
......@@ -207,6 +278,8 @@ return (0) ;
endif()
endif(AMDIS_NEED_UMFPACK)
# PNG library
# -----------
if(AMDIS_NEED_PNG)
set(AMDIS_PNG_PATH @PNG_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_PNG_PATH})
......@@ -221,6 +294,8 @@ if(AMDIS_NEED_PNG)
endif()
endif(AMDIS_NEED_PNG)
# BDDCML-library
# --------------
if(AMDIS_NEED_BDDCML)
set(AMDIS_BDDCML_PATH @BDDCML_PATH@)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_BDDCML_PATH})
......@@ -232,34 +307,8 @@ if(AMDIS_NEED_BDDCML)
list(APPEND AMDIS_LIBRARIES ${AMDIS_BDDCML_LINK_LIST})
endif(AMDIS_NEED_BDDCML)
if(AMDIS_NEED_EXTENSIONS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/time)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/nanoflann)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/extensions/pugixml)
list(APPEND AMDIS_LIBRARIES ${AMDIS_LIBRARY_DIR}/libextensions.${LIBEXT})
endif(AMDIS_NEED_EXTENSIONS)
if(AMDIS_NEED_BASE_PROBLEMS)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/base_problems)
list(APPEND AMDIS_LIBRARIES ${AMDIS_LIBRARY_DIR}/libbase_problems.${LIBEXT})
endif(AMDIS_NEED_BASE_PROBLEMS)
#add directories for reinit
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/reinit)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/compositeFEM)
list(APPEND AMDIS_INCLUDE_DIRS ${AMDIS_INCLUDE_DIR}/muparser)
list(APPEND AMDIS_LIBRARIES ${AMDIS_LIBRARY_DIR}/libcompositeFEM.${LIBEXT})
list(APPEND AMDIS_LIBRARIES ${AMDIS_LIBRARY_DIR}/libreinit.${LIBEXT})
if(${AMDIS_FIND_COMPONENTS} MATCHES umfpack )
if(NOT AMDIS_NEED_UMFPACK)
set(AMDIS_umfpack_FOUND FALSE)
message(SEND_ERROR "The selected amdis was not compiled with umfpack")
endif()
endif()
# Zoltan library
# --------------
if(AMDIS_NEED_ZOLTAN)
find_library(ZOLTAN_LIB zoltan
HINTS ENV LIBRARY_PATH
......@@ -272,3 +321,10 @@ if(AMDIS_NEED_ZOLTAN)
endif()
endif()
if(${AMDIS_FIND_COMPONENTS} MATCHES umfpack )
if(NOT AMDIS_NEED_UMFPACK)
set(AMDIS_umfpack_FOUND FALSE)
message(SEND_ERROR "The selected amdis was not compiled with umfpack")
endif()
endif()
......@@ -414,6 +414,7 @@ if(ENABLE_EXTENSIONS)
${EXTENSIONS_DIR}/BackgroundMesh.cc
${EXTENSIONS_DIR}/GeometryTools.cc
${EXTENSIONS_DIR}/POperators.cc
${EXTENSIONS_DIR}/SingularDirichletBC2.cc
${EXTENSIONS_DIR}/time/ExtendedRosenbrockStationary.cc
${EXTENSIONS_DIR}/pugixml/src/pugixml.cpp)
......@@ -423,6 +424,14 @@ if(ENABLE_EXTENSIONS)
${EXTENSIONS_DIR}/preconditioner/PetscPreconCahnHilliard.cc)
endif(ENABLE_PETSC)
if(ENABLE_PARALLEL_DOMAIN)
list(APPEND EXTENSIONS_SRC
${EXTENSIONS_DIR}/preconditioner/PetscSolverNavierStokes2.cc
${EXTENSIONS_DIR}/preconditioner/PetscSolverPfc.cc
${EXTENSIONS_DIR}/preconditioner/PhaseFieldCrystal_.cc
${EXTENSIONS_DIR}/preconditioner/CahnHilliard_.cc)
endif(ENABLE_PARALLEL_DOMAIN)
list(APPEND COMPILEFLAGS "-DHAVE_EXTENSIONS=1")
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR})
list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/time)
......
......@@ -31,7 +31,7 @@ namespace AMDiS {
using namespace std;
#if defined(HAVE_PARALLEL_MTL4)
mtl::par::environment* mtl_environment = NULL;
mtl::par::environment* mtl_environment = nullptr;
#endif
void init(int argc, char **argv, std::string initFileName)
......@@ -44,7 +44,7 @@ namespace AMDiS {
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS)
Parallel::mpi::startRand();
#else
srand(time(NULL));
srand(time(0));
#endif
#endif
......
......@@ -27,6 +27,7 @@
#include <string>
#include "AMDiS_fwd.h"
#include "Global.h"
namespace AMDiS {
......@@ -40,8 +41,8 @@ namespace AMDiS {
AdaptBase(string sname,
ProblemIterationInterface *problemIteration_,
AdaptInfo *adapt,
ProblemTimeInterface *problemTime_ = NULL,
AdaptInfo *initialAdaptInfo_ = NULL)
ProblemTimeInterface *problemTime_ = nullptr,
AdaptInfo *initialAdaptInfo_ = nullptr)
: name(sname),
problemIteration(problemIteration_),
adaptInfo(adapt),
......
......@@ -80,7 +80,7 @@ namespace AMDiS {
fixedTimestep = (info->getMinTimestep() == info->getMaxTimestep());
if (initialTimestampSet == 0)
initialTimestamp = time(NULL);
initialTimestamp = time(0);
else
initialTimestamp = initialTimestampSet;
......@@ -345,7 +345,7 @@ namespace AMDiS {
}
while (!adaptInfo->reachedEndTime()) {
iterationTimestamp = time(NULL);
iterationTimestamp = time(0);
problemTime->initTimestep(adaptInfo);
oneTimestep();
......@@ -417,7 +417,7 @@ namespace AMDiS {
return false;
// Get the current time.
time_t currentTimestamp = time(NULL);
time_t currentTimestamp = time(0);
// Update list with the last iteration runtimes.
lastIterationsDuration.push(currentTimestamp - iterationTimestamp);
......
......@@ -91,7 +91,7 @@ namespace AMDiS {
}
/// Implementation of AdaptBase::adapt()
virtual int adapt();
int adapt() override;
/// Serialization
virtual void serialize(ostream &out);
......
......@@ -64,7 +64,7 @@ namespace AMDiS {
virtual ~AdaptStationary() {}
/// Implementation of AdaptBase::adapt()
virtual int adapt();
int adapt() override;
protected:
/// Initialisation
......
......@@ -44,8 +44,8 @@ namespace AMDiS {
elementMatrix(nRow, nCol),
elementVector(nRow),
tmpMat(nRow, nCol),
lastMatEl(NULL),
lastVecEl(NULL),
lastMatEl(nullptr),
lastVecEl(nullptr),
lastTraverseId(-1)
{}
......@@ -105,7 +105,7 @@ namespace AMDiS {
rememberElMat = true;
Element *el = smallElInfo->getElement();
lastVecEl = lastMatEl = NULL;
lastVecEl = lastMatEl = nullptr;
if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized())
initElement(smallElInfo, largeElInfo);
......@@ -426,8 +426,8 @@ namespace AMDiS {
void Assembler::finishAssembling()
{
lastVecEl = NULL;
lastMatEl = NULL;
lastVecEl = nullptr;
lastMatEl = nullptr;
}
......
......@@ -57,7 +57,7 @@ namespace AMDiS {
/// Constructor
Assembler(Operator *op,
const FiniteElemSpace *rowFeSpace,
const FiniteElemSpace *colFeSpace = NULL);
const FiniteElemSpace *colFeSpace = nullptr);
/// Destructor
~Assembler();
......@@ -155,8 +155,8 @@ namespace AMDiS {
/// Initialisation for the given ElInfo. The call is deligated to the sub assemblers.
void initElement(const ElInfo *smallElInfo,
const ElInfo *largeElInfo = NULL,
Quadrature *quad = NULL);
const ElInfo *largeElInfo = nullptr,
Quadrature *quad = nullptr);
/// Sets quadratures of all sub assemblers.
void setQuadratures(Quadrature *quad2,
......@@ -287,7 +287,7 @@ namespace AMDiS {
Quadrature *quad1GrdPhi,
Quadrature *quad0,
const FiniteElemSpace *rowFeSpace,
const FiniteElemSpace *colFeSpace = NULL);
const FiniteElemSpace *colFeSpace = nullptr);
};
/**
......@@ -306,7 +306,7 @@ namespace AMDiS {
Quadrature *quad1GrdPhi,
Quadrature *quad0,
const FiniteElemSpace *rowFeSpace,
const FiniteElemSpace *colFeSpace = NULL);
const FiniteElemSpace *colFeSpace = nullptr);
};
}
......
......@@ -40,6 +40,12 @@ namespace AMDiS {
BoundaryType newBound(BoundaryType oldBound, BoundaryType newBound);
struct BoundaryTypeContainer
{
BoundaryTypeContainer(BoundaryType b) : b(b) {}
BoundaryType b;
};
}
#endif
......@@ -44,7 +44,7 @@ namespace AMDiS {
/// Constructor.
BoundaryCondition(BoundaryType type,
const FiniteElemSpace *rowFeSpace_,
const FiniteElemSpace *colFeSpace_ = NULL)
const FiniteElemSpace *colFeSpace_ = nullptr)
: boundaryType(type),
rowFeSpace(rowFeSpace_),
colFeSpace(colFeSpace_)
......
......@@ -59,7 +59,7 @@ namespace AMDiS {
FUNCNAME("BoundaryManager::addBoundaryCondition()");
BoundaryType type = localBC->getBoundaryType();
TEST_EXIT(localBCs[type] == NULL)
TEST_EXIT(localBCs[type] == nullptr)
("There is already a condition for this type %d.\n",type);
localBCs[type] = localBC;
......
......@@ -28,7 +28,7 @@ bool Cholesky::factorization(Matrix<double> *A, Vector<double> *p)
int n = A->getNumRows();
// Checking memory for vector P of diagonal elements of factorization.
static Vector<double> *pT = NULL;
static Vector<double> *pT = nullptr;
if (p)
{
......@@ -99,7 +99,7 @@ bool Cholesky::solve(Matrix<double> *A, Vector<double> *b, Vector<double> *x,
x = new Vector<double>(n);
// Checking vector P.
static Vector<double> *pT = NULL;
static Vector<double> *pT = nullptr;
if (!p || (p->getSize() != n))
{
......@@ -153,7 +153,7 @@ bool Cholesky::solve(Matrix<double> *A, Vector<WorldVector<double> > *b,
x = new Vector<WorldVector<double> >(n);
// Checking vector P.
static Vector<double> *pT = NULL;
static Vector<double> *pT = nullptr;
if (!p || (p->getSize() != n))
{
......
......@@ -51,16 +51,16 @@ class Cholesky
/** \brief
* Solves system A*X=B, where A is a positive definite matrix.
* If P=NULL; A is assumed to be positive definite, and a Cholesky
* If P=nullptr; A is assumed to be positive definite, and a Cholesky
* decomposition is computed using the previous routine.
* If P is given, A and P are assumed to be already given as the output of
* the previous routine.
*/
static bool solve(Matrix<double> *A, Vector<double> *b, Vector<double> *x,
Vector<double> *p = NULL);
Vector<double> *p = nullptr);
static bool solve(Matrix<double> *A, Vector<WorldVector<double> > *b,
Vector<WorldVector<double> > *x,
Vector<double> *p = NULL);
Vector<double> *p = nullptr);
};
#endif
......@@ -43,8 +43,8 @@ namespace AMDiS {
public:
/// Constructs a CoarseningManager which belongs to aMesh
CoarseningManager()
: mesh(NULL),
stack(NULL),
: mesh(nullptr),
stack(nullptr),
doMore(0)
{}
......
......@@ -91,8 +91,8 @@ namespace AMDiS {
if (mesh->getNumberOfDofs(VERTEX) && !mesh->queryCoarseDOFs()) {
int node = mesh->getNode(VERTEX);
parent->setDof(node+0, const_cast<int*>( child[0]->getDof(node+0)));
parent->setDof(node+1, const_cast<int*>( child[1]->getDof(node+1)));
parent->setDof(node+0, const_cast<DegreeOfFreedom*>( child[0]->getDof(node+0)));
parent->setDof(node+1, const_cast<DegreeOfFreedom*>( child[1]->getDof(node+1)));
}
if (mesh->getNumberOfDofs(CENTER) && !mesh->queryCoarseDOFs()) {
......@@ -123,19 +123,19 @@ namespace AMDiS {
if (mesh->getNumberOfDofs(VERTEX)) /*--- midpoint of parent ---*/
{
mesh->freeDof(const_cast<int*>( child[1]->getDof(mesh->getNode(VERTEX))), VERTEX);
mesh->freeDof(const_cast<DegreeOfFreedom*>( child[1]->getDof(mesh->getNode(VERTEX))), VERTEX);
}
if (mesh->getNumberOfDofs(CENTER)) /*--- center of the children ---*/
{
mesh->freeDof(const_cast<int*>( child[0]->getDof(mesh->getNode(CENTER))), CENTER);
mesh->freeDof(const_cast<int*>( child[1]->getDof(mesh->getNode(CENTER))), CENTER);
mesh->freeDof(const_cast<DegreeOfFreedom*>( child[0]->getDof(mesh->getNode(CENTER))), CENTER);
mesh->freeDof(const_cast<DegreeOfFreedom*>( child[1]->getDof(mesh->getNode(CENTER))), CENTER);
}
parent->coarsenElementData(child[0], child[1]);
parent->setFirstChild(NULL);
parent->setSecondChild(NULL);
parent->setFirstChild(nullptr);
parent->setSecondChild(nullptr);
mesh->freeElement(child[0]);
mesh->freeElement(child[1]);
......
......@@ -52,20 +52,20 @@ namespace AMDiS {
// remove dof from common edge of child[0] and child[1]
if (mesh->getNumberOfDofs(EDGE))
mesh->freeDof(const_cast<int*>(child[0]->getDof(4)), EDGE);
mesh->freeDof(const_cast<DegreeOfFreedom*>(child[0]->getDof(4)), EDGE);
// remove dof from the barycenters of child[0] and child[1]
if (mesh->getNumberOfDofs(CENTER)) {
int node = mesh->getNode(CENTER);
mesh->freeDof(const_cast<int*>(child[0]->getDof(node)), CENTER);
mesh->freeDof(const_cast<int*>(child[1]->getDof(node)), CENTER);
mesh->freeDof(const_cast<DegreeOfFreedom*>(child[0]->getDof(node)), CENTER);
mesh->freeDof(const_cast<DegreeOfFreedom*>(child[1]->getDof(node)), CENTER);
}
el->coarsenElementData(child[0], child[1]);
el->setFirstChild(NULL);
el->setSecondChild(NULL);
el->setFirstChild(nullptr);
el->setSecondChild(nullptr);
mesh->freeElement(child[0]);
mesh->freeElement(child[1]);
......@@ -92,10 +92,10 @@ namespace AMDiS {
dynamic_cast<Triangle*>(const_cast<Element*>(coarsenList.getElement(1)));
DegreeOfFreedom *dof[3];
dof[0] = const_cast<int*>(el->getChild(0)->getDof(2));
dof[0] = const_cast<DegreeOfFreedom*>(el->getChild(0)->getDof(2));
if (mesh->getNumberOfDofs(EDGE)) {
dof[1] = const_cast<int*>(el->getChild(0)->getDof(3));
dof[2] = const_cast<int*>(el->getChild(1)->getDof(4));
dof[1] = const_cast<DegreeOfFreedom*>(el->getChild(0)->getDof(3));
dof[2] = const_cast<DegreeOfFreedom*>(el->getChild(1)->getDof(4));
} else {
dof[1] = dof[2] = 0;
}
......@@ -107,7 +107,7 @@ namespace AMDiS {
if (!el->getDof(node + 2)) {
el->setDof(node + 2, mesh->getDof(EDGE));
if (neigh)
neigh->setDof(node + 2, const_cast<int*>(el->getDof(node + 2)));
neigh->setDof(node + 2, const_cast<DegreeOfFreedom*>(el->getDof(node + 2)));
}
}
......@@ -171,11 +171,11 @@ namespace AMDiS {
// give the refinement edge the right orientation
if (el->getDof(0,0) < el->getDof(1,0)) {
edge[0] = const_cast<int*>(el->getDof(0));
edge[1] = const_cast<int*>(el->getDof(1));
edge[0] = const_cast<DegreeOfFreedom*>(el->getDof(0));
edge[1] = const_cast<DegreeOfFreedom*>(el->getDof(1));
} else {
edge[1] = const_cast<int*>(el->getDof(0));
edge[0] = const_cast<int*>(el->getDof(1));
edge[1] = const_cast<DegreeOfFreedom*>(el->getDof(0));
edge[0] = const_cast<DegreeOfFreedom*>(el->getDof(1));
}
coarse_list.setElement(0, el, true);
......@@ -197,7 +197,7 @@ namespace AMDiS {
DegreeOfFreedom *next_edge[2];
RCNeighbourList periodicList;
while (edge[0] != NULL) {
while (edge[0] != nullptr) {
coarse_list.periodicSplit(edge, next_edge,
&n_neigh, &n_neigh_periodic,
periodicList);
......
......@@ -179,7 +179,7 @@ namespace AMDiS {
DegreeOfFreedom *next_edge[2];
RCNeighbourList periodicList;
while (edge[0] != NULL) {
while (edge[0] != nullptr) {
coarsenList.periodicSplit(edge, next_edge,
&n_neigh, &n_neigh_periodic,
periodicList);
......@@ -226,13 +226,13 @@ namespace AMDiS {
if (mesh->getNumberOfDofs(EDGE)) {
int node = mesh->getNode(EDGE) + Tetrahedron::nChildEdge[el_type][0][dir];
mesh->freeDof(const_cast<int*>(child[0]->getDof(node)), EDGE);