diff --git a/AMDiS/src/DOFMatrix.h b/AMDiS/src/DOFMatrix.h index 61386b3f93d46e4e7ba96c8d58fd39ea0500ed9e..e95ab45373299fc6f2a94848e01917928fb24532 100644 --- a/AMDiS/src/DOFMatrix.h +++ b/AMDiS/src/DOFMatrix.h @@ -402,14 +402,6 @@ namespace AMDiS { return matrix[n]; }; - /** \brief - * Returns whether interpolation should be performed after refinement - * (false by default) - */ - virtual bool refineInterpol() { - return false; - }; - /** \brief * Returns whether restriction should be performed after coarsening * (false by default) diff --git a/AMDiS/src/DOFVector.cc b/AMDiS/src/DOFVector.cc index 4e068a33e5adbe00a43e65c411da3168c65e6c04..c4f6a9f7ba401dcd2b384801d958bd34b4c5664c 100644 --- a/AMDiS/src/DOFVector.cc +++ b/AMDiS/src/DOFVector.cc @@ -32,7 +32,9 @@ namespace AMDiS { template<> void DOFVector<WorldVector<double> >::refineInterpol(RCNeighbourList& list, int n) { - if(n < 1) return; + if (n < 1) + return; + int dim = feSpace->getMesh()->getDim(); Element *el = list.getElement(0); int n0 = feSpace->getAdmin()->getNumberOfPreDOFs(VERTEX); diff --git a/AMDiS/src/DOFVector.h b/AMDiS/src/DOFVector.h index 536a9ee0f67ad14ec07959d177bb40cbe014871a..783feaa39366f0a2e321006be24ebbb717de6510 100644 --- a/AMDiS/src/DOFVector.h +++ b/AMDiS/src/DOFVector.h @@ -317,7 +317,6 @@ namespace AMDiS { DOFVector() : DOFVectorBase<T>(), feSpace(NULL), - refineInter(false), coarsenOperation(NO_OPERATION) {} @@ -368,13 +367,6 @@ namespace AMDiS { virtual void compressDOFIndexed(int first, int last, std::vector<DegreeOfFreedom> &newDof); - /** \brief - * Sets \ref refineInter to b - */ - inline void refineInterpol(bool b) { - refineInter = b; - } - /** \brief * Sets \ref coarsenOperation to op */ @@ -394,17 +386,10 @@ namespace AMDiS { */ inline void coarseRestrict(RCNeighbourList&, int) {} - /** \brief - * Returns \ref refineInter - */ - inline bool refineInterpol() { - return refineInter; - } - /** \brief * Interpolation after refinement. */ - inline void refineInterpol(RCNeighbourList&, int) {}; + inline void refineInterpol(RCNeighbourList&, int) {} /** \brief * Returns \ref vec @@ -665,11 +650,6 @@ namespace AMDiS { */ std::vector<T> vec; - /** \brief - * Specifies whether interpolation should be performed after refinement - */ - bool refineInter; - /** \brief * Specifies what operation should be performed after coarsening */ diff --git a/AMDiS/src/DOFVector.hh b/AMDiS/src/DOFVector.hh index f408e1e1729a68bdf76c5f290ceeca07a133db74..068759d7bf2b3767337e9b91c9c31456b5f43c29 100644 --- a/AMDiS/src/DOFVector.hh +++ b/AMDiS/src/DOFVector.hh @@ -55,7 +55,6 @@ namespace AMDiS { template<typename T> DOFVector<T>::DOFVector(const FiniteElemSpace* f, std::string n) : DOFVectorBase<T>(f, n), - refineInter(false), coarsenOperation(NO_OPERATION) { init(f, n); @@ -809,21 +808,23 @@ namespace AMDiS { template<typename T> DOFVector<T>& DOFVector<T>::operator=(const DOFVector<T>& rhs ) { - feSpace=rhs.feSpace; - vec=rhs.vec; - this->elementVector=NULL; - interFct=rhs.interFct; - refineInter=rhs.refineInter; - coarsenOperation=rhs.coarsenOperation; - this->operators=rhs.operators; - this->operatorFactor=rhs.operatorFactor; + feSpace = rhs.feSpace; + vec = rhs.vec; + this->elementVector = NULL; + interFct = rhs.interFct; + coarsenOperation = rhs.coarsenOperation; + this->operators = rhs.operators; + this->operatorFactor = rhs.operatorFactor; if (rhs.boundaryManager) { - if(this->boundaryManager) delete this->boundaryManager; + if (this->boundaryManager) + delete this->boundaryManager; this->boundaryManager = new BoundaryManager(*rhs.boundaryManager); + // boundaryManager->setDOFVector(this); - } - else + } else { this->boundaryManager=NULL; + } + return *this; } diff --git a/AMDiS/src/FiniteElemSpace.cc b/AMDiS/src/FiniteElemSpace.cc index fe4802accde86cd95df137b7ead5ed688e0bed04..8662e3626c286513bc8e63505f7d75b5af6e80d7 100644 --- a/AMDiS/src/FiniteElemSpace.cc +++ b/AMDiS/src/FiniteElemSpace.cc @@ -12,7 +12,10 @@ namespace AMDiS { FiniteElemSpace::FiniteElemSpace(DOFAdmin* admin_, const BasisFunction* bas_fcts_, Mesh* aMesh, const std::string& aString) - : name(aString), admin(admin_), basFcts(bas_fcts_), mesh(aMesh) + : name(aString), + admin(admin_), + basFcts(bas_fcts_), + mesh(aMesh) { FUNCNAME("FiniteElemSpace::FiniteElemSpace()"); @@ -20,14 +23,15 @@ namespace AMDiS { if (!admin) { const DOFAdmin *admin_local = NULL; - int i, j; const DimVec<int> *ndof = NULL; ndof = basFcts->getNumberOfDOFs(); TEST_EXIT(ndof)("no n_dof or basFcts->n_dof\n"); - for (i = 0; i < mesh->getNumberOfDOFAdmin(); i++) { + for (int i = 0; i < mesh->getNumberOfDOFAdmin(); i++) { admin_local = &(mesh->getDOFAdmin(i)); + int j; for (j = 0; j <= mesh->getDim(); j++) { - if (admin_local->getNumberOfDOFs(j) != (*ndof)[j]) break; + if (admin_local->getNumberOfDOFs(j) != (*ndof)[j]) + break; } if (j > mesh->getDim()) break; admin_local = NULL; diff --git a/AMDiS/src/FiniteElemSpace.h b/AMDiS/src/FiniteElemSpace.h index 3e4ee0533de6b669f71488b197847a397cb22fd7..7ed65871d1d6e9fb24a3228447ebf99b13fc4408 100644 --- a/AMDiS/src/FiniteElemSpace.h +++ b/AMDiS/src/FiniteElemSpace.h @@ -69,7 +69,7 @@ namespace AMDiS { /** \brief * destructor */ - virtual ~FiniteElemSpace() {}; + virtual ~FiniteElemSpace() {} /** \brief * Returns \ref name diff --git a/AMDiS/src/ProblemInstat.cc b/AMDiS/src/ProblemInstat.cc index 1b3dbe41b5fc69ca60f800cf0541066cdae07003..a22a5cded90b11cfd0c36fdf6408b40e3b3c4cb4 100644 --- a/AMDiS/src/ProblemInstat.cc +++ b/AMDiS/src/ProblemInstat.cc @@ -53,7 +53,7 @@ namespace AMDiS { : ProblemInstat(name_, initialProb), problemStat(prob), oldSolution(NULL) - {}; + {} ProblemInstatScal::~ProblemInstatScal() @@ -94,7 +94,6 @@ namespace AMDiS { } else { // create oldSolution oldSolution = NEW DOFVector<double>(problemStat->getFESpace(), name + "->uOld"); - oldSolution->refineInterpol(true); oldSolution->setCoarsenOperation(COARSE_INTERPOL); if (problemStat->getEstimator()) { dynamic_cast<Estimator*>(problemStat->getEstimator()) @@ -168,7 +167,6 @@ namespace AMDiS { for (int i = 0; i < size; i++) { oldSolution->setDOFVector(i, NEW DOFVector<double>(problemStat->getFESpace(i), name + "->uOld")); - oldSolution->getDOFVector(i)->refineInterpol(true); oldSolution->getDOFVector(i)->setCoarsenOperation(COARSE_INTERPOL); if(problemStat->getEstimator(i)) { diff --git a/AMDiS/src/ProblemScal.cc b/AMDiS/src/ProblemScal.cc index f3d1f178e1c48c50e947c3adeadf499ae6e015d4..cf959792931fb0dc4199cdc8086781244254081d 100644 --- a/AMDiS/src/ProblemScal.cc +++ b/AMDiS/src/ProblemScal.cc @@ -411,10 +411,9 @@ namespace AMDiS { { // === create vectors and system matrix === systemMatrix_ = NEW DOFMatrix(feSpace_, feSpace_, "system matrix"); - rhs_ = NEW DOFVector<double>(feSpace_, "rhs"); - solution_ = NEW DOFVector<double>(feSpace_, "solution"); + rhs_ = NEW DOFVector<double>(feSpace_, "rhs"); + solution_ = NEW DOFVector<double>(feSpace_, "solution"); - solution_->refineInterpol(true); solution_->setCoarsenOperation(COARSE_INTERPOL); solution_->set(0.0); /* initialize u_h ! */ diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index 81dd6b45dbe85ec5e716af84c8432130360912ad..ea6c7e702557885041d1063dfe6fad7b1b189f5a 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -292,7 +292,6 @@ namespace AMDiS { numberedName = name_ + std::string(number); solution_->setDOFVector(i, NEW DOFVector<double>(componentSpaces[i], numberedName)); - solution_->getDOFVector(i)->refineInterpol(true); solution_->getDOFVector(i)->setCoarsenOperation(COARSE_INTERPOL); solution_->getDOFVector(i)->set(0.0); }