Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind ü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. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit ceecc7c5 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Most changes due to correct deletion of meshes

parent d43a4c28
...@@ -58,7 +58,7 @@ endif ...@@ -58,7 +58,7 @@ endif
libamdis_la_SOURCES = \ libamdis_la_SOURCES = \
$(PARALLEL_AMDIS_SOURCES) \ $(PARALLEL_AMDIS_SOURCES) \
$(SOURCE_DIR)/MultiGridPreconWrapper.h $(SOURCE_DIR)/MultiGridPreconWrapper.cc \ $(SOURCE_DIR)/MultiGridPreconWrapper.h $(SOURCE_DIR)/MultiGridPreconWrapper.cc \
$(SOURCE_DIR)/LagrangeInterpolRestrict.h $(SOURCE_DIR)/LagrangeInterpolRestrict.cc \ $(SOURCE_DIR)/LagrangeInterpolRestrict.h \
$(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \ $(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \
$(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \ $(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \
$(SOURCE_DIR)/InterpolRestrictMatrix.h $(SOURCE_DIR)/InterpolRestrictMatrix.cc \ $(SOURCE_DIR)/InterpolRestrictMatrix.h $(SOURCE_DIR)/InterpolRestrictMatrix.cc \
...@@ -84,7 +84,8 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \ ...@@ -84,7 +84,8 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \
$(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \ $(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \
$(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.cc $(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \
$(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
$(SOURCE_DIR)/ProblemInterpolScal.h $(SOURCE_DIR)/ProblemInterpolScal.cc \ $(SOURCE_DIR)/ProblemInterpolScal.h $(SOURCE_DIR)/ProblemInterpolScal.cc \
$(SOURCE_DIR)/ProblemInterpolVec.h $(SOURCE_DIR)/ProblemInterpolVec.cc \ $(SOURCE_DIR)/ProblemInterpolVec.h $(SOURCE_DIR)/ProblemInterpolVec.cc \
......
...@@ -81,7 +81,6 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \ ...@@ -81,7 +81,6 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
$(SOURCE_DIR)/MultiGridPreconWrapper.h \ $(SOURCE_DIR)/MultiGridPreconWrapper.h \
$(SOURCE_DIR)/MultiGridPreconWrapper.cc \ $(SOURCE_DIR)/MultiGridPreconWrapper.cc \
$(SOURCE_DIR)/LagrangeInterpolRestrict.h \ $(SOURCE_DIR)/LagrangeInterpolRestrict.h \
$(SOURCE_DIR)/LagrangeInterpolRestrict.cc \
$(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \ $(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \
$(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \ $(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \
$(SOURCE_DIR)/InterpolRestrictMatrix.h \ $(SOURCE_DIR)/InterpolRestrictMatrix.h \
...@@ -113,8 +112,8 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \ ...@@ -113,8 +112,8 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
$(SOURCE_DIR)/ElementPartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h \
$(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.cc \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh \
$(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorMap.cc $(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
$(SOURCE_DIR)/ProblemInterpolScal.h \ $(SOURCE_DIR)/ProblemInterpolScal.h \
$(SOURCE_DIR)/ProblemInterpolScal.cc \ $(SOURCE_DIR)/ProblemInterpolScal.cc \
...@@ -260,7 +259,6 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \ ...@@ -260,7 +259,6 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
@USE_PARALLEL_AMDIS_TRUE@ libamdis_la-ParMetisPartitioner.lo @USE_PARALLEL_AMDIS_TRUE@ libamdis_la-ParMetisPartitioner.lo
am_libamdis_la_OBJECTS = $(am__objects_1) \ am_libamdis_la_OBJECTS = $(am__objects_1) \
libamdis_la-MultiGridPreconWrapper.lo \ libamdis_la-MultiGridPreconWrapper.lo \
libamdis_la-LagrangeInterpolRestrict.lo \
libamdis_la-InterpolRestrictMatrix.lo \ libamdis_la-InterpolRestrictMatrix.lo \
libamdis_la-DOFIndexed.lo libamdis_la-GNUPlotWriter.lo \ libamdis_la-DOFIndexed.lo libamdis_la-GNUPlotWriter.lo \
libamdis_la-StlVector.lo libamdis_la-V3Vector.lo \ libamdis_la-StlVector.lo libamdis_la-V3Vector.lo \
...@@ -501,7 +499,7 @@ INCLUDES = $(AMDIS_INCLUDES) $(PARALLEL_INCLUDES) ...@@ -501,7 +499,7 @@ INCLUDES = $(AMDIS_INCLUDES) $(PARALLEL_INCLUDES)
libamdis_la_SOURCES = \ libamdis_la_SOURCES = \
$(PARALLEL_AMDIS_SOURCES) \ $(PARALLEL_AMDIS_SOURCES) \
$(SOURCE_DIR)/MultiGridPreconWrapper.h $(SOURCE_DIR)/MultiGridPreconWrapper.cc \ $(SOURCE_DIR)/MultiGridPreconWrapper.h $(SOURCE_DIR)/MultiGridPreconWrapper.cc \
$(SOURCE_DIR)/LagrangeInterpolRestrict.h $(SOURCE_DIR)/LagrangeInterpolRestrict.cc \ $(SOURCE_DIR)/LagrangeInterpolRestrict.h \
$(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \ $(SOURCE_DIR)/BiCGStab.h $(SOURCE_DIR)/BiCGStab.hh \
$(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \ $(SOURCE_DIR)/BiCGStab2.h $(SOURCE_DIR)/BiCGStab2.hh \
$(SOURCE_DIR)/InterpolRestrictMatrix.h $(SOURCE_DIR)/InterpolRestrictMatrix.cc \ $(SOURCE_DIR)/InterpolRestrictMatrix.h $(SOURCE_DIR)/InterpolRestrictMatrix.cc \
...@@ -527,7 +525,8 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \ ...@@ -527,7 +525,8 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \
$(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \ $(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \
$(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.cc $(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \
$(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
$(SOURCE_DIR)/ProblemInterpolScal.h $(SOURCE_DIR)/ProblemInterpolScal.cc \ $(SOURCE_DIR)/ProblemInterpolScal.h $(SOURCE_DIR)/ProblemInterpolScal.cc \
$(SOURCE_DIR)/ProblemInterpolVec.h $(SOURCE_DIR)/ProblemInterpolVec.cc \ $(SOURCE_DIR)/ProblemInterpolVec.h $(SOURCE_DIR)/ProblemInterpolVec.cc \
...@@ -816,7 +815,6 @@ distclean-compile: ...@@ -816,7 +815,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-JacobiSmoother.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-JacobiSmoother.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-Lagrange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-Lagrange.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-LagrangeInterpolRestrict.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-LeafData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-LeafData.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-Line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-Line.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-MacroElement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-MacroElement.Plo@am__quote@
...@@ -944,13 +942,6 @@ libamdis_la-MultiGridPreconWrapper.lo: $(SOURCE_DIR)/MultiGridPreconWrapper.cc ...@@ -944,13 +942,6 @@ libamdis_la-MultiGridPreconWrapper.lo: $(SOURCE_DIR)/MultiGridPreconWrapper.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @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-MultiGridPreconWrapper.lo `test -f '$(SOURCE_DIR)/MultiGridPreconWrapper.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/MultiGridPreconWrapper.cc @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-MultiGridPreconWrapper.lo `test -f '$(SOURCE_DIR)/MultiGridPreconWrapper.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/MultiGridPreconWrapper.cc
libamdis_la-LagrangeInterpolRestrict.lo: $(SOURCE_DIR)/LagrangeInterpolRestrict.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-LagrangeInterpolRestrict.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-LagrangeInterpolRestrict.Tpo" -c -o libamdis_la-LagrangeInterpolRestrict.lo `test -f '$(SOURCE_DIR)/LagrangeInterpolRestrict.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/LagrangeInterpolRestrict.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-LagrangeInterpolRestrict.Tpo" "$(DEPDIR)/libamdis_la-LagrangeInterpolRestrict.Plo"; else rm -f "$(DEPDIR)/libamdis_la-LagrangeInterpolRestrict.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SOURCE_DIR)/LagrangeInterpolRestrict.cc' object='libamdis_la-LagrangeInterpolRestrict.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-LagrangeInterpolRestrict.lo `test -f '$(SOURCE_DIR)/LagrangeInterpolRestrict.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/LagrangeInterpolRestrict.cc
libamdis_la-InterpolRestrictMatrix.lo: $(SOURCE_DIR)/InterpolRestrictMatrix.cc libamdis_la-InterpolRestrictMatrix.lo: $(SOURCE_DIR)/InterpolRestrictMatrix.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-InterpolRestrictMatrix.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo" -c -o libamdis_la-InterpolRestrictMatrix.lo `test -f '$(SOURCE_DIR)/InterpolRestrictMatrix.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/InterpolRestrictMatrix.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-InterpolRestrictMatrix.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo" -c -o libamdis_la-InterpolRestrictMatrix.lo `test -f '$(SOURCE_DIR)/InterpolRestrictMatrix.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/InterpolRestrictMatrix.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo" "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Plo"; else rm -f "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo"; exit 1; fi @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo" "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Plo"; else rm -f "$(DEPDIR)/libamdis_la-InterpolRestrictMatrix.Tpo"; exit 1; fi
......
...@@ -85,7 +85,9 @@ ...@@ -85,7 +85,9 @@
#include "RefinementManager2d.h" #include "RefinementManager2d.h"
#include "RefinementManager3d.h" #include "RefinementManager3d.h"
#include "RobinBC.h" #include "RobinBC.h"
#include "SmootherBase.h"
#include "SolutionDataStorage.h" #include "SolutionDataStorage.h"
#include "SparseVector.h"
#include "SurfaceOperator.h" #include "SurfaceOperator.h"
#include "SurfaceQuadrature.h" #include "SurfaceQuadrature.h"
#include "SystemVector.h" #include "SystemVector.h"
......
...@@ -19,33 +19,31 @@ namespace AMDiS { ...@@ -19,33 +19,31 @@ namespace AMDiS {
void CoarseningManager2d::coarsenTriangle(Triangle *el) void CoarseningManager2d::coarsenTriangle(Triangle *el)
{ {
FUNCNAME("CoarseningManager2d::coarseTriangle"); FUNCNAME("CoarseningManager2d::coarseTriangle()");
Triangle *child[2];
child[0] = dynamic_cast<Triangle*>(const_cast<Element*>( el->getChild(0))); Triangle *child[2];
child[1] = dynamic_cast<Triangle*>(const_cast<Element*>( el->getChild(1))); child[0] = dynamic_cast<Triangle*>(const_cast<Element*>(el->getChild(0)));
child[1] = dynamic_cast<Triangle*>(const_cast<Element*>(el->getChild(1)));
TEST_EXIT_DBG(child[0]->getMark() < 0 && child[1]->getMark() < 0) TEST_EXIT_DBG(child[0]->getMark() < 0 && child[1]->getMark() < 0)
("element %d with children[%d,%d] must not be coarsend!\n", ("element %d with children[%d,%d] must not be coarsend!\n",
el->getIndex(), child[0]->getIndex(), child[1]->getIndex()); el->getIndex(), child[0]->getIndex(), child[1]->getIndex());
if (mesh->getNumberOfDOFs(EDGE)) if (mesh->getNumberOfDOFs(EDGE)) {
{
/****************************************************************************/ /****************************************************************************/
/* remove dof from common edge of child[0] and child[1] */ /* remove dof from common edge of child[0] and child[1] */
/****************************************************************************/ /****************************************************************************/
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(4)), EDGE); mesh->freeDOF(const_cast<int*>(child[0]->getDOF(4)), EDGE);
} }
if (mesh->getNumberOfDOFs(CENTER)) if (mesh->getNumberOfDOFs(CENTER)) {
{
/****************************************************************************/ /****************************************************************************/
/* remove dof from the barycenters of child[0] and child[1] */ /* remove dof from the barycenters of child[0] and child[1] */
/****************************************************************************/ /****************************************************************************/
int node = mesh->getNode(CENTER); int node = mesh->getNode(CENTER);
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(node)), 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<int*>(child[1]->getDOF(node)), CENTER);
} }
el->coarsenElementData(child[0], child[1]); el->coarsenElementData(child[0], child[1]);
...@@ -53,7 +51,6 @@ namespace AMDiS { ...@@ -53,7 +51,6 @@ namespace AMDiS {
el->setFirstChild(NULL); el->setFirstChild(NULL);
el->setSecondChild(NULL); el->setSecondChild(NULL);
mesh->freeElement(child[0]); mesh->freeElement(child[0]);
mesh->freeElement(child[1]); mesh->freeElement(child[1]);
...@@ -195,9 +192,7 @@ namespace AMDiS { ...@@ -195,9 +192,7 @@ namespace AMDiS {
if (coarse_list.doCoarsePatch(n_neigh)) { if (coarse_list.doCoarsePatch(n_neigh)) {
int n_neigh_periodic; int n_neigh_periodic;
DegreeOfFreedom *next_edge[2]; DegreeOfFreedom *next_edge[2];
RCNeighbourList *periodicList; RCNeighbourList *periodicList;
while (edge[0] != NULL) { while (edge[0] != NULL) {
......
...@@ -40,7 +40,7 @@ namespace AMDiS { ...@@ -40,7 +40,7 @@ namespace AMDiS {
class CreatorInterface class CreatorInterface
{ {
public: public:
virtual ~CreatorInterface() {}; virtual ~CreatorInterface() {}
/** \brief /** \brief
* Must be implemented by sub classes of CreatorInterface. * Must be implemented by sub classes of CreatorInterface.
...@@ -51,14 +51,14 @@ namespace AMDiS { ...@@ -51,14 +51,14 @@ namespace AMDiS {
/** \brief /** \brief
* Can be implemented by sub classes. * Can be implemented by sub classes.
*/ */
virtual void free(BaseClass *) {}; virtual void free(BaseClass *) {}
/** \brief /** \brief
* *
*/ */
virtual bool isNullCreator() { virtual bool isNullCreator() {
return false; return false;
}; }
}; };
/** \brief /** \brief
...@@ -73,14 +73,14 @@ namespace AMDiS { ...@@ -73,14 +73,14 @@ namespace AMDiS {
*/ */
BaseClass* create() { BaseClass* create() {
return NULL; return NULL;
}; }
/** \brief /** \brief
* *
*/ */
virtual bool isNullCreator() { virtual bool isNullCreator() {
return true; return true;
}; }
}; };
} }
......
...@@ -261,5 +261,4 @@ namespace AMDiS { ...@@ -261,5 +261,4 @@ namespace AMDiS {
creator = NEW ElementRegion_ED::Creator; creator = NEW ElementRegion_ED::Creator;
addCreator("ElementRegion_ED", creator); addCreator("ElementRegion_ED", creator);
} }
} }
...@@ -52,7 +52,7 @@ namespace AMDiS { ...@@ -52,7 +52,7 @@ namespace AMDiS {
TEST_EXIT(creatorMap[key] == NULL) TEST_EXIT(creatorMap[key] == NULL)
("there is already a creator for key %s\n",key.c_str()); ("there is already a creator for key %s\n",key.c_str());
creatorMap[key] = creator; creatorMap[key] = creator;
}; }
/** \brief /** \brief
* Creates a object of the type corresponding to key. * Creates a object of the type corresponding to key.
...@@ -63,7 +63,9 @@ namespace AMDiS { ...@@ -63,7 +63,9 @@ namespace AMDiS {
CreatorInterface<BaseClass> *creator = creatorMap[key]; CreatorInterface<BaseClass> *creator = creatorMap[key];
TEST_EXIT(creator)("no creator for key %s\n", key.c_str()); TEST_EXIT(creator)("no creator for key %s\n", key.c_str());
return creator; return creator;
}; }
static void clear();
static void addDefaultCreators(); static void addDefaultCreators();
...@@ -72,14 +74,13 @@ namespace AMDiS { ...@@ -72,14 +74,13 @@ namespace AMDiS {
* Constructor is protected because derived maps should be singleton. * Constructor is protected because derived maps should be singleton.
*/ */
static void init() { static void init() {
if(!initialized) { if (!initialized) {
initialized = true; initialized = true;
NullCreator<BaseClass> *nullCreator = new NullCreator<BaseClass>; NullCreator<BaseClass> *nullCreator = new NullCreator<BaseClass>;
addCreator("no", nullCreator); addCreator("no", nullCreator);
addCreator("0", nullCreator);
addDefaultCreators(); addDefaultCreators();
} }
}; }
protected: protected:
/** \brief /** \brief
...@@ -98,4 +99,6 @@ namespace AMDiS { ...@@ -98,4 +99,6 @@ namespace AMDiS {
} }
#include "CreatorMap.hh"
#endif #endif
#include "MemoryManager.h"
#include <map>
namespace AMDiS {
template<typename BaseClass>
void CreatorMap<BaseClass>::clear()
{
typename std::map< std::string, CreatorInterface<BaseClass>* >::iterator it;
for (it = creatorMap.begin();
it != creatorMap.end();
++it) {
DELETE it->second;
}
}
}
...@@ -61,10 +61,15 @@ namespace AMDiS { ...@@ -61,10 +61,15 @@ namespace AMDiS {
{ {
FUNCNAME("DOFMatrix::~DOFMatrix()"); FUNCNAME("DOFMatrix::~DOFMatrix()");
matrix.clear();
if (rowFESpace && rowFESpace->getAdmin()) { if (rowFESpace && rowFESpace->getAdmin()) {
(const_cast<DOFAdmin*>(rowFESpace->getAdmin()))->removeDOFIndexed(this); (const_cast<DOFAdmin*>(rowFESpace->getAdmin()))->removeDOFIndexed(this);
} }
if (boundaryManager)
DELETE boundaryManager;
if (elementMatrix) if (elementMatrix)
DELETE elementMatrix; DELETE elementMatrix;
} }
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
namespace AMDiS { namespace AMDiS {
std::map<DegreeOfFreedom*, bool> Element::deletedDOFs;
int Element::getRegion() const int Element::getRegion() const
{ {
ElementRegion_ED* red_;
if (!elementData) if (!elementData)
return -1; return -1;
red_ = dynamic_cast<ElementRegion_ED*>(elementData->getElementData(ELEMENT_REGION)); ElementRegion_ED* red = dynamic_cast<ElementRegion_ED*>(elementData->getElementData(ELEMENT_REGION));
if (red_) if (red) {
return red_->getRegion(); return red->getRegion();
}
return -1; return -1;
} }
...@@ -35,12 +35,9 @@ namespace AMDiS { ...@@ -35,12 +35,9 @@ namespace AMDiS {
Element::Element(Mesh *aMesh) Element::Element(Mesh *aMesh)
{ {
mesh = aMesh; mesh = aMesh;
index = mesh ? mesh->getNextElementIndex() : -1; index = mesh ? mesh->getNextElementIndex() : -1;
child[0] = NULL; child[0] = NULL;
child[1] = NULL; child[1] = NULL;
newCoord = NULL; newCoord = NULL;
elementData = NULL; elementData = NULL;
...@@ -64,6 +61,29 @@ namespace AMDiS { ...@@ -64,6 +61,29 @@ namespace AMDiS {
if (newCoord) { if (newCoord) {
DELETE newCoord; DELETE newCoord;
} }
if (elementData) {
elementData->deleteDecorated();
DELETE elementData;
}
}
bool Element::deleteElementData(int typeID)
{
FUNCNAME("Element::deleteElementData()");
if (elementData) {
if (elementData->isOfType(typeID)) {
ElementData *tmp = elementData;
elementData = elementData->getDecorated();
DELETE tmp;
tmp = NULL;
return true;
} else {
return elementData->deleteDecorated(typeID);
}
}
return false;
} }
void Element::deleteElementDOFs() void Element::deleteElementDOFs()
...@@ -81,20 +101,17 @@ namespace AMDiS { ...@@ -81,20 +101,17 @@ namespace AMDiS {
if (ndof > 0) { if (ndof > 0) {
for (int i = 0; i < mesh->getGeo(position); i++) { for (int i = 0; i < mesh->getGeo(position); i++) {
if (dof[j] != NULL) { if (dof[j]) {
if (Mesh::serializedDOFs.count(dof[j][0]) == 0) { if (deletedDOFs.count(dof[j]) == 0) {
// std::cout << "FREE INNER: " << ndof << std::endl; deletedDOFs[dof[j]] = true;
FREE_MEMORY(dof[j], DegreeOfFreedom, ndof); FREE_MEMORY(dof[j], DegreeOfFreedom, ndof);
Mesh::serializedDOFs[dof[j][0]] = NULL;
} }
} }
j++; j++;
} }
} }
} }
// std::cout << "FREE OUTER: " << mesh->getNumberOfNodes() << std::endl;
FREE_MEMORY(dof, DegreeOfFreedom*, mesh->getNumberOfNodes()); FREE_MEMORY(dof, DegreeOfFreedom*, mesh->getNumberOfNodes());
if (child[0]) { if (child[0]) {
...@@ -110,12 +127,14 @@ namespace AMDiS { ...@@ -110,12 +127,14 @@ namespace AMDiS {
Element *el; Element *el;
if (isLine()) { if (isLine()) {
el = NEW Line(mesh); el = NEW Line(NULL);
} else if (isTriangle()) { } else if (isTriangle()) {
el = NEW Triangle(mesh); el = NEW Triangle(NULL);
} else { } else {
el = NEW Tetrahedron(mesh); el = NEW Tetrahedron(NULL);
} }
el->mesh = mesh;
el->index = index; el->index = index;
el->mark = mark; el->mark = mark;
if (newCoord) { if (newCoord) {
......
...@@ -464,7 +464,7 @@ namespace AMDiS { ...@@ -464,7 +464,7 @@ namespace AMDiS {
/** \brief /** \brief
* Coarsens Element's leaf data * Coarsens Element's leaf data
*/ */
inline void coarsenElementData(Element* child1, Element* child2, int elType=0) { inline void coarsenElementData(Element* child1, Element* child2, int elType = 0) {
ElementData *childData; ElementData *childData;
childData = child1->getElementData(); childData = child1->getElementData();
if (childData) { if (childData) {
...@@ -498,22 +498,9 @@ namespace AMDiS { ...@@ -498,22 +498,9 @@ namespace AMDiS {
} }
/** \brief /** \brief
* kills \ref elementData * Deletes the \ref elementData with a specific typeID.
*/ */
bool deleteElementData(int typeID) { bool deleteElementData(int typeID);
FUNCNAME("Element::deleteElementData()");
if (elementData) {
if (elementData->isOfType(typeID)) {
ElementData *tmp = elementData;
elementData = elementData->getDecorated();
DELETE tmp;
return true;
} else {
return elementData->deleteDecorated(typeID);
}
}
return false;
}
/** \brief