Commit 739be0ef authored by Thomas Witkowski's avatar Thomas Witkowski

A lot of work on mesh repartitioning in parallel computations.

parent dd514ad5
......@@ -85,7 +85,7 @@ NM="/usr/bin/nm -B"
LN_S="ln -s"
# What is the maximum length of a command?
max_cmd_len=98304
max_cmd_len=1572864
# Object file suffix (normally "o").
objext=o
......@@ -128,7 +128,7 @@ old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="/usr/lib64/mpi/gcc/openmpi//bin/mpicc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
......@@ -233,10 +233,10 @@ finish_eval=""
hardcode_into_libs=yes
# Compile-time system search path for libraries.
sys_lib_search_path_spec="/usr/lib64/gcc/x86_64-suse-linux/4.1.2 /usr/lib64 /lib64 /fastfs/wir/local/lib /usr/x86_64-suse-linux/lib"
sys_lib_search_path_spec="/usr/lib64/gcc/x86_64-suse-linux/4.5 /usr/lib64 /lib64 /usr/x86_64-suse-linux/lib"
# Run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/lib64/Xaw3d /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/lib/Xaw3d /usr/x86_64-suse-linux/lib /usr/local/lib /opt/kde3/lib /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /opt/kde3/lib64 /usr/lib64/graphviz /usr/lib64/graphviz/sharp /usr/lib64/graphviz/java /usr/lib64/graphviz/perl /usr/lib64/graphviz/php /usr/lib64/graphviz/ocaml /usr/lib64/graphviz/python /usr/lib64/graphviz/lua /usr/lib64/graphviz/tcl /usr/lib64/graphviz/guile /usr/lib64/graphviz/ruby /usr/lib64/octave-3.2.4 "
# Whether dlopen is supported.
dlopen_support=unknown
......@@ -259,7 +259,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
# A language specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
CC="/usr/lib64/mpi/gcc/openmpi//bin/mpicc"
# Is the compiler the GNU compiler?
with_gcc=yes
......@@ -8914,7 +8914,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
# A language specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicxx"
CC="/usr/lib64/mpi/gcc/openmpi//bin/mpicxx"
# Is the compiler the GNU compiler?
with_gcc=yes
......@@ -9039,17 +9039,17 @@ file_list_spec=""
hardcode_action=immediate
# The directories searched by this compiler when creating a shared library.
compiler_lib_search_dirs="/usr/lib64 /licsoft/libraries/openmpi/1.2.6/64bit/lib /usr/lib64/gcc/x86_64-suse-linux/4.1.2 /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /fastfs/wir/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.."
compiler_lib_search_dirs="/usr/lib64/mpi/gcc/openmpi/lib64 /usr/lib64/gcc/x86_64-suse-linux/4.5 /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib /usr/lib64/gcc/x86_64-suse-linux/4.5/../../.."
# Dependencies to place before and after the objects being linked to
# create a shared library.
predep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginS.o"
postdep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crtn.o"
predep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.5/crtbeginS.o"
postdep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.5/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/crtn.o"
predeps=""
postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path="-L/usr/lib64 -L/licsoft/libraries/openmpi/1.2.6/64bit/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/fastfs/wir/local/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.."
compiler_lib_search_path="-L/usr/lib64/mpi/gcc/openmpi/lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.5 -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.5/../../.."
# ### END LIBTOOL TAG CONFIG: CXX
#ifndef AMDIS_H
#define AMDIS_H
#include "stdint.h"
#include "AbstractFunction.h"
#include "AdaptInfo.h"
#include "AdaptInstationary.h"
......
#include <fstream>
#include <stdint.h>
#include "ArhReader.h"
#include "Mesh.h"
......@@ -107,13 +108,13 @@ namespace AMDiS {
if (!macroElement) {
Element *mEl = elInfo->getMacroElement()->getElement();
for (int i = 0; i <= mesh->getDim(); i++)
(*vec)[mEl->getDOF(i, 0)] = values[valuePos++];
(*vec)[mEl->getDof(i, 0)] = values[valuePos++];
macroElement = true;
}
Element *el = elInfo->getElement();
if (!el->isLeaf())
(*vec)[el->getChild(0)->getDOF(mesh->getDim(), 0)] = values[valuePos++];
(*vec)[el->getChild(0)->getDof(mesh->getDim(), 0)] = values[valuePos++];
elInfo = stack.traverseNext(elInfo);
}
......
#include <fstream>
#include <stdint.h>
#include "ArhWriter.h"
#include "Mesh.h"
......@@ -73,7 +74,7 @@ namespace AMDiS {
values[i].clear();
for (int j = 0; j <= mesh->getDim(); j++)
values[i].push_back((*vecs[i])[elInfo->getElement()->getDOF(j, 0)]);
values[i].push_back((*vecs[i])[elInfo->getElement()->getDof(j, 0)]);
}
}
......@@ -81,7 +82,7 @@ namespace AMDiS {
if (!elInfo->getElement()->isLeaf()) {
for (unsigned int i = 0; i < vecs.size(); i++)
values[i].push_back((*vecs[i])[elInfo->getElement()->getChild(0)->getDOF(mesh->getDim(), 0)]);
values[i].push_back((*vecs[i])[elInfo->getElement()->getChild(0)->getDof(mesh->getDim(), 0)]);
}
elInfo = stack.traverseNext(elInfo);
......
......@@ -70,12 +70,12 @@ 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<int*>( child[0]->getDof(node+0)));
parent->setDof(node+1, const_cast<int*>( child[1]->getDof(node+1)));
}
if (mesh->getNumberOfDOFs(CENTER) && !mesh->queryCoarseDOFs()) {
parent->setDOF(mesh->getNode(CENTER), mesh->getDof(CENTER));
parent->setDof(mesh->getNode(CENTER), mesh->getDof(CENTER));
}
/*--------------------------------------------------------------------------*/
......@@ -102,13 +102,13 @@ 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<int*>( 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<int*>( child[0]->getDof(mesh->getNode(CENTER))), CENTER);
mesh->freeDof(const_cast<int*>( child[1]->getDof(mesh->getNode(CENTER))), CENTER);
}
parent->coarsenElementData(child[0], child[1]);
......
......@@ -31,14 +31,14 @@ 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<int*>(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<int*>(child[0]->getDof(node)), CENTER);
mesh->freeDof(const_cast<int*>(child[1]->getDof(node)), CENTER);
}
el->coarsenElementData(child[0], child[1]);
......@@ -71,10 +71,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<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;
}
......@@ -83,10 +83,10 @@ namespace AMDiS {
int node = mesh->getNode(EDGE);
// get new dof on el at the midpoint of the coarsening edge
if (!el->getDOF(node + 2)) {
el->setDOF(node + 2, mesh->getDof(EDGE));
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<int*>(el->getDof(node + 2)));
}
}
......@@ -149,12 +149,12 @@ 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));
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));
} else {
edge[1] = const_cast<int*>(el->getDOF(0));
edge[0] = const_cast<int*>(el->getDOF(1));
edge[1] = const_cast<int*>(el->getDof(0));
edge[0] = const_cast<int*>(el->getDof(1));
}
coarse_list.setElement(0, el, true);
......
......@@ -47,12 +47,12 @@ 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));
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));
} else {
edge[1] = const_cast<int*>(el->getDOF(0));
edge[0] = const_cast<int*>(el->getDOF(1));
edge[1] = const_cast<int*>(el->getDof(0));
edge[0] = const_cast<int*>(el->getDof(1));
}
coarsenList->setElement(0, el, true);
......@@ -135,13 +135,13 @@ namespace AMDiS {
if (mesh->getNumberOfDOFs(EDGE)) {
node = mesh->getNode(EDGE) + Tetrahedron::nChildEdge[el_type][0][dir];
mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), EDGE);
mesh->freeDof(const_cast<int*>( child[0]->getDof(node)), EDGE);
}
if (mesh->getNumberOfDOFs(FACE)) {
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][0][dir];
mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), FACE);
mesh->freeDof(const_cast<int*>( child[0]->getDof(node)), FACE);
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][1][dir];
mesh->freeDof(const_cast<int*>( child[1]->getDOF(node)), FACE);
mesh->freeDof(const_cast<int*>( child[1]->getDof(node)), FACE);
}
}
}
......@@ -153,14 +153,14 @@ namespace AMDiS {
if (mesh->getNumberOfDOFs(FACE)) {
node = mesh->getNode(FACE);
mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), FACE);
mesh->freeDof(const_cast<int*>( child[0]->getDof(node)), FACE);
}
if (mesh->getNumberOfDOFs(CENTER)) {
node = mesh->getNode(CENTER);
for (i = 0; i < 2; i++)
mesh->freeDof(const_cast<int*>( child[i]->getDOF(node)), CENTER);
mesh->freeDof(const_cast<int*>( child[i]->getDof(node)), CENTER);
}
/****************************************************************************/
......@@ -238,20 +238,20 @@ namespace AMDiS {
while (neigh != el) {
for (j = 0; j < n_vertices; j++)
if (neigh->getDOF(j) == edge[0]) break;
if (neigh->getDof(j) == edge[0]) break;
for (k = 0; k < n_vertices; k++)
if (neigh->getDOF(k) == edge[1]) break;
if (neigh->getDof(k) == edge[1]) break;
if (j > 3 || k > 3) {
for (j = 0; j < n_vertices; j++)
if (mesh->associated(neigh->getDOF(j, 0), edge[0][0])) break;
if (mesh->associated(neigh->getDof(j, 0), edge[0][0])) break;
for (k = 0; k < n_vertices; k++)
if (mesh->associated(neigh->getDOF(k, 0), edge[1][0])) break;
if (mesh->associated(neigh->getDof(k, 0), edge[1][0])) break;
TEST_EXIT_DBG(j < n_vertices && k < n_vertices)
("dof %d or dof %d not found on element %d with nodes (%d %d %d %d)\n",
edge[0][0], edge[1][0], neigh->getIndex(), neigh->getDOF(0,0),
neigh->getDOF(1,0), neigh->getDOF(2,0), neigh->getDOF(3,0));
edge[0][0], edge[1][0], neigh->getIndex(), neigh->getDof(0,0),
neigh->getDof(1,0), neigh->getDof(2,0), neigh->getDof(3,0));
}
edge_no = Tetrahedron::edgeOfDofs[j][k];
coarsenList->setCoarsePatch(*n_neigh, edge_no == 0);
......@@ -323,7 +323,7 @@ namespace AMDiS {
/* get dof for coarsening edge */
/****************************************************************************/
node = mesh->getNode(EDGE);
if (!(dof = const_cast<int*>( el->getDOF(node))))
if (!(dof = const_cast<int*>( el->getDof(node))))
dof = mesh->getDof(EDGE);
} else {
dof = NULL;
......@@ -356,13 +356,13 @@ namespace AMDiS {
/* remove dof's of the coarsening edge */
/****************************************************************************/
mesh->freeDof(const_cast<int*>( el->getChild(0)->getDOF(3)), VERTEX);
mesh->freeDof(const_cast<int*>( el->getChild(0)->getDof(3)), VERTEX);
mesh->incrementNumberOfVertices(-1);
if (mesh->getNumberOfDOFs(EDGE)) {
node = mesh->getNode(EDGE) + 2;
mesh->freeDof(const_cast<int*>( el->getChild(0)->getDOF(node)), EDGE);
mesh->freeDof(const_cast<int*>( el->getChild(1)->getDOF(node)), EDGE);
mesh->freeDof(const_cast<int*>( el->getChild(0)->getDof(node)), EDGE);
mesh->freeDof(const_cast<int*>( el->getChild(1)->getDof(node)), EDGE);
}
if (coarsenList->getElement(0)->isNewCoordSet())
......
......@@ -257,12 +257,12 @@ namespace AMDiS {
void init();
/** \brief
* Adds one index to all DOF lists. Used by Mesh::getDOF() to provide
* Adds one index to all DOF lists. Used by Mesh::getDof() to provide
* DOFS for a specific position
*/
int getDOFIndex();
/// Frees index dof. Used by Mesh::getDOF()
/// Frees index dof. Used by Mesh::getDof()
void freeDofIndex(int dof);
///
......
......@@ -46,9 +46,9 @@ namespace AMDiS {
Element *el = list.getElement(0);
int n0 = feSpace->getAdmin()->getNumberOfPreDOFs(VERTEX);
DegreeOfFreedom dof0 = el->getDOF(0, n0);
DegreeOfFreedom dof1 = el->getDOF(1, n0);
DegreeOfFreedom dof_new = el->getChild(0)->getDOF(feSpace->getMesh()->getDim(), n0);
DegreeOfFreedom dof0 = el->getDof(0, n0);
DegreeOfFreedom dof1 = el->getDof(1, n0);
DegreeOfFreedom dof_new = el->getChild(0)->getDof(feSpace->getMesh()->getDim(), n0);
vec[dof_new] = vec[dof0];
vec[dof_new] += vec[dof1];
vec[dof_new] *= 0.5;
......@@ -114,7 +114,7 @@ namespace AMDiS {
ElInfo *elInfo = stack.traverseFirst(mesh, -1, fillFlag);
while (elInfo) {
const DegreeOfFreedom **dof = elInfo->getElement()->getDOF();
const DegreeOfFreedom **dof = elInfo->getElement()->getDof();
const DimVec<WorldVector<double> > &grdLambda = elInfo->getGrdLambda();
getLocalVector(elInfo->getElement(), localUh);
......@@ -186,7 +186,7 @@ namespace AMDiS {
while (elInfo) {
double det = elInfo->getDet();
const DegreeOfFreedom **dof = elInfo->getElement()->getDOF();
const DegreeOfFreedom **dof = elInfo->getElement()->getDof();
const DimVec<WorldVector<double> > &grdLambda = elInfo->getGrdLambda();
getLocalVector(elInfo->getElement(), localUh);
basFcts->evalGrdUh(bary, grdLambda, localUh, &grd);
......@@ -674,7 +674,7 @@ namespace AMDiS {
ElementVector localUh(basFcts->getNumber());
while (elInfo) {
const DegreeOfFreedom **dof = elInfo->getElement()->getDOF();
const DegreeOfFreedom **dof = elInfo->getElement()->getDof();
getLocalVector(elInfo->getElement(), localUh);
const DimVec<WorldVector<double> > &grdLambda = elInfo->getGrdLambda();
......
......@@ -204,7 +204,7 @@ namespace AMDiS {
{
FUNCNAME("DataCollector::addElementData()");
const DegreeOfFreedom **dof = elInfo->getElement()->getDOF();
const DegreeOfFreedom **dof = elInfo->getElement()->getDof();
DegreeOfFreedom vertexDOF;
WorldVector<double> vertexCoords;
......@@ -384,13 +384,13 @@ namespace AMDiS {
int index1 = elInfo->getElement()->getVertexOfPosition(INDEX_OF_DIM(dim - 1, dim),
it->elementSide,
i);
int dof1 = elInfo->getElement()->getDOF(index1, nPreDofs);
int dof1 = elInfo->getElement()->getDof(index1, nPreDofs);
for (int j = 0; j < dim; j++) {
int index2 = elInfo->getElement()->getVertexOfPosition(INDEX_OF_DIM(dim - 1, dim),
elInfo->getOppVertex(it->elementSide),
j);
int dof2 = elInfo->getNeighbour(it->elementSide)->getDOF(index2, nPreDofs);
int dof2 = elInfo->getNeighbour(it->elementSide)->getDof(index2, nPreDofs);
if ((dof1 == dof2) || (mesh->associated(dof1, dof2))) {
periodicInfo.vertexMap[index1] = index2;
......
......@@ -265,7 +265,7 @@ namespace AMDiS {
Mesh *mesh = feSpace->getMesh();
for (int i = 0; i <= mesh->getDim(); i++) {
DegreeOfFreedom dof = el->getDOF(i, 0);
DegreeOfFreedom dof = el->getDof(i, 0);
WorldVector<double> coords;
mesh->getDofIndexCoords(dof, feSpace, coords);
MSG("%d-th DOF of element %d: %f %f %f\n",
......@@ -357,7 +357,7 @@ namespace AMDiS {
Element *el = elInfo->getElement();
for (int i = 0; i <= feSpace->getMesh()->getDim(); i++) {
MSG("Coords for DOF %d = %f %f\n",
*(el->getDOF(i)), (elInfo->getCoord(i))[0], (elInfo->getCoord(i))[1]);
*(el->getDof(i)), (elInfo->getCoord(i))[0], (elInfo->getCoord(i))[1]);
}
elInfo = stack.traverseNext(elInfo);
}
......@@ -665,10 +665,10 @@ namespace AMDiS {
Element *el = elInfo->getElement();
switch (dim) {
case 2:
sortDofs(el->getDOF(0), el->getDOF(1), el->getDOF(2), elMap[el->getIndex()]);
sortDofs(el->getDof(0), el->getDof(1), el->getDof(2), elMap[el->getIndex()]);
break;
case 3:
sortDofs(el->getDOF(0), el->getDOF(1), el->getDOF(2), el->getDOF(3), elMap[el->getIndex()]);
sortDofs(el->getDof(0), el->getDof(1), el->getDof(2), el->getDof(3), elMap[el->getIndex()]);
break;
default:
ERROR_EXIT("What is this?\n");
......@@ -693,10 +693,10 @@ namespace AMDiS {
switch (dim) {
case 2:
sortDofs(el->getDOF(0), el->getDOF(1), el->getDOF(2), vec);
sortDofs(el->getDof(0), el->getDof(1), el->getDof(2), vec);
break;
case 3:
sortDofs(el->getDOF(0), el->getDOF(1), el->getDOF(2), el->getDOF(3), vec);
sortDofs(el->getDof(0), el->getDof(1), el->getDof(2), el->getDof(3), vec);
break;
default:
ERROR_EXIT("What is this?\n");
......
......@@ -200,7 +200,7 @@ namespace AMDiS {
}
/// Get ElInfo's \ref oppVertex[i]
inline unsigned char getOppVertex(int i) const
inline int getOppVertex(int i) const
{
return oppVertex[i];
}
......@@ -524,7 +524,7 @@ namespace AMDiS {
* Otherwise it is the local index of the neighbour's vertex opposite the
* common edge/face.
*/
FixVec<unsigned char, NEIGH> oppVertex;
FixVec<int, NEIGH> oppVertex;
/// Elements determinant.
double det;
......
......@@ -250,10 +250,10 @@ namespace AMDiS {
break;
case 2:
if (*(macroNeighbour->getElement()->getDOF(2)) == *(element->getDOF(0))) {
if (*(macroNeighbour->getElement()->getDof(2)) == *(element->getDof(0))) {
neighbourCoord[i][0] = macroNeighbour->coord[2];
neighbourCoord[i][1] = macroNeighbour->coord[1];
} else if (*(macroNeighbour->getElement()->getDOF(2)) == *(element->getDOF(1))) {
} else if (*(macroNeighbour->getElement()->getDof(2)) == *(element->getDof(1))) {
neighbourCoord[i][0] = macroNeighbour->coord[0];
neighbourCoord[i][1] = macroNeighbour->coord[2];
} else {
......@@ -411,9 +411,17 @@ namespace AMDiS {
Element *nb = elInfoOld->neighbour[2];
if (nb) {
TEST(elInfoOld->oppVertex[2] == 2)("invalid neighbour\n");
TEST_EXIT_DBG(nb->getFirstChild())("missing first child?\n");
TEST_EXIT_DBG(nb->getSecondChild())("missing second child?\n");
TEST_EXIT_DBG(elInfoOld->oppVertex[2] == 2)
("Fill child %d of element %d (mel %d): Invalid neighbour %d!\n",
ichild,
elInfoOld->getElement()->getIndex(),
elInfoOld->getMacroElement()->getIndex(),
nb->getIndex());
TEST_EXIT_DBG(nb->getFirstChild())
("Missing first child in element %d!\n", nb->getIndex());
TEST_EXIT_DBG(nb->getSecondChild())
("Missing second child in element %d!\n", nb->getIndex());
nb = nb->getSecondChild();
......
......@@ -414,12 +414,12 @@ namespace AMDiS {
if (fill_opp_coords != Flag(0)) {
int k = -1;
for (int j = 0; j < vertices; j++)
if (element->getDOF(j) == nb->getDOF(1 - ov))
if (element->getDof(j) == nb->getDof(1 - ov))
k = j;
if (k == -1) {
for (int j = 0; j < vertices; j++)
if (mesh->associated(element->getDOF(j, 0), nb->getDOF(1 - ov, 0)))
if (mesh->associated(element->getDof(j, 0), nb->getDof(1 - ov, 0)))
k = j;
}
TEST_EXIT_DBG(k >= 0)("neighbour dof not found\n");
......@@ -585,11 +585,11 @@ namespace AMDiS {
int k;
for (k = 0; k < 2; k++) { /* look at both childs of old neighbour */
nbk = const_cast<Element*>(nb->getChild(k));
if (nbk->getDOF(0) == el_old->getDOF(ichild)) {
if (nbk->getDof(0) == el_old->getDof(ichild)) {
/* opp. vertex */
dof = const_cast<int*>(nb->getDOF(elInfoOld->oppVertex[cv[i]]));
dof = const_cast<int*>(nb->getDof(elInfoOld->oppVertex[cv[i]]));
if (dof == nbk->getDOF(1)) {
if (dof == nbk->getDof(1)) {
ov = 1;
if (nbk->getChild(0)) {
if (fill_opp_coords.isAnySet()) {
......@@ -606,7 +606,7 @@ namespace AMDiS {
break;
}
} else {
if (dof != nbk->getDOF(2)) {
if (dof != nbk->getDof(2)) {
ov = -1;
break;
}
......@@ -628,13 +628,13 @@ namespace AMDiS {
if (k == 2 || ov == -1) {
for (k = 0; k < 2; k++) { /* look at both childs of old neighbour */
nbk = const_cast<Element*>(nb->getChild(k));
if (nbk->getDOF(0) == el_old->getDOF(ichild) ||
mesh->associated(nbk->getDOF(0, 0), el_old->getDOF(ichild, 0))) {
if (nbk->getDof(0) == el_old->getDof(ichild) ||
mesh->associated(nbk->getDof(0, 0), el_old->getDof(ichild, 0))) {
/* opp. vertex */
dof = const_cast<int*>(nb->getDOF(elInfoOld->oppVertex[cv[i]]));
dof = const_cast<int*>(nb->getDof(elInfoOld->oppVertex[cv[i]]));
if (dof == nbk->getDOF(1) ||
mesh->associated(dof[0], nbk->getDOF(1, 0))) {
if (dof == nbk->getDof(1) ||
mesh->associated(dof[0], nbk->getDof(1, 0))) {
ov = 1;
if (nbk->getChild(0)) {
if (fill_opp_coords.isAnySet()) {
......@@ -651,8 +651,8 @@ namespace AMDiS {
break;
}
} else {
TEST_EXIT_DBG(dof == nbk->getDOF(2) ||
mesh->associated(dof[0], nbk->getDOF(2, 0)))
TEST_EXIT_DBG(dof == nbk->getDof(2) ||
mesh->associated(dof[0], nbk->getDof(2, 0)))
("opp_vertex not found\n");
ov = 2;
}
......
......@@ -22,11 +22,10 @@ namespace AMDiS {
elementData = NULL;
mark = 0;
if (mesh) {
setDofPtrs();
} else {
mesh = NULL;
}
if (mesh)
createNewDofPtrs();
else
mesh = NULL;
}
......@@ -64,7 +63,7 @@ namespace AMDiS {
}
void Element::setDofPtrs()
void Element::createNewDofPtrs()
{
FUNCNAME("Element::setDofPtrs()");
......
......@@ -120,19 +120,19 @@ namespace AM