Commit 9c259dfb authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Removed some compiler warnings.

parent 24469e7d
......@@ -126,7 +126,6 @@ $(SOURCE_DIR)/Boundary.h \
$(SOURCE_DIR)/ITL_Solver.h \
$(SOURCE_DIR)/CoarseningManager.h \
$(SOURCE_DIR)/CoarseningManager1d.h $(SOURCE_DIR)/CoarseningManager2d.h $(SOURCE_DIR)/CoarseningManager3d.h \
$(SOURCE_DIR)/demangle.h \
$(SOURCE_DIR)/DOFAdmin.h $(SOURCE_DIR)/DOFIterator.h $(SOURCE_DIR)/DOFMatrix.h $(SOURCE_DIR)/DOFVector.h $(SOURCE_DIR)/DOFVector.hh $(SOURCE_DIR)/DOFVector.cc $(SOURCE_DIR)/Element.h $(SOURCE_DIR)/ElementConnection.h \
$(SOURCE_DIR)/ElInfo.h $(SOURCE_DIR)/ElInfo1d.h $(SOURCE_DIR)/ElInfo2d.h $(SOURCE_DIR)/ElInfo3d.h $(SOURCE_DIR)/Error.h \
$(SOURCE_DIR)/Error.hh $(SOURCE_DIR)/Estimator.h $(SOURCE_DIR)/Estimator.cc $(SOURCE_DIR)/FiniteElemSpace.h $(SOURCE_DIR)/FixVec.h $(SOURCE_DIR)/FixVec.hh $(SOURCE_DIR)/FixVecConvert.h $(SOURCE_DIR)/Flag.h $(SOURCE_DIR)/Global.h \
......@@ -164,7 +163,6 @@ $(SOURCE_DIR)/CoarseningManager.cc \
$(SOURCE_DIR)/CoarseningManager1d.cc \
$(SOURCE_DIR)/CoarseningManager2d.cc \
$(SOURCE_DIR)/CoarseningManager3d.cc \
$(SOURCE_DIR)/demangle.cc \
$(SOURCE_DIR)/DOFAdmin.cc \
$(SOURCE_DIR)/DOFMatrix.cc \
$(SOURCE_DIR)/Element.cc \
......
......@@ -149,25 +149,25 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
$(SOURCE_DIR)/ITL_Solver.h $(SOURCE_DIR)/CoarseningManager.h \
$(SOURCE_DIR)/CoarseningManager1d.h \
$(SOURCE_DIR)/CoarseningManager2d.h \
$(SOURCE_DIR)/CoarseningManager3d.h $(SOURCE_DIR)/demangle.h \
$(SOURCE_DIR)/DOFAdmin.h $(SOURCE_DIR)/DOFIterator.h \
$(SOURCE_DIR)/DOFMatrix.h $(SOURCE_DIR)/DOFVector.h \
$(SOURCE_DIR)/DOFVector.hh $(SOURCE_DIR)/DOFVector.cc \
$(SOURCE_DIR)/Element.h $(SOURCE_DIR)/ElementConnection.h \
$(SOURCE_DIR)/ElInfo.h $(SOURCE_DIR)/ElInfo1d.h \
$(SOURCE_DIR)/ElInfo2d.h $(SOURCE_DIR)/ElInfo3d.h \
$(SOURCE_DIR)/Error.h $(SOURCE_DIR)/Error.hh \
$(SOURCE_DIR)/Estimator.h $(SOURCE_DIR)/Estimator.cc \
$(SOURCE_DIR)/FiniteElemSpace.h $(SOURCE_DIR)/FixVec.h \
$(SOURCE_DIR)/FixVec.hh $(SOURCE_DIR)/FixVecConvert.h \
$(SOURCE_DIR)/Flag.h $(SOURCE_DIR)/Global.h \
$(SOURCE_DIR)/UmfPackSolver.h \ $(SOURCE_DIR)/UmfPackSolver.hh \
$(SOURCE_DIR)/Lagrange.h $(SOURCE_DIR)/Line.h \
$(SOURCE_DIR)/MacroElement.h $(SOURCE_DIR)/MacroWriter.h \
$(SOURCE_DIR)/Markings.h $(SOURCE_DIR)/Markings.hh \
$(SOURCE_DIR)/MemoryManager.h $(SOURCE_DIR)/Mesh.h \
$(SOURCE_DIR)/Parameters.h $(SOURCE_DIR)/Parametric.h \
$(SOURCE_DIR)/Quadrature.h $(SOURCE_DIR)/RCNeighbourList.h \
$(SOURCE_DIR)/CoarseningManager3d.h $(SOURCE_DIR)/DOFAdmin.h \
$(SOURCE_DIR)/DOFIterator.h $(SOURCE_DIR)/DOFMatrix.h \
$(SOURCE_DIR)/DOFVector.h $(SOURCE_DIR)/DOFVector.hh \
$(SOURCE_DIR)/DOFVector.cc $(SOURCE_DIR)/Element.h \
$(SOURCE_DIR)/ElementConnection.h $(SOURCE_DIR)/ElInfo.h \
$(SOURCE_DIR)/ElInfo1d.h $(SOURCE_DIR)/ElInfo2d.h \
$(SOURCE_DIR)/ElInfo3d.h $(SOURCE_DIR)/Error.h \
$(SOURCE_DIR)/Error.hh $(SOURCE_DIR)/Estimator.h \
$(SOURCE_DIR)/Estimator.cc $(SOURCE_DIR)/FiniteElemSpace.h \
$(SOURCE_DIR)/FixVec.h $(SOURCE_DIR)/FixVec.hh \
$(SOURCE_DIR)/FixVecConvert.h $(SOURCE_DIR)/Flag.h \
$(SOURCE_DIR)/Global.h $(SOURCE_DIR)/UmfPackSolver.h \ \
$(SOURCE_DIR)/UmfPackSolver.hh $(SOURCE_DIR)/Lagrange.h \
$(SOURCE_DIR)/Line.h $(SOURCE_DIR)/MacroElement.h \
$(SOURCE_DIR)/MacroWriter.h $(SOURCE_DIR)/Markings.h \
$(SOURCE_DIR)/Markings.hh $(SOURCE_DIR)/MemoryManager.h \
$(SOURCE_DIR)/Mesh.h $(SOURCE_DIR)/Parameters.h \
$(SOURCE_DIR)/Parametric.h $(SOURCE_DIR)/Quadrature.h \
$(SOURCE_DIR)/RCNeighbourList.h \
$(SOURCE_DIRe)/RefinementManager.h \
$(SOURCE_DIR)/RefinementManager1d.h \
$(SOURCE_DIR)/RefinementManager2d.h \
......@@ -188,16 +188,15 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
$(SOURCE_DIR)/CoarseningManager.cc \
$(SOURCE_DIR)/CoarseningManager1d.cc \
$(SOURCE_DIR)/CoarseningManager2d.cc \
$(SOURCE_DIR)/CoarseningManager3d.cc $(SOURCE_DIR)/demangle.cc \
$(SOURCE_DIR)/DOFAdmin.cc $(SOURCE_DIR)/DOFMatrix.cc \
$(SOURCE_DIR)/Element.cc $(SOURCE_DIR)/ElInfo1d.cc \
$(SOURCE_DIR)/ElInfo2d.cc $(SOURCE_DIR)/ElInfo3d.cc \
$(SOURCE_DIR)/FiniteElemSpace.cc $(SOURCE_DIR)/FixVec.cc \
$(SOURCE_DIR)/Global.cc $(SOURCE_DIR)/Lagrange.cc \
$(SOURCE_DIR)/Line.cc $(SOURCE_DIR)/MacroElement.cc \
$(SOURCE_DIR)/MacroWriter.cc $(SOURCE_DIR)/Parameters.cc \
$(SOURCE_DIR)/Parametric.cc $(SOURCE_DIR)/Quadrature.cc \
$(SOURCE_DIR)/RCNeighbourList.cc \
$(SOURCE_DIR)/CoarseningManager3d.cc $(SOURCE_DIR)/DOFAdmin.cc \
$(SOURCE_DIR)/DOFMatrix.cc $(SOURCE_DIR)/Element.cc \
$(SOURCE_DIR)/ElInfo1d.cc $(SOURCE_DIR)/ElInfo2d.cc \
$(SOURCE_DIR)/ElInfo3d.cc $(SOURCE_DIR)/FiniteElemSpace.cc \
$(SOURCE_DIR)/FixVec.cc $(SOURCE_DIR)/Global.cc \
$(SOURCE_DIR)/Lagrange.cc $(SOURCE_DIR)/Line.cc \
$(SOURCE_DIR)/MacroElement.cc $(SOURCE_DIR)/MacroWriter.cc \
$(SOURCE_DIR)/Parameters.cc $(SOURCE_DIR)/Parametric.cc \
$(SOURCE_DIR)/Quadrature.cc $(SOURCE_DIR)/RCNeighbourList.cc \
$(SOURCE_DIR)/RefinementManager.cc \
$(SOURCE_DIR)/RefinementManager1d.cc \
$(SOURCE_DIR)/RefinementManager2d.cc \
......@@ -258,16 +257,15 @@ am_libamdis_la_OBJECTS = $(am__objects_1) libamdis_la-DOFIndexed.lo \
libamdis_la-Boundary.lo libamdis_la-CoarseningManager.lo \
libamdis_la-CoarseningManager1d.lo \
libamdis_la-CoarseningManager2d.lo \
libamdis_la-CoarseningManager3d.lo libamdis_la-demangle.lo \
libamdis_la-DOFAdmin.lo libamdis_la-DOFMatrix.lo \
libamdis_la-Element.lo libamdis_la-ElInfo1d.lo \
libamdis_la-ElInfo2d.lo libamdis_la-ElInfo3d.lo \
libamdis_la-FiniteElemSpace.lo libamdis_la-FixVec.lo \
libamdis_la-Global.lo libamdis_la-Lagrange.lo \
libamdis_la-Line.lo libamdis_la-MacroElement.lo \
libamdis_la-MacroWriter.lo libamdis_la-Parameters.lo \
libamdis_la-Parametric.lo libamdis_la-Quadrature.lo \
libamdis_la-RCNeighbourList.lo \
libamdis_la-CoarseningManager3d.lo libamdis_la-DOFAdmin.lo \
libamdis_la-DOFMatrix.lo libamdis_la-Element.lo \
libamdis_la-ElInfo1d.lo libamdis_la-ElInfo2d.lo \
libamdis_la-ElInfo3d.lo libamdis_la-FiniteElemSpace.lo \
libamdis_la-FixVec.lo libamdis_la-Global.lo \
libamdis_la-Lagrange.lo libamdis_la-Line.lo \
libamdis_la-MacroElement.lo libamdis_la-MacroWriter.lo \
libamdis_la-Parameters.lo libamdis_la-Parametric.lo \
libamdis_la-Quadrature.lo libamdis_la-RCNeighbourList.lo \
libamdis_la-RefinementManager.lo \
libamdis_la-RefinementManager1d.lo \
libamdis_la-RefinementManager2d.lo \
......@@ -525,7 +523,6 @@ $(SOURCE_DIR)/Boundary.h \
$(SOURCE_DIR)/ITL_Solver.h \
$(SOURCE_DIR)/CoarseningManager.h \
$(SOURCE_DIR)/CoarseningManager1d.h $(SOURCE_DIR)/CoarseningManager2d.h $(SOURCE_DIR)/CoarseningManager3d.h \
$(SOURCE_DIR)/demangle.h \
$(SOURCE_DIR)/DOFAdmin.h $(SOURCE_DIR)/DOFIterator.h $(SOURCE_DIR)/DOFMatrix.h $(SOURCE_DIR)/DOFVector.h $(SOURCE_DIR)/DOFVector.hh $(SOURCE_DIR)/DOFVector.cc $(SOURCE_DIR)/Element.h $(SOURCE_DIR)/ElementConnection.h \
$(SOURCE_DIR)/ElInfo.h $(SOURCE_DIR)/ElInfo1d.h $(SOURCE_DIR)/ElInfo2d.h $(SOURCE_DIR)/ElInfo3d.h $(SOURCE_DIR)/Error.h \
$(SOURCE_DIR)/Error.hh $(SOURCE_DIR)/Estimator.h $(SOURCE_DIR)/Estimator.cc $(SOURCE_DIR)/FiniteElemSpace.h $(SOURCE_DIR)/FixVec.h $(SOURCE_DIR)/FixVec.hh $(SOURCE_DIR)/FixVecConvert.h $(SOURCE_DIR)/Flag.h $(SOURCE_DIR)/Global.h \
......@@ -563,7 +560,6 @@ $(SOURCE_DIR)/CoarseningManager.cc \
$(SOURCE_DIR)/CoarseningManager1d.cc \
$(SOURCE_DIR)/CoarseningManager2d.cc \
$(SOURCE_DIR)/CoarseningManager3d.cc \
$(SOURCE_DIR)/demangle.cc \
$(SOURCE_DIR)/DOFAdmin.cc \
$(SOURCE_DIR)/DOFMatrix.cc \
$(SOURCE_DIR)/Element.cc \
......@@ -794,7 +790,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-VertexVector.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-VtkWriter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ZeroOrderAssembler.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-demangle.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcompositeFEM_la-CFE_Integration.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcompositeFEM_la-CFE_NormAndErrorFcts.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcompositeFEM_la-CompositeFEMMethods.Plo@am__quote@
......@@ -1239,13 +1234,6 @@ libamdis_la-CoarseningManager3d.lo: $(SOURCE_DIR)/CoarseningManager3d.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-CoarseningManager3d.lo `test -f '$(SOURCE_DIR)/CoarseningManager3d.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/CoarseningManager3d.cc
libamdis_la-demangle.lo: $(SOURCE_DIR)/demangle.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-demangle.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-demangle.Tpo" -c -o libamdis_la-demangle.lo `test -f '$(SOURCE_DIR)/demangle.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/demangle.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-demangle.Tpo" "$(DEPDIR)/libamdis_la-demangle.Plo"; else rm -f "$(DEPDIR)/libamdis_la-demangle.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SOURCE_DIR)/demangle.cc' object='libamdis_la-demangle.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-demangle.lo `test -f '$(SOURCE_DIR)/demangle.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/demangle.cc
libamdis_la-DOFAdmin.lo: $(SOURCE_DIR)/DOFAdmin.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-DOFAdmin.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-DOFAdmin.Tpo" -c -o libamdis_la-DOFAdmin.lo `test -f '$(SOURCE_DIR)/DOFAdmin.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/DOFAdmin.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-DOFAdmin.Tpo" "$(DEPDIR)/libamdis_la-DOFAdmin.Plo"; else rm -f "$(DEPDIR)/libamdis_la-DOFAdmin.Tpo"; exit 1; fi
......
......@@ -309,7 +309,7 @@ ElementLevelSet::calcIntersecNormal_2d(WorldVector<double> &normalVec)
}
if (ElementLevelSet::calcLevelSetFct(lambda) < 0) {
for (int i=0; i<dim; ++i) {
for (int i = 0; i < dim; ++i) {
normalVec[i] *= -1;
}
}
......@@ -383,7 +383,7 @@ ElementLevelSet::calcIntersecNormal_3d(WorldVector<double> &normalVec)
}
if (ElementLevelSet::calcLevelSetFct(lambda) < 0) {
for (int i=0; i<dim; ++i) {
for (int i = 0; i < dim; ++i) {
normalVec[i] *= -1;
}
}
......@@ -414,8 +414,7 @@ ElementLevelSet::getElPos(const DimVec<double> barCoords)
double ls_val = calcLevelSetFct(barCoords);
if (ls_val > 0) {
return LEVEL_SET_EXTERIOR;
}
else {
} else {
return LEVEL_SET_INTERIOR;
}
}
......
......@@ -7,9 +7,9 @@
#include "Parameters.h"
namespace AMDiS {
class Element;
class ElInfo;
class Mesh;
class Element;
class ElInfo;
class Mesh;
}
using namespace AMDiS;
......@@ -57,7 +57,7 @@ using namespace std;
// ===========================================================================
class ElementLevelSet
{
public:
public:
MEMORY_MANAGED(ElementLevelSet);
/**
......@@ -67,17 +67,17 @@ class ElementLevelSet
ElementFunction<double> *lSFct_,
Mesh *mesh_)
: name(name_),
elInfo(NULL),
lastEl(NULL),
level_set_domain(LEVEL_SET_UNDEFINED),
numIntersecPoints(0),
elStatus(LEVEL_SET_UNDEFINED),
numElVertexInterior(0),
numElVertexBoundary(0),
numElVertexExterior(0),
LS_VAL_TOL(1.e-8),
LS_VAL_MIN(1.e-8),
SP_BARY_TOL(1.e-7)
elInfo(NULL),
lastEl(NULL),
level_set_domain(LEVEL_SET_UNDEFINED),
numIntersecPoints(0),
elStatus(LEVEL_SET_UNDEFINED),
numElVertexInterior(0),
numElVertexBoundary(0),
numElVertexExterior(0),
LS_VAL_TOL(1.e-8),
LS_VAL_MIN(1.e-8),
SP_BARY_TOL(1.e-7)
{
FUNCNAME("ElementLevelSet::ElementLevelSet()");
......@@ -108,7 +108,7 @@ class ElementLevelSet
TEST_EXIT(LS_VAL_MIN > 0)("illegal LS_VAL_MIN\n");
TEST_EXIT(SP_BARY_TOL > 0)("illegal SP_BARY_TOL\n");
}
};
}
/**
* Destructor.
......@@ -121,7 +121,7 @@ class ElementLevelSet
delete [] elVertexLevelSetVec;
if (elIntersecPoints)
DELETE elIntersecPoints;
};
}
/**
* Calculates LevelSet-status of element and its intersection points
......@@ -152,17 +152,12 @@ class ElementLevelSet
int createElementLevelSet(const ElInfo *elInfo_,
const bool doCalcIntersecPts_ = true);
/**
* Gets value of level set function at point given in
* barycentric coordinates.
*/
inline const double& calcLevelSetFct(const DimVec<double>& bary) {
/// Gets value of level set function at point given in barycentric coordinates.
inline const double calcLevelSetFct(const DimVec<double>& bary) {
return (*lSFct)(bary);
};
}
/**
* Resets level set information on element.
*/
/// Resets level set information on element.
inline void resetElement() {
FUNCNAME("ElementLevelSet::resetElement");
......@@ -171,7 +166,7 @@ class ElementLevelSet
numElVertexExterior = 0;
numIntersecPoints = 0;
elStatus = LEVEL_SET_UNDEFINED;
};
}
/**
* Defines current element (elInfo).
......@@ -179,7 +174,7 @@ class ElementLevelSet
inline void setElement(const ElInfo *elInfo_) {
elInfo = elInfo_;
resetElement();
};
}
/**
* Set level_set_domain.
......@@ -190,7 +185,7 @@ class ElementLevelSet
status_ == LEVEL_SET_EXTERIOR ||
status_ == LEVEL_SET_BOUNDARY)("illegal level set status !\n");
level_set_domain = status_;
};
}
/**
* Functions to set tolerances for intersection point calculation.
......@@ -204,14 +199,14 @@ class ElementLevelSet
*/
inline const int& getLevelSetDomain() const {
return level_set_domain;
};
}
/**
* Get LevelSet-Status of element.
*/
inline const int& getElementLevelSetStatus() const {
return elStatus;
};
}
/**
* Get number of vertices which are intersection points.
......@@ -220,63 +215,63 @@ class ElementLevelSet
FUNCNAME("ElementLevelSet::getNumVertIntPoints");
TEST_EXIT(numElVertexBoundary == 0)("numElVertexBoundary should be zero!\n");
return numElVertexBoundary;
};
};
/**
* Get vector elVertexStatusVec.
*/
inline const int *getElVertStatusVec() const {
return elVertexStatusVec;
};
}
/**
* Get i-th component of vector elVertexLevelSetVec.
*/
inline const double getElVertLevelSetVec(const int i) const {
return elVertexLevelSetVec[i];
};
}
/**
* Get vector elVertexLevelSetVec.
*/
inline const double *getElVertLevelSetVec() const {
return elVertexLevelSetVec;
};
}
/**
* Get levelSetFct.
*/
inline ElementFunction<double> *getLevelSetFct() const {
return lSFct;
};
}
/**
* Get mesh.
*/
inline Mesh *getMesh() const {
return mesh;
};
}
/**
* Get dim.
*/
inline int getDim() const {
return dim;
};
}
/**
* Get the intersection points.
*/
inline VectorOfFixVecs<DimVec<double> > *getElIntersecPoints() const {
return elIntersecPoints;
};
}
/**
* Get number of intersection points.
*/
inline int getNumElIntersecPoints() const {
return numIntersecPoints;
};
}
/**
* Calculate exterior normal to intersection plane.
......@@ -300,7 +295,7 @@ class ElementLevelSet
*/
int getVertexPos(const DimVec<double> barCoords);
protected:
protected:
/**
* Calculates level set value of each vertex of element.
*/
......@@ -359,7 +354,7 @@ class ElementLevelSet
*/
void calcIntersecNormal_3d(WorldVector<double> &normal);
public:
public:
/**
* Constants characterizing element position with respect to zero level set.
*/
......@@ -368,7 +363,7 @@ class ElementLevelSet
static const int LEVEL_SET_EXTERIOR = 1;
static const int LEVEL_SET_UNDEFINED = -2;
protected:
protected:
/**
* Name of this object.
*/
......
......@@ -93,7 +93,6 @@
#include "Triangle.h"
#include "ValueWriter.h"
#include "VtkWriter.h"
#include "demangle.h"
#include "parareal/ProblemBase.h"
#include "parareal/AdaptParaReal.h"
#endif
......@@ -59,8 +59,6 @@ namespace AMDiS {
mesh->incrementNumberOfLeaves(-1);
mesh->incrementNumberOfElements(-2);
mesh->incrementNumberOfEdges(-1);
return;
}
/****************************************************************************/
......@@ -72,14 +70,16 @@ namespace AMDiS {
int n_neigh,
int bound)
{
Triangle *el = dynamic_cast<Triangle*>(const_cast<Element*>( coarsenList->getElement(0)));
Triangle *neigh = dynamic_cast<Triangle*>(const_cast<Element*>( coarsenList->getElement(1)));
Triangle *el = dynamic_cast<Triangle*>(const_cast<Element*>(coarsenList->getElement(0)));
Triangle *neigh = 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<int*>(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<int*>(el->getChild(0)->getDOF(3));
dof[2] = const_cast<int*>(el->getChild(1)->getDOF(4));
} else {
dof[1] = dof[2] = 0;
}
int node = mesh->getNode(EDGE);
......@@ -128,8 +128,6 @@ namespace AMDiS {
mesh->incrementNumberOfVertices(-1);
mesh->incrementNumberOfEdges(-1);
return;
}
int CoarseningManager2d::coarsenFunction(ElInfo *el_info)
......
......@@ -85,19 +85,6 @@ namespace AMDiS {
}
dofPermutation_[vertexPermutation] = mapping;
// MSG("vertex permutation: ");
// for(i = 0; i < dim+1; i++) {
// MSG("%d ", vertexPermutation[i]);
// }
// MSG("\n");
// MSG("dof permutation: ");
// for(i = 0; i < num; i++) {
// MSG("%d ", dofPermutation_[vertexPermutation][i]);
// }
// MSG("\n");
// WAIT;
}
return dofPermutation_[vertexPermutation];
......@@ -123,9 +110,7 @@ namespace AMDiS {
{
FUNCNAME("PeriodicBC::initMatrix()");
// MSG("begin initMatrix...\n");
if(!masterMatrix_) {
if (!masterMatrix_) {
masterMatrix_ = matrix;
Mesh *mesh = matrix->getRowFESpace()->getMesh();
......@@ -136,19 +121,15 @@ namespace AMDiS {
boundaryType);
const BasisFunction *basFcts = rowFESpace->getBasisFcts();
int num = basFcts->getNumber();
neighIndices_ = GET_MEMORY(DegreeOfFreedom, num);
neighIndices_ = GET_MEMORY(DegreeOfFreedom, basFcts->getNumber());
}
//MSG("end initMatrix...\n");
}
void PeriodicBC::fillBoundaryCondition(DOFMatrix *matrix,
ElInfo *elInfo,
void PeriodicBC::fillBoundaryCondition(DOFMatrix *matrix,
ElInfo *elInfo,
const DegreeOfFreedom *dofIndices,
const BoundaryType *localBound,
int nBasFcts)
const BoundaryType *localBound,
int nBasFcts)
{
if(matrix == masterMatrix_) {
......@@ -227,89 +208,11 @@ namespace AMDiS {
TEST_EXIT(matrix)("no matrix\n");
if(matrix == masterMatrix_) {
const BasisFunction *basFcts = rowFESpace->getBasisFcts();
int num = basFcts->getNumber();
FREE_MEMORY(neighIndices_, DegreeOfFreedom, num);
if (matrix == masterMatrix_) {
FREE_MEMORY(neighIndices_, DegreeOfFreedom,
rowFESpace()->getBasisFcts()->getNumber());
masterMatrix_ = NULL;
}
// ---------- different assemblage style --------
// DOFMatrix::Iterator matrixRow(matrix, USED_DOFS);
// for(matrixRow.reset(); !matrixRow.end(); ++matrixRow) {
// row = matrixRow.getDOFIndex();
// rowSize = matrixRow->size();
// newRow = ((*associated_)[row] == -1) ? row : (*associated_)[row];
// if(row < newRow) {
// for(i = 0; i < rowSize; i++) {
// col = (*matrixRow)[i].col;
// if(col == DOFMatrix::NO_MORE_ENTRIES) break;
// if(col == DOFMatrix::UNUSED_ENTRY) continue;
// newCol = ((*associated_)[col] == -1) ? col : (*associated_)[col];
// if(col < newCol) {
// entry = (*matrixRow)[i].entry;
// (*matrixRow)[i].col = DOFMatrix::UNUSED_ENTRY;
// (*matrixRow)[i].entry = 0.0;
// matrix->addSparseDOFEntry(1.0, row, newCol, entry, true);
// }
// }
// rowSize = matrixRow->size();
// for(i = 0; i < rowSize; i++) {
// col = (*matrixRow)[i].col;
// if(col == DOFMatrix::NO_MORE_ENTRIES) break;
// if(col == DOFMatrix::UNUSED_ENTRY) continue;
// entry = (*matrixRow)[i].entry;
// matrix->addSparseDOFEntry(1.0, newRow, col, entry, true);
// }
// matrixRow->resize(2);
// (*matrixRow)[0].col = row;
// (*matrixRow)[0].entry = 100.0;1.0;
// (*matrixRow)[1].col = newRow;
// (*matrixRow)[1].entry = -100.0;-1.0;
// }
// }
// --- method 2 ---
// for(matrixRow.reset(); !matrixRow.end(); ++matrixRow) {
// row = matrixRow.getDOFIndex();
// newRow = ((*associated_)[row] == -1) ? row : (*associated_)[row];
// if(row < newRow) {
// // remember old row matrix[row]
// ::std::vector<MatEntry> oldMatrixRow = *matrixRow;
// // add new row to old row
// ::std::vector<MatEntry> &newMatrixRow = matrix->getRow(newRow);
// rowSize = newMatrixRow.size();
// for(i = 0; i < rowSize; i++) {
// col = newMatrixRow[i].col;
// if(col == DOFMatrix::NO_MORE_ENTRIES) break;
// if(col == DOFMatrix::UNUSED_ENTRY) continue;
// newCol = ((*associated_)[col] == -1) ? col : (*associated_)[col];
// entry = newMatrixRow[i].entry;
// matrix->addSparseDOFEntry(1.0, row, newCol, entry, true);
// }
// // add old row to new row
// rowSize = oldMatrixRow.size();
// for(i = 0; i < rowSize; i++) {
// col = oldMatrixRow[i].col;
// if(col == DOFMatrix::NO_MORE_ENTRIES) break;
// if(col == DOFMatrix::UNUSED_ENTRY) continue;
// newCol = ((*associated_)[col] == -1) ? col : (*associated_)[col];
// entry = oldMatrixRow[i].entry;
// matrix->addSparseDOFEntry(1.0, newRow, newCol, entry, true);
// }
// }
// }
// DOFVector<DegreeOfFreedom>::Iterator rowIt(associated_, USED_DOFS);
// DOFVector<DegreeOfFreedom>::Iterator colIt(associated_, USED_DOFS);
// Mesh *mesh = matrix->getRowFESpace()->getMesh();
using namespace mtl;
......@@ -327,45 +230,7 @@ namespace AMDiS {
D= bands(TR, 0, 1);
E= A * strict_lower(R) + lower(A);
B+= D * E;
swap(A, B);
#if 0 // The matrix operations above should be identical with the code below
::std::vector< ::std::vector<MatEntry> >::iterator rowIt;
::std::vector< ::std::vector<MatEntry> >::iterator rowEnd = matrix->end();
int colIndex, rowSize;
int row, col, newRow, newCol;
double entry, *newEntryPtr;
for(rowIt = matrix->begin(), row = 0; rowIt != rowEnd; ++rowIt, ++row) {
rowSize = static_cast<int>(rowIt->size());
newRow = (*associated_)[row];
for(colIndex = 0; colIndex < rowSize; colIndex++) {
col = (*rowIt)[colIndex].col;
if(col == DOFMatrix::UNUSED_ENTRY) continue;