Commit 04249ebf authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed several very small problems in parallel code, part II.

parent 8c7d3860
......@@ -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
//
// 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);
// }
}
......@@ -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);
......
......@@ -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++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment