From eca328831a40879f4c54720ac3a94c1d1a17e251 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Fri, 22 Jul 2011 13:58:57 +0000 Subject: [PATCH] new method addTerm(..) as replacement for add*OrderTerm(..) --- AMDiS/src/AdaptInstationary.cc | 2 -- AMDiS/src/Operator.cc | 32 ++++++++++++++++++++++++++++++++ AMDiS/src/Operator.h | 4 ++++ AMDiS/src/RefinementManager3d.cc | 7 +++++++ 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc index b1c16f3c..81bd2712 100644 --- a/AMDiS/src/AdaptInstationary.cc +++ b/AMDiS/src/AdaptInstationary.cc @@ -273,8 +273,6 @@ namespace AMDiS { { FUNCNAME("AdaptInstationary::oneTimestep()"); - MSG("ONE TIMESTEP!\n"); - adaptInfo->setTimestepIteration(0); switch (strategy) { diff --git a/AMDiS/src/Operator.cc b/AMDiS/src/Operator.cc index 08fdcc22..8e5ea6cd 100644 --- a/AMDiS/src/Operator.cc +++ b/AMDiS/src/Operator.cc @@ -195,4 +195,36 @@ namespace AMDiS { static_cast<SecondOrderTerm*>(*termIt)->weakEval(grdUhAtQP, result); } + + void Operator::addTerm(ZeroOrderTerm *term) + { + zeroOrder.push_back(term); + term->operat = this; + for (std::set<const FiniteElemSpace*>::iterator it = term->getAuxFeSpaces().begin(); + it != term->getAuxFeSpaces().end(); ++it) + auxFeSpaces.insert(*it); + } + + void Operator::addTerm(FirstOrderTerm *term, + FirstOrderType type) + { + if (type == GRD_PSI) { + firstOrderGrdPsi.push_back(term); + } else { + firstOrderGrdPhi.push_back(term); + } + term->operat = this; + for (std::set<const FiniteElemSpace*>::iterator it = term->getAuxFeSpaces().begin(); + it != term->getAuxFeSpaces().end(); ++it) + auxFeSpaces.insert(*it); + } + + void Operator::addTerm(SecondOrderTerm *term) + { + secondOrder.push_back(term); + term->operat = this; + for (std::set<const FiniteElemSpace*>::iterator it = term->getAuxFeSpaces().begin(); + it != term->getAuxFeSpaces().end(); ++it) + auxFeSpaces.insert(*it); + } } diff --git a/AMDiS/src/Operator.h b/AMDiS/src/Operator.h index ec2d1ba3..2f5badc5 100644 --- a/AMDiS/src/Operator.h +++ b/AMDiS/src/Operator.h @@ -90,6 +90,10 @@ namespace AMDiS { template <typename T> void addZeroOrderTerm(T *term); + void addTerm(ZeroOrderTerm *term); + void addTerm(FirstOrderTerm *term, + FirstOrderType type); + void addTerm(SecondOrderTerm *term); /** \brief * Calculates the element matrix for this ElInfo and adds it multiplied by diff --git a/AMDiS/src/RefinementManager3d.cc b/AMDiS/src/RefinementManager3d.cc index b14180c4..37772180 100644 --- a/AMDiS/src/RefinementManager3d.cc +++ b/AMDiS/src/RefinementManager3d.cc @@ -414,7 +414,9 @@ namespace AMDiS { return true; int oppVertex = (*elInfo)->getOppVertex(localNeighbour); + #if DEBUG int testIndex = (*elInfo)->getNeighbour(localNeighbour)->getIndex(); + #endif ElInfo *neighInfo = stack->traverseNeighbour3d((*elInfo), localNeighbour); int neighElType = neighInfo->getType(); @@ -559,7 +561,10 @@ namespace AMDiS { if (neighInfo->getNeighbour(i)) { oppVertex = neighInfo->getOppVertex(i); + + #if DEBUG int testIndex = neighInfo->getNeighbour(i)->getIndex(); + #endif neighInfo = stack->traverseNeighbour3d(neighInfo, i); @@ -591,7 +596,9 @@ namespace AMDiS { ("While looping back domains boundary was reached or i == 0\n"); oppVertex = refineList.getOppVertex(i--, 0); + #if DEBUG int testIndex = neighInfo->getNeighbour(oppVertex)->getIndex(); + #endif neighInfo = stack->traverseNeighbour3d(neighInfo, oppVertex); int edgeDof0, edgeDof1; -- GitLab