diff --git a/AMDiS/src/Element.h b/AMDiS/src/Element.h index b2faa2bec348163982055f8b9a0450070f10d8da..d10d704ec3479c95d056084bd775c8ebf80ae7e6 100644 --- a/AMDiS/src/Element.h +++ b/AMDiS/src/Element.h @@ -216,8 +216,8 @@ namespace AMDiS { virtual DofFace getFace(int localFaceIndex) const = 0; /// Returns either vertex, edge or face of the element. - template<typename T> - T getObject(int index); +/* template<typename T> */ +/* T getObject(int index); */ /// Returns the number of parts of type i in this element virtual int getGeo(GeoIndex i) const = 0; @@ -619,5 +619,7 @@ namespace AMDiS { void writeDotFile(Element *el, std::string filename, int maxLevels = -1); } +#include "Element.hh" + #endif // AMDIS_ELEMENT_H diff --git a/AMDiS/src/Element.hh b/AMDiS/src/Element.hh new file mode 100644 index 0000000000000000000000000000000000000000..53d46b774594cc150e12ef294d88ec20002f102a --- /dev/null +++ b/AMDiS/src/Element.hh @@ -0,0 +1,32 @@ +// +// Software License for AMDiS +// +// Copyright (c) 2010 Dresden University of Technology +// All rights reserved. +// Authors: Simon Vey, Thomas Witkowski et al. +// +// This file is part of AMDiS +// +// See also license.opensource.txt in the distribution. + + +namespace AMDiS { + +// template<> +// DegreeOfFreedom Element::getObject<DegreeOfFreedom>(int index) +// { +// return dof[index][0]; +// } + +// template<> +// DofEdge Element::getObject<DofEdge>(int index) +// { +// return getEdge(index); +// } + +// template<> +// DofFace Element::getObject<DofFace>(int index) +// { +// return getFace(index); +// } +} diff --git a/AMDiS/src/parallel/ElementObjectData.h b/AMDiS/src/parallel/ElementObjectData.h index 6ba200f892eb13e60e0e68a704d8e7a4847b8114..317b9de8116be9348daa93ad11367fa7128ccb44 100644 --- a/AMDiS/src/parallel/ElementObjectData.h +++ b/AMDiS/src/parallel/ElementObjectData.h @@ -90,7 +90,8 @@ namespace AMDiS { void addVertex(Element *el, int ith, BoundaryType bound = INTERIOR) { - DegreeOfFreedom vertex = el->getObject<DegreeOfFreedom>(ith); + // DegreeOfFreedom vertex = el->getObject<DegreeOfFreedom>(ith); + DegreeOfFreedom vertex = el->getDof(ith, 0); int elIndex = el->getIndex(); ElementObjectData elObj(elIndex, ith, bound); @@ -101,7 +102,8 @@ namespace AMDiS { void addEdge(Element *el, int ith, BoundaryType bound = INTERIOR) { - DofEdge edge = el->getObject<DofEdge>(ith); + // DofEdge edge = el->getObject<DofEdge>(ith); + DofEdge edge = el->getEdge(ith); int elIndex = el->getIndex(); ElementObjectData elObj(elIndex, ith, bound); @@ -112,7 +114,8 @@ namespace AMDiS { void addFace(Element *el, int ith, BoundaryType bound = INTERIOR) { - DofFace face = el->getObject<DofFace>(ith); + // DofFace face = el->getObject<DofFace>(ith); + DofFace face = el->getFace(ith); int elIndex = el->getIndex(); ElementObjectData elObj(elIndex, ith, bound); diff --git a/AMDiS/src/parallel/ParMetisPartitioner.cc b/AMDiS/src/parallel/ParMetisPartitioner.cc index abd56da69e31f5f172f2a61c8f0f9dfedc15369b..51df6a8fe7675b4ac9ea31f342a67fbf455c47aa 100644 --- a/AMDiS/src/parallel/ParMetisPartitioner.cc +++ b/AMDiS/src/parallel/ParMetisPartitioner.cc @@ -97,10 +97,13 @@ namespace AMDiS { // write eind entries (element nodes) for (int i = 0; i < dim + 1; i++) { - if (mapLocalGlobal) + if (mapLocalGlobal) { + TEST_EXIT_DBG(mapLocalGlobal->count(element->getDof(i, 0))) + ("Should not happen!\n"); *ptr_eind = (*mapLocalGlobal)[element->getDof(i, 0)]; - else + } else { *ptr_eind = element->getDof(i, 0); + } ptr_eind++; }