diff --git a/AMDiS/src/AdaptBase.h b/AMDiS/src/AdaptBase.h index efcdea4b7e3c1f84cf4b88ad0d5544297b978918..0dd035a01e92e835ca3fea1b3f73fcfdcfa5cf8b 100644 --- a/AMDiS/src/AdaptBase.h +++ b/AMDiS/src/AdaptBase.h @@ -43,7 +43,7 @@ namespace AMDiS { /** \brief * Constructor */ - AdaptBase(const ::std::string& name, + AdaptBase(const std::string& name, ProblemIterationInterface *problemIteration, AdaptInfo *adaptInfo, ProblemTimeInterface *problemTime = NULL, @@ -69,7 +69,7 @@ namespace AMDiS { /** \brief * Returns \ref name_ */ - inline const ::std::string& getName() const { + inline const std::string& getName() const { return name_; }; @@ -113,7 +113,7 @@ namespace AMDiS { /** \brief * Name of the adaption loop */ - ::std::string name_; + std::string name_; /** \brief * Problem iteration interface diff --git a/AMDiS/src/AdaptInstationary.h b/AMDiS/src/AdaptInstationary.h index 1b872b9ea6bd8e77142193bddb69ef44f0de0b77..47f319b1e15ecb7fcfab62fd67eaaebcad93a0fe 100644 --- a/AMDiS/src/AdaptInstationary.h +++ b/AMDiS/src/AdaptInstationary.h @@ -88,12 +88,12 @@ namespace AMDiS { /** \brief * serialization */ - virtual void serialize(::std::ostream &out); + virtual void serialize(std::ostream &out); /** \brief * deserialization */ - virtual void deserialize(::std::istream &in); + virtual void deserialize(std::istream &in); protected: @@ -111,7 +111,7 @@ namespace AMDiS { /** \brief * Initialisation of this AdaptInstationary object */ - void initialize(const ::std::string& aName); + void initialize(const std::string& aName); /** \brief * Implements the explit time strategy. Used by \ref oneTimestep(). @@ -169,7 +169,7 @@ namespace AMDiS { /** \brief * Name of the file used to automatically serialize the problem. */ - ::std::string queueSerializationFilename_; + std::string queueSerializationFilename_; /** \brief * Timestamp at the beginning of all calculations. It is used to calculate the overall @@ -186,7 +186,7 @@ namespace AMDiS { /** \brief * Stores the runtime (in seconds) of some last timestep iterations. */ - ::std::queue<int> lastIterationsDuration_; + std::queue<int> lastIterationsDuration_; }; } diff --git a/AMDiS/src/Assembler.cc b/AMDiS/src/Assembler.cc index df62642d505711613c8fb1b586f03cdfd5a33367..cca6cd463c820e0dfb82b9d9fdb3aa3b7eaf262f 100644 --- a/AMDiS/src/Assembler.cc +++ b/AMDiS/src/Assembler.cc @@ -11,15 +11,15 @@ namespace AMDiS { - ::std::vector<SubAssembler*> ZeroOrderAssembler::optimizedSubAssemblers; - ::std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPhi; - ::std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPsi; - ::std::vector<SubAssembler*> SecondOrderAssembler::optimizedSubAssemblers; + std::vector<SubAssembler*> ZeroOrderAssembler::optimizedSubAssemblers; + std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPhi; + std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPsi; + std::vector<SubAssembler*> SecondOrderAssembler::optimizedSubAssemblers; - ::std::vector<SubAssembler*> ZeroOrderAssembler::standardSubAssemblers; - ::std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPhi; - ::std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPsi; - ::std::vector<SubAssembler*> SecondOrderAssembler::standardSubAssemblers; + std::vector<SubAssembler*> ZeroOrderAssembler::standardSubAssemblers; + std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPhi; + std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPsi; + std::vector<SubAssembler*> SecondOrderAssembler::standardSubAssemblers; SubAssembler::SubAssembler(Operator *op, Assembler *assembler, @@ -98,20 +98,20 @@ namespace AMDiS { coordsValid = false; // set values at QPs invalid - ::std::map<const DOFVectorBase<double>*, ValuesAtQPs*>::iterator it1; + std::map<const DOFVectorBase<double>*, ValuesAtQPs*>::iterator it1; for (it1 = valuesAtQPs.begin(); it1 != valuesAtQPs.end(); ++it1) { ((*it1).second)->valid = false; } // set gradients at QPs invalid - ::std::map<const DOFVectorBase<double>*, GradientsAtQPs*>::iterator it2; + std::map<const DOFVectorBase<double>*, GradientsAtQPs*>::iterator it2; for (it2 = gradientsAtQPs.begin(); it2 != gradientsAtQPs.end(); ++it2) { ((*it2).second)->valid = false; } int myRank = omp_get_thread_num(); // calls initElement of each term - ::std::vector<OperatorTerm*>::iterator it; + std::vector<OperatorTerm*>::iterator it; for (it = terms[myRank].begin(); it != terms[myRank].end(); ++it) { (*it)->initElement(elInfo, this, quad); } @@ -298,20 +298,20 @@ namespace AMDiS { ZeroOrderAssembler *newAssembler; - ::std::vector<SubAssembler*> *subAssemblers = + std::vector<SubAssembler*> *subAssemblers = optimized ? &optimizedSubAssemblers : &standardSubAssemblers; int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank]; + std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank]; sort(opTerms.begin(), opTerms.end()); // check if a new assembler is needed if (quad) { for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { - ::std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); + std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); sort(assTerms.begin(), assTerms.end()); @@ -354,7 +354,7 @@ namespace AMDiS { FirstOrderType type, bool optimized) { - ::std::vector<SubAssembler*> *subAssemblers = + std::vector<SubAssembler*> *subAssemblers = optimized ? (type == GRD_PSI ? &optimizedSubAssemblersGrdPsi : @@ -364,7 +364,7 @@ namespace AMDiS { &standardSubAssemblersGrdPhi); int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*> opTerms + std::vector<OperatorTerm*> opTerms = (type == GRD_PSI) ? op->firstOrderGrdPsi[myRank] : op->firstOrderGrdPhi[myRank]; @@ -381,7 +381,7 @@ namespace AMDiS { // check if a new assembler is needed for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { - ::std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); + std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); sort(assTerms.begin(), assTerms.end()); @@ -440,18 +440,18 @@ namespace AMDiS { SecondOrderAssembler *newAssembler; - ::std::vector<SubAssembler*> *subAssemblers = + std::vector<SubAssembler*> *subAssemblers = optimized ? &optimizedSubAssemblers : &standardSubAssemblers; - ::std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank]; + std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank]; sort(opTerms.begin(), opTerms.end()); // check if a new assembler is needed for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { - ::std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); + std::vector<OperatorTerm*> assTerms = *((*subAssemblers)[i]->getTerms()); sort(assTerms.begin(), assTerms.end()); @@ -508,7 +508,7 @@ namespace AMDiS { } int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::iterator termIt; + std::vector<OperatorTerm*>::iterator termIt; for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) { (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); } @@ -565,7 +565,7 @@ namespace AMDiS { } int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::iterator termIt; + std::vector<OperatorTerm*>::iterator termIt; for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) { (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); } @@ -615,7 +615,7 @@ namespace AMDiS { c[iq] = 0.0; } - ::std::vector<OperatorTerm*>::iterator termIt; + std::vector<OperatorTerm*>::iterator termIt; for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) { (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); } @@ -668,7 +668,7 @@ namespace AMDiS { } int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::iterator termIt; + std::vector<OperatorTerm*>::iterator termIt; for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) { (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); } @@ -738,7 +738,7 @@ namespace AMDiS { firstCall = false; } - ::std::vector<OperatorTerm*>::iterator termIt; + std::vector<OperatorTerm*>::iterator termIt; int myRank = omp_get_thread_num(); double c = 0.0; diff --git a/AMDiS/src/BFGS_Precond.cc b/AMDiS/src/BFGS_Precond.cc index 0a31bb1d68b93e50f7145c1c758c9d0b75fadde7..9ed4b20d35db65f27faf8ee3129d758ce485378b 100755 --- a/AMDiS/src/BFGS_Precond.cc +++ b/AMDiS/src/BFGS_Precond.cc @@ -40,7 +40,7 @@ namespace AMDiS double beta; double *alpha = GET_MEMORY(double, k); - ::std::deque<BFGS_Vectors>::iterator pairsIterator(pairsVec.begin()); + std::deque<BFGS_Vectors>::iterator pairsIterator(pairsVec.begin()); while (pairsIterator != pairsVec.end()) { alpha[i] = pairsIterator->s * *vec; diff --git a/AMDiS/src/BasisFunction.cc b/AMDiS/src/BasisFunction.cc index c5ee18d1399e5e9a07f9bd2b7b09cb390015f354..f64a0478323a90818f8e1e255ebb97eecb0daaef 100644 --- a/AMDiS/src/BasisFunction.cc +++ b/AMDiS/src/BasisFunction.cc @@ -15,7 +15,7 @@ namespace AMDiS { /* are those corresponding to these barycentric coordinates. */ /****************************************************************************/ - BasisFunction::BasisFunction(const ::std::string& name_, int dim_, int degree_) + BasisFunction::BasisFunction(const std::string& name_, int dim_, int degree_) : name(name_), degree(degree_), dim(dim_) diff --git a/AMDiS/src/BasisFunction.h b/AMDiS/src/BasisFunction.h index 87fea8fafc346e916cab917de5554ba8d4f8426d..b40ee744ed8ed2de1235190e97df4add46ea92be 100644 --- a/AMDiS/src/BasisFunction.h +++ b/AMDiS/src/BasisFunction.h @@ -131,7 +131,7 @@ namespace AMDiS { /** \brief * Creates a BasisFunction object of given dim and degree */ - BasisFunction(const ::std::string& name_, int dim_, int degree_); + BasisFunction(const std::string& name_, int dim_, int degree_); /** \brief * destructor @@ -214,7 +214,7 @@ namespace AMDiS { /** \brief * Returns \ref name of BasisFunction */ - inline const ::std::string& getName() const { + inline const std::string& getName() const { return name; }; @@ -415,7 +415,7 @@ namespace AMDiS { /** \brief * Textual description */ - ::std::string name; + std::string name; /** \brief * Number of basisfunctions on one Element @@ -445,30 +445,30 @@ namespace AMDiS { /** \brief * Vector of the local functions */ - ::std::vector<BasFctType*> *phi; + std::vector<BasFctType*> *phi; /** \brief * Vector of gradients */ - ::std::vector<GrdBasFctType*> *grdPhi; + std::vector<GrdBasFctType*> *grdPhi; /** \brief * Vector of second derivatives */ - ::std::vector<D2BasFctType*> *d2Phi; + std::vector<D2BasFctType*> *d2Phi; /** \brief * Is used by function evalGrdUh. To make it thread safe, we need a * temporary DimVec for every thread. */ - ::std::vector<DimVec<double>* > grdTmpVec1; + std::vector<DimVec<double>* > grdTmpVec1; /** \brief * Is used by function evalGrdUh. To make it thread safe, we need a * temporary DimVec for every thread. */ - ::std::vector<DimVec<double>* > grdTmpVec2; + std::vector<DimVec<double>* > grdTmpVec2; }; } diff --git a/AMDiS/src/BiCGSolver.h b/AMDiS/src/BiCGSolver.h index 8f9a2c907edc492760946cef783f67e218aa4898..2094d71780597ec2926b60cbd0cee33eca000714 100644 --- a/AMDiS/src/BiCGSolver.h +++ b/AMDiS/src/BiCGSolver.h @@ -66,7 +66,7 @@ namespace AMDiS { /** \brief * constructor */ - BiCGSolver(::std::string name); + BiCGSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/BiCGSolver.hh b/AMDiS/src/BiCGSolver.hh index f3071fc1c95549551f7d11fffb8f1f840854f27d..b540eb3f612200ce857973389734a5bf14172703 100644 --- a/AMDiS/src/BiCGSolver.hh +++ b/AMDiS/src/BiCGSolver.hh @@ -3,7 +3,7 @@ namespace AMDiS { template<typename VectorType> - BiCGSolver<VectorType>::BiCGSolver(::std::string name) + BiCGSolver<VectorType>::BiCGSolver(std::string name) : OEMSolver<VectorType>(name), rstar(NULL), d(NULL), s(NULL), CAd(NULL), h(NULL) { diff --git a/AMDiS/src/BiCGStab.h b/AMDiS/src/BiCGStab.h index 6994d0ed2139cc129eddbda607f9b38bbdf898c6..fc8e6ce6b0523b4bb6eb3b0251d172a41826a3ee 100644 --- a/AMDiS/src/BiCGStab.h +++ b/AMDiS/src/BiCGStab.h @@ -68,7 +68,7 @@ namespace AMDiS /** \brief * constructor */ - BiCGStab(::std::string name); + BiCGStab(std::string name); /** \brief * destructor diff --git a/AMDiS/src/BiCGStab.hh b/AMDiS/src/BiCGStab.hh index bbfd9679ddc18dfc915ea0e4c5d2e168884c2bc1..1058576d4cef6cdb571596b7fd5ee05ee7702fa5 100644 --- a/AMDiS/src/BiCGStab.hh +++ b/AMDiS/src/BiCGStab.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - BiCGStab<VectorType>::BiCGStab(::std::string name) + BiCGStab<VectorType>::BiCGStab(std::string name) : OEMSolver<VectorType>(name), r(NULL), rstar(NULL), diff --git a/AMDiS/src/BiCGStab2.h b/AMDiS/src/BiCGStab2.h index ac2e898ac32b46453f2caddf846111050a14b77d..8767dd964b8463698cfb5adf38a4d033a824e35b 100644 --- a/AMDiS/src/BiCGStab2.h +++ b/AMDiS/src/BiCGStab2.h @@ -67,7 +67,7 @@ namespace AMDiS /** \brief * constructor */ - BiCGStab2(::std::string name); + BiCGStab2(std::string name); /** \brief * destructor diff --git a/AMDiS/src/BiCGStab2.hh b/AMDiS/src/BiCGStab2.hh index 5b13cbea399d1521611a688a5132938af0915dc0..139fff73e4d294dc150007c56b5b611408f542ce 100644 --- a/AMDiS/src/BiCGStab2.hh +++ b/AMDiS/src/BiCGStab2.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - BiCGStab2<VectorType>::BiCGStab2(::std::string name) + BiCGStab2<VectorType>::BiCGStab2(std::string name) : OEMSolver<VectorType>(name), r(NULL), rstar(NULL), u(NULL), v(NULL), s(NULL), w(NULL), t(NULL), xmin(NULL) diff --git a/AMDiS/src/BiCGStab_M.h b/AMDiS/src/BiCGStab_M.h index 904a24fe57e82ea3f89f26d87d03d8a8eb988db2..1cada652dcc65282299e0eba2b97bc918900bda9 100644 --- a/AMDiS/src/BiCGStab_M.h +++ b/AMDiS/src/BiCGStab_M.h @@ -63,7 +63,7 @@ namespace AMDiS { /** \brief * constructor */ - BiCGStab_M(::std::string name); + BiCGStab_M(std::string name); /** \brief * destructor diff --git a/AMDiS/src/BiCGStab_M.hh b/AMDiS/src/BiCGStab_M.hh index 533c7ecb06213a8ddf40482622994facabad033d..aee65d69d1cfe5f4eb5651b3e2aab42ec171a461 100644 --- a/AMDiS/src/BiCGStab_M.hh +++ b/AMDiS/src/BiCGStab_M.hh @@ -1,7 +1,7 @@ namespace AMDiS { template<typename VectorType> - BiCGStab_M<VectorType>::BiCGStab_M(::std::string name) : OEMSolver<VectorType>(name) {} + BiCGStab_M<VectorType>::BiCGStab_M(std::string name) : OEMSolver<VectorType>(name) {} template<typename VectorType> BiCGStab_M<VectorType>::~BiCGStab_M() {} diff --git a/AMDiS/src/BoundaryManager.cc b/AMDiS/src/BoundaryManager.cc index 17955a1db169ba332531bc1d87f20005a9d9c40b..85fa90163375a661595427c405a1661240204586 100644 --- a/AMDiS/src/BoundaryManager.cc +++ b/AMDiS/src/BoundaryManager.cc @@ -14,7 +14,7 @@ namespace AMDiS { const DOFVectorBase<double> *dv) { double result = 0; - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; for (it = localBCs.begin(); it != localBCs.end(); ++it) { if ((*it).second) result += (*it).second->boundResidual(elInfo, matrix, dv); @@ -32,7 +32,7 @@ namespace AMDiS { int nBasFcts = basisFcts->getNumber(); DOFAdmin *admin = feSpace->getAdmin(); - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; if (localBCs.size() > 0) { @@ -75,7 +75,7 @@ namespace AMDiS { int nBasFcts = basisFcts->getNumber(); DOFAdmin *admin = feSpace->getAdmin(); - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; if (localBCs.size() > 0) { // get boundaries of all DOFs @@ -105,7 +105,7 @@ namespace AMDiS { void BoundaryManager::initMatrix(DOFMatrix *matrix) { - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; for (it = localBCs.begin(); it != localBCs.end(); ++it) { if ((*it).second) { @@ -125,7 +125,7 @@ namespace AMDiS { void BoundaryManager::exitMatrix(DOFMatrix *matrix) { - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; for (it = localBCs.begin(); it != localBCs.end(); ++it) { if ((*it).second) { if (!(*it).second->isDirichlet()) { @@ -144,7 +144,7 @@ namespace AMDiS { void BoundaryManager::initVector(DOFVectorBase<double> *vector) { - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; for(it = localBCs.begin(); it != localBCs.end(); ++it) { if((*it).second) { if(!(*it).second->isDirichlet()) { @@ -163,7 +163,7 @@ namespace AMDiS { void BoundaryManager::exitVector(DOFVectorBase<double> *vector) { - ::std::map<BoundaryType, BoundaryCondition*>::iterator it; + std::map<BoundaryType, BoundaryCondition*>::iterator it; for (it = localBCs.begin(); it != localBCs.end(); ++it) { if ((*it).second) { if (!(*it).second->isDirichlet()) { diff --git a/AMDiS/src/BoundaryManager.h b/AMDiS/src/BoundaryManager.h index c56ec264b27eb377e55b119310aa6bb1b6259257..a593b89bd5e44604f01057ab265e579da5922099 100644 --- a/AMDiS/src/BoundaryManager.h +++ b/AMDiS/src/BoundaryManager.h @@ -97,11 +97,11 @@ namespace AMDiS { // */ // void fillGlobalBoundVector(DOFVectorBase<BoundaryType> *bound); - const ::std::map<BoundaryType, BoundaryCondition*>& getBoundaryConditionMap() { + const std::map<BoundaryType, BoundaryCondition*>& getBoundaryConditionMap() { return localBCs; }; - void setBoundaryConditionMap(const ::std::map<BoundaryType, BoundaryCondition*>& bcs) { + void setBoundaryConditionMap(const std::map<BoundaryType, BoundaryCondition*>& bcs) { localBCs = bcs; }; @@ -109,7 +109,7 @@ namespace AMDiS { /** \brief * Map of managed local boundary conditions. */ - ::std::map<BoundaryType, BoundaryCondition*> localBCs; + std::map<BoundaryType, BoundaryCondition*> localBCs; }; } diff --git a/AMDiS/src/BoundaryManager.hh b/AMDiS/src/BoundaryManager.hh index de1e045defb4e6ee7b9c1e8dde01ab0de0e30c61..51333d352f4172875c96ada108b62e40df7f8626 100644 --- a/AMDiS/src/BoundaryManager.hh +++ b/AMDiS/src/BoundaryManager.hh @@ -13,7 +13,7 @@ namespace AMDiS { double BoundaryManager<T>::boundResidual(ElInfo *elInfo, Estimator<T> *estimator) { double result = 0; - typename ::std::list<LocalBC<T>*>::iterator it; + typename std::list<LocalBC<T>*>::iterator it; for(it = localBCs.begin(); it != localBCs.end(); ++it) { result += (*it)->boundResidual(elInfo, estimator); } @@ -75,7 +75,7 @@ namespace AMDiS { LocalBC<T> *localBC; DOFAdmin *admin = feSpace->getAdmin(); - typename ::std::list<LocalBC<T>*>::iterator it; + typename std::list<LocalBC<T>*>::iterator it; if(localBCs.size() > 0) { @@ -109,7 +109,7 @@ namespace AMDiS { LocalBC<T> *localBC; DOFAdmin *admin = feSpace->getAdmin(); - typename ::std::list<LocalBC<T>*>::iterator it; + typename std::list<LocalBC<T>*>::iterator it; if(localBCs.size() > 0) { diff --git a/AMDiS/src/BoxSmoother.h b/AMDiS/src/BoxSmoother.h index dcb7220274847267ab1273795f3e63cd1632f7de..19a6f50052bd4de1d8e6e20d47ee22fe423f31a1 100644 --- a/AMDiS/src/BoxSmoother.h +++ b/AMDiS/src/BoxSmoother.h @@ -17,7 +17,7 @@ namespace AMDiS { class BoxSmoother : public SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> > + Vector< std::set<DegreeOfFreedom>*> > { public: MEMORY_MANAGED(BoxSmoother); @@ -25,23 +25,23 @@ namespace AMDiS { class Creator : public SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> > + Vector< std::set<DegreeOfFreedom>*> > { public: MEMORY_MANAGED(Creator); SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >* + Vector< std::set<DegreeOfFreedom>*> >* create() { return NEW BoxSmoother(this->name); }; }; - BoxSmoother(::std::string name) + BoxSmoother(std::string name) : SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >(name), + Vector< std::set<DegreeOfFreedom>*> >(name), boxMatrix_(NULL), boxSolution_(NULL), boxRHS_(NULL), @@ -64,7 +64,7 @@ namespace AMDiS { Vector<SparseVector<double>*> *solution, Vector<SparseVector<double>*> *rhs, int iterations, - const Vector< ::std::set<DegreeOfFreedom>*> &dofSet) + const Vector< std::set<DegreeOfFreedom>*> &dofSet) { FUNCNAME("BoxSmoother::smooth()"); @@ -87,10 +87,10 @@ namespace AMDiS { // create local equation system int boxSize = 0; - ::std::vector<int> offset(numComponents_, 0); - ::std::vector< ::std::map<DegreeOfFreedom, int> > indexOfDOF(numComponents_); - ::std::set<DegreeOfFreedom>::const_iterator dofIt, dofBegin, dofEnd; - ::std::vector<MatEntry>::iterator rowIt, rowBegin, rowEnd; + std::vector<int> offset(numComponents_, 0); + std::vector< std::map<DegreeOfFreedom, int> > indexOfDOF(numComponents_); + std::set<DegreeOfFreedom>::const_iterator dofIt, dofBegin, dofEnd; + std::vector<MatEntry>::iterator rowIt, rowBegin, rowEnd; int pos; for(i = 0; i < numComponents_; i++) { @@ -218,7 +218,7 @@ namespace AMDiS { Vector<double> *boxSolution_; Vector<double> *boxRHS_; int numComponents_; - ::std::vector<int> numDOFs_; + std::vector<int> numDOFs_; int sumDOFs_; DirectSolverInterface<Matrix<double>, Vector<double> > *directSolver_; }; diff --git a/AMDiS/src/CGSolver.h b/AMDiS/src/CGSolver.h index 986f0f177dfe10827047d957042177f740543146..81ece30489b6081c5734c5c9475c42502b9e3041 100644 --- a/AMDiS/src/CGSolver.h +++ b/AMDiS/src/CGSolver.h @@ -71,7 +71,7 @@ namespace AMDiS { /** \brief * constructor */ - CGSolver(::std::string name); + CGSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/CGSolver.hh b/AMDiS/src/CGSolver.hh index 821204983148a1abf8bb3415768d596537e9f92e..ed43b1df1305add1fa49edc1ef98041162f139eb 100644 --- a/AMDiS/src/CGSolver.hh +++ b/AMDiS/src/CGSolver.hh @@ -7,7 +7,7 @@ namespace AMDiS { template<typename VectorType> - CGSolver<VectorType>::CGSolver(::std::string name) + CGSolver<VectorType>::CGSolver(std::string name) : OEMSolver<VectorType>(name) {} @@ -22,7 +22,7 @@ namespace AMDiS { const double TOL = 1.e-30; -// ::std::cout << "b: " << ::std::endl; +// std::cout << "b: " << std::endl; // print(b); // If norm of b is smaller than the tolarance, we can assume b to be zero. @@ -35,7 +35,7 @@ namespace AMDiS { return(0); } -// ::std::cout << "x: " << ::std::endl; +// std::cout << "x: " << std::endl; // print(x); // p is temporaly used to calculate -x. @@ -44,11 +44,11 @@ namespace AMDiS { // r = b - Ax matVec->matVec(NoTranspose, *p, *r); -// ::std::cout << "-Ax: " << ::std::endl; +// std::cout << "-Ax: " << std::endl; // print(r); *r += *b; -// ::std::cout << "r: " << ::std::endl; +// std::cout << "r: " << std::endl; // print(r); *p = *r; @@ -58,13 +58,13 @@ namespace AMDiS { // \alpha = (r,p)_2 // without precondition, \alpha = (r,p)_2 = (r,r)_2 = \|r\|_2^2 -// ::std::cout << "Berechne Alpha: " << ::std::endl; -// ::std::cout << "r: " << ::std::endl; +// std::cout << "Berechne Alpha: " << std::endl; +// std::cout << "r: " << std::endl; // print(r); -// ::std::cout << "p: " << ::std::endl; +// std::cout << "p: " << std::endl; // print(p); double alpha = *r * *p; -// ::std::cout << "alpha=" << alpha << ::std::endl; +// std::cout << "alpha=" << alpha << std::endl; double alpha1, lambda, old_res = -1.0; @@ -75,12 +75,12 @@ namespace AMDiS { } for (int iter = 1; iter <= this->max_iter; iter++) { - // ::std::cout << "---------------------------Ein Schritt---------------------------" << ::std::endl; + // std::cout << "---------------------------Ein Schritt---------------------------" << std::endl; // v = Ap matVec->matVec(NoTranspose, *p, *v); -// ::std::cout << "p: " << ::std::endl; +// std::cout << "p: " << std::endl; // print(p); -// ::std::cout << "Ap: " << ::std::endl; +// std::cout << "Ap: " << std::endl; // print(v); // \lambda = alpha / (v,p)_2 diff --git a/AMDiS/src/CoarseningManager.cc b/AMDiS/src/CoarseningManager.cc index 65dc046eb74f7a10a3082f298daed4d614e3758a..77eb26db39f6ebaa30e3340e2a6b310026166928 100644 --- a/AMDiS/src/CoarseningManager.cc +++ b/AMDiS/src/CoarseningManager.cc @@ -46,7 +46,7 @@ namespace AMDiS { /* interior node of the tree */ /****************************************************************************/ mark = max(el->getChild(0)->getMark(), el->getChild(1)->getMark()); - el->setMark(::std::min(mark + 1, 0)); + el->setMark(std::min(mark + 1, 0)); } else { diff --git a/AMDiS/src/CoarseningManager1d.cc b/AMDiS/src/CoarseningManager1d.cc index 6d9de4994673d76790fa15d41e9e002da7d3ee34..e999613ed5648389e086f22237eed7680f1a03a2 100644 --- a/AMDiS/src/CoarseningManager1d.cc +++ b/AMDiS/src/CoarseningManager1d.cc @@ -14,7 +14,7 @@ namespace AMDiS { { mesh = aMesh; - ::std::deque<MacroElement*>::const_iterator mel; + std::deque<MacroElement*>::const_iterator mel; int n_elements = mesh->getNumberOfLeaves(); for (mel = mesh->firstMacroElement(); @@ -88,9 +88,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&(mesh->getDOFAdmin(iadmin))); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; ++it) (*it)->coarseRestrict(coarsenList, 1); } @@ -124,7 +124,7 @@ namespace AMDiS { mesh->incrementNumberOfVertices(-1); mark++; - parent->setMark(::std::min(mark,0)); + parent->setMark(std::min(mark,0)); return(parent->getMark()); } diff --git a/AMDiS/src/CoarseningManager2d.cc b/AMDiS/src/CoarseningManager2d.cc index 694ef0e22c63693df908239f50352ddbf3d5c60d..4b9c2c8963ad694f212ecfb42cf79de214671ba9 100644 --- a/AMDiS/src/CoarseningManager2d.cc +++ b/AMDiS/src/CoarseningManager2d.cc @@ -153,9 +153,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; ++it) { (*it)->coarseRestrict(*coarsenList, n_neigh); // if(periodicCoarsenList) { diff --git a/AMDiS/src/CoarseningManager3d.cc b/AMDiS/src/CoarseningManager3d.cc index 80e555bf9b1e93b5bceb5e2704923f98c289ecd6..771c90315a571646d04bc079edfeb2d99da91ff8 100644 --- a/AMDiS/src/CoarseningManager3d.cc +++ b/AMDiS/src/CoarseningManager3d.cc @@ -346,9 +346,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; ++it) (*it)->coarseRestrict(*coarsenList, n_neigh); } diff --git a/AMDiS/src/CouplingTimeInterface.h b/AMDiS/src/CouplingTimeInterface.h index c20779dc8239846305c1cf68dd9bc1891a05491c..24ab7911945662b6435dac791b5a8abd6f3dba43 100644 --- a/AMDiS/src/CouplingTimeInterface.h +++ b/AMDiS/src/CouplingTimeInterface.h @@ -98,7 +98,7 @@ namespace AMDiS { /** \brief * vector of coupled time interfaces */ - ::std::vector<ProblemTimeInterface*> interfaces_; + std::vector<ProblemTimeInterface*> interfaces_; }; } diff --git a/AMDiS/src/CreatorMap.cc b/AMDiS/src/CreatorMap.cc index 47e36b01b9f43e09195943c4914477de59ecab43..5ebfa498fc6079d9c8927764266c2830e261a7c1 100644 --- a/AMDiS/src/CreatorMap.cc +++ b/AMDiS/src/CreatorMap.cc @@ -78,14 +78,14 @@ namespace AMDiS { template<> void CreatorMap<SmootherBase<DOFMatrix, SparseVector<double>, - ::std::set<DegreeOfFreedom> > >::addDefaultCreators() + std::set<DegreeOfFreedom> > >::addDefaultCreators() { - SmootherCreator<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> > *creator; + SmootherCreator<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> > *creator; - creator = NEW GSSmoother<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> >::Creator; + creator = NEW GSSmoother<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> >::Creator; addCreator("gs", creator); - creator = NEW JacobiSmoother<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> >::Creator; + creator = NEW JacobiSmoother<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> >::Creator; addCreator("j", creator); } @@ -183,20 +183,20 @@ namespace AMDiS { template<> void CreatorMap<SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> > >::addDefaultCreators() + Vector< std::set<DegreeOfFreedom>*> > >::addDefaultCreators() { SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> > *creator; + Vector< std::set<DegreeOfFreedom>*> > *creator; creator = NEW GSSmoother<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >::Creator; + Vector< std::set<DegreeOfFreedom>*> >::Creator; addCreator("gs", creator); creator = NEW JacobiSmoother<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >::Creator; + Vector< std::set<DegreeOfFreedom>*> >::Creator; addCreator("j", creator); creator = NEW BoxSmoother::Creator; diff --git a/AMDiS/src/CreatorMap.h b/AMDiS/src/CreatorMap.h index cf9d642e5d3eae7a7596b444c9066e071f15ad26..33deb028bbbe12304b840d76aa8561fdb7fb1924 100644 --- a/AMDiS/src/CreatorMap.h +++ b/AMDiS/src/CreatorMap.h @@ -45,7 +45,7 @@ namespace AMDiS { /** \brief * Adds a new creator together with the given key to the map. */ - static void addCreator(::std::string key, CreatorInterface<BaseClass>* creator) + static void addCreator(std::string key, CreatorInterface<BaseClass>* creator) { FUNCNAME("CreatorMap::addCreator()"); init(); @@ -57,7 +57,7 @@ namespace AMDiS { /** \brief * Creates a object of the type corresponding to key. */ - static CreatorInterface<BaseClass>* getCreator(::std::string key) { + static CreatorInterface<BaseClass>* getCreator(std::string key) { FUNCNAME("CreatorMap::getCreator()"); init(); CreatorInterface<BaseClass> *creator = creatorMap[key]; @@ -85,13 +85,13 @@ namespace AMDiS { /** \brief * STL map containing the pairs of keys and creators. */ - static ::std::map< ::std::string, CreatorInterface<BaseClass>* > creatorMap; + static std::map< std::string, CreatorInterface<BaseClass>* > creatorMap; static bool initialized; }; template<typename BaseClass> - ::std::map< ::std::string, CreatorInterface<BaseClass>* > CreatorMap<BaseClass>::creatorMap; + std::map< std::string, CreatorInterface<BaseClass>* > CreatorMap<BaseClass>::creatorMap; template<typename BaseClass> bool CreatorMap<BaseClass>::initialized = false; diff --git a/AMDiS/src/DOFAdmin.h b/AMDiS/src/DOFAdmin.h index a986c2dd3b6daabe045ff16606ac9a4880ec63c4..4e2d43b4bec217d35d50fbb6454fab7e12352bec 100644 --- a/AMDiS/src/DOFAdmin.h +++ b/AMDiS/src/DOFAdmin.h @@ -81,7 +81,7 @@ namespace AMDiS { /** \brief * constructor */ - DOFAdmin(Mesh* m,::std::string aName); + DOFAdmin(Mesh* m,std::string aName); /** \brief * copy constructor @@ -144,19 +144,19 @@ namespace AMDiS { * compression. This method is usually called after mesh adaption involving * higher order elements or coarsening. */ - void compress(::std::vector<DegreeOfFreedom> &new_dof); + void compress(std::vector<DegreeOfFreedom> &new_dof); /** \brief * Returns an iterator to the begin of \ref dofIndexedList */ - ::std::list<DOFIndexedBase*>::iterator beginDOFIndexed() { + std::list<DOFIndexedBase*>::iterator beginDOFIndexed() { return dofIndexedList.begin(); }; /** \brief * Returns an iterator to the end of \ref dofIndexedList */ - ::std::list<DOFIndexedBase*>::iterator endDOFIndexed() { + std::list<DOFIndexedBase*>::iterator endDOFIndexed() { return dofIndexedList.end(); }; @@ -197,7 +197,7 @@ namespace AMDiS { /** \brief * Returns \ref name */ - inline const ::std::string& getName() const { + inline const std::string& getName() const { return name; }; @@ -239,7 +239,7 @@ namespace AMDiS { /** \brief * Returns \ref dofFree, the array denoting DOFs to be either free or used. */ - inline const ::std::vector<bool>& getDOFFree() const { + inline const std::vector<bool>& getDOFFree() const { return dofFree; }; @@ -271,7 +271,7 @@ namespace AMDiS { /** \brief * Sets \ref name = n */ - inline void setName(const ::std::string& n) { name = n; }; + inline void setName(const std::string& n) { name = n; }; /** \brief * Sets \ref mesh = m @@ -299,15 +299,15 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out); + void serialize(std::ostream &out); - void deserialize(::std::istream &in); + void deserialize(std::istream &in); protected: /** \brief * name of this DOFAdmin */ - ::std::string name; + std::string name; /** \brief * the mesh this DOFAdmin belongs to @@ -317,7 +317,7 @@ namespace AMDiS { /** \brief * the dofFree vector stores for each index whether it is used or not */ - ::std::vector<bool> dofFree; + std::vector<bool> dofFree; /** \brief * index of the first free value in \ref dofFree @@ -357,12 +357,12 @@ namespace AMDiS { /** \brief * list of all managed DOFIndexed objects. */ - ::std::list<DOFIndexedBase*> dofIndexedList; + std::list<DOFIndexedBase*> dofIndexedList; /** \brief * list of all managed DOFContainer objects */ - ::std::list<DOFContainer*> dofContainerList; + std::list<DOFContainer*> dofContainerList; /** \brief * size increment used by \ref enlargeDOFLists. diff --git a/AMDiS/src/DOFContainer.h b/AMDiS/src/DOFContainer.h index a37de183b8c004c89b3553213ee0da9590652bb4..496a9793d484c9e1168c23931669b121b7823f4b 100644 --- a/AMDiS/src/DOFContainer.h +++ b/AMDiS/src/DOFContainer.h @@ -55,7 +55,7 @@ namespace AMDiS { * DOF compression. */ - virtual void compressDOFContainer(int size, ::std::vector<DegreeOfFreedom> &newDOF) + virtual void compressDOFContainer(int size, std::vector<DegreeOfFreedom> &newDOF) { int i, j; for(i=0; i < size; i++) { diff --git a/AMDiS/src/DOFIndexed.cc b/AMDiS/src/DOFIndexed.cc index b6e4758093bebe1fd236bedf2613d699794931e8..07b8469ec24711ec1f83506ceedecf54e9800707 100644 --- a/AMDiS/src/DOFIndexed.cc +++ b/AMDiS/src/DOFIndexed.cc @@ -19,7 +19,7 @@ namespace AMDiS { sum = 0; irow = rowIterator.getDOFIndex(); if(!add) result[irow] = 0.0; - for(::std::vector<MatEntry>::iterator colIterator = rowIterator->begin(); + for(std::vector<MatEntry>::iterator colIterator = rowIterator->begin(); colIterator != rowIterator->end(); colIterator++) { diff --git a/AMDiS/src/DOFIndexed.h b/AMDiS/src/DOFIndexed.h index 0e250b0b75ea6f0efd02d7cd69620a7bd22671fc..6fd2480356938f575b4e7c0d724a6cd59f840bb6 100644 --- a/AMDiS/src/DOFIndexed.h +++ b/AMDiS/src/DOFIndexed.h @@ -64,7 +64,7 @@ namespace AMDiS { * Used by DOFAdmin::compress. Must be overriden by sub classes */ virtual void compressDOFIndexed(int first, int last, - ::std::vector<DegreeOfFreedom> &newDOF) = 0; + std::vector<DegreeOfFreedom> &newDOF) = 0; /** \brief * Performs needed action when a DOF index is freed. Can be overriden in @@ -108,12 +108,12 @@ namespace AMDiS { /** \brief * Returns iterator to the begin of container */ - virtual typename ::std::vector<T>::iterator begin() = 0; + virtual typename std::vector<T>::iterator begin() = 0; /** \brief * Returns iterator to the end of container */ - virtual typename ::std::vector<T>::iterator end() = 0; + virtual typename std::vector<T>::iterator end() = 0; /** \brief * Returns container element at index i diff --git a/AMDiS/src/DOFIterator.h b/AMDiS/src/DOFIterator.h index cea4da9e0ea93d391c0e93a63f3dace8f08b190f..4f9634b23dde0f07ac5993ed516a78440ebb270c 100644 --- a/AMDiS/src/DOFIterator.h +++ b/AMDiS/src/DOFIterator.h @@ -228,9 +228,9 @@ namespace AMDiS { * the dofFree vector */ int position; /**< current position index */ - ::std::vector<bool> *dofFree; /**< stores which DOFs are used + std::vector<bool> *dofFree; /**< stores which DOFs are used */ - ::std::vector<bool>::iterator dofFreeIterator; /**< iterator for dofFree */ + std::vector<bool>::iterator dofFreeIterator; /**< iterator for dofFree */ const DOFIteratorType type; /**< type of this iterator */ }; @@ -316,7 +316,7 @@ namespace AMDiS { /** \brief * Iterator for \ref iteratedObject */ - typename ::std::vector<T>::iterator it; + typename std::vector<T>::iterator it; }; } diff --git a/AMDiS/src/DiagonalPreconditioner.cc b/AMDiS/src/DiagonalPreconditioner.cc index 48a9c81f9129233d9e150a4e44d52d2e06711885..7a260aae0125c3e73637fc4be1569f4b51f80331 100644 --- a/AMDiS/src/DiagonalPreconditioner.cc +++ b/AMDiS/src/DiagonalPreconditioner.cc @@ -38,15 +38,15 @@ namespace AMDiS { } } - void DiagonalPreconditionerStd::precon(::std::vector<double>* x) + void DiagonalPreconditionerStd::precon(std::vector<double>* x) { FUNCNAME("DiagonalPreconditionerStd::precon()"); TEST_EXIT_DBG(x)("no solution vector\n"); TEST_EXIT_DBG(x->size() == matrix->size())("solution vector and matrix have different size\n"); - ::std::vector<double>::iterator vecIt; - ::std::vector< ::std::vector<MatEntry> >::iterator matrixIt; + std::vector<double>::iterator vecIt; + std::vector< std::vector<MatEntry> >::iterator matrixIt; for (vecIt = x->begin(), matrixIt = matrix->begin(); vecIt < x->end(); diff --git a/AMDiS/src/DiagonalPreconditioner.h b/AMDiS/src/DiagonalPreconditioner.h index 8b6986c93cf5923bb4b64dd79f1f2427e787aeda..77819b7351fc5a53dc6aa4dc009d765b44adf9c5 100644 --- a/AMDiS/src/DiagonalPreconditioner.h +++ b/AMDiS/src/DiagonalPreconditioner.h @@ -120,7 +120,7 @@ namespace AMDiS { /** \brief * Realisation of Preconditioner::precon */ - void precon(::std::vector<double>* x); + void precon(std::vector<double>* x); /** \brief * realisation of Preconditioner::exit diff --git a/AMDiS/src/DuneSolver.h b/AMDiS/src/DuneSolver.h index 7f9f84726c545b60d93e2c7e954c8024d903baef..d39f7961cdbfa8a6bede03a7d484993621b51ced 100644 --- a/AMDiS/src/DuneSolver.h +++ b/AMDiS/src/DuneSolver.h @@ -84,7 +84,7 @@ namespace AMDiS { /** \brief * constructor */ - DuneSolver(::std::string name); + DuneSolver(std::string name); /** \brief * destructor @@ -103,12 +103,12 @@ namespace AMDiS { /** \brief * DUNE's solver to be used. */ - ::std::string solverType_; + std::string solverType_; /** \brief * DUNE's preconditioner to be used. */ - ::std::string preconType_; + std::string preconType_; /** \brief * Relaxation factor for the preconditioner. diff --git a/AMDiS/src/DuneSolver.hh b/AMDiS/src/DuneSolver.hh index de9f676f53945314eb135514f9406f127a032745..147491a80b4d9a302e91327c2e0b44d228c39591 100644 --- a/AMDiS/src/DuneSolver.hh +++ b/AMDiS/src/DuneSolver.hh @@ -11,7 +11,7 @@ namespace AMDiS { template<typename VectorType> - DuneSolver<VectorType>::DuneSolver(::std::string name) + DuneSolver<VectorType>::DuneSolver(std::string name) : OEMSolver<VectorType>(name), verbose_(1), solverType_(""), diff --git a/AMDiS/src/ElInfo3d.h b/AMDiS/src/ElInfo3d.h index de133f5a3bb74581fc73559a1ca6c6e133a5a6af..3c12ad8121b5aaa4d613c6de4564924d5e858c3e 100644 --- a/AMDiS/src/ElInfo3d.h +++ b/AMDiS/src/ElInfo3d.h @@ -135,7 +135,7 @@ namespace AMDiS { /** \brief * Tmp vectors used for calculations in calcGrdLambda and getNormal(). */ - ::std::vector< WorldVector<double> > tmpWorldVecs; + std::vector< WorldVector<double> > tmpWorldVecs; }; } diff --git a/AMDiS/src/ElInfoStack.h b/AMDiS/src/ElInfoStack.h index 4a9e886275820eb13bae450d9cedf0eec0f7f273..c7d46234a9cfc44435cab9efa401404e4fbc04ac 100644 --- a/AMDiS/src/ElInfoStack.h +++ b/AMDiS/src/ElInfoStack.h @@ -85,7 +85,7 @@ namespace AMDiS { /** \brief * The stack of pointers to ElInfo objects. */ - ::std::vector<ElInfo*> elInfoStack_; + std::vector<ElInfo*> elInfoStack_; /** \brief * Current position (depth) of the recursive mesh traverse. diff --git a/AMDiS/src/Element.h b/AMDiS/src/Element.h index 8c3c5026983706e21c7f38a77654e4a01702d4cb..830b1f5d1265512a3c23ed56656a51de2a53293b 100644 --- a/AMDiS/src/Element.h +++ b/AMDiS/src/Element.h @@ -530,9 +530,9 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out); + void serialize(std::ostream &out); - void deserialize(::std::istream &in); + void deserialize(std::istream &in); // ===== protected methods ==================================================== protected: diff --git a/AMDiS/src/ElementFileWriter.cc b/AMDiS/src/ElementFileWriter.cc index ba5717157f1daaebd95b2f69241a080f5d828070..bfd4edf6ace56ebe91581a5f4ad515fa7e6d7d71 100644 --- a/AMDiS/src/ElementFileWriter.cc +++ b/AMDiS/src/ElementFileWriter.cc @@ -96,7 +96,7 @@ namespace AMDiS { void ElementFileWriter::writeTecPlotValues(const char* filename) { FUNCNAME("ElementFileWriter::writeTecPlotValues()"); - ::std::ofstream fout(filename); + std::ofstream fout(filename); TEST_EXIT(fout)("Could not open file %s !\n", filename); fout.setf(std::ios::scientific,std::ios::floatfield); @@ -176,7 +176,7 @@ namespace AMDiS { void ElementFileWriter::writeMeshDatValues(const char* filename, double time) { FUNCNAME("ElementFileWriter::writeMeshDatValues()"); - ::std::ofstream fout(filename); + std::ofstream fout(filename); TEST_EXIT(fout)("Could not open file %s !\n", filename); @@ -275,7 +275,7 @@ namespace AMDiS { void ElementFileWriter::writeVtkValues(const char* filename) { FUNCNAME("ElementFileWriter::writeVtkValues()"); - ::std::ofstream fout(filename); + std::ofstream fout(filename); TEST_EXIT(fout)("Could not open file %s !\n", filename); @@ -284,13 +284,13 @@ namespace AMDiS { int nElements = mesh->getNumberOfLeaves(); double val; - fout << "<?xml version=\"1.0\"?>" << ::std::endl; - fout << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">" << ::std::endl; - fout << " <UnstructuredGrid>" << ::std::endl; + fout << "<?xml version=\"1.0\"?>" << std::endl; + fout << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">" << std::endl; + fout << " <UnstructuredGrid>" << std::endl; fout << " <Piece NumberOfPoints=\"" << (dim + 1) * mesh->getNumberOfLeaves() - << "\" NumberOfCells=\"" << nElements << "\">" << ::std::endl; - fout << " <Points>" << ::std::endl; - fout << " <DataArray type=\"Float32\" NumberOfComponents=\"3\" format=\"ascii\">" << ::std::endl; + << "\" NumberOfCells=\"" << nElements << "\">" << std::endl; + fout << " <Points>" << std::endl; + fout << " <DataArray type=\"Float32\" NumberOfComponents=\"3\" format=\"ascii\">" << std::endl; // === Write vertex coordinates (every vertex for every element). === @@ -316,49 +316,49 @@ namespace AMDiS { elInfo = stack.traverseNext(elInfo); } - fout << " </DataArray>" << ::std::endl; - fout << " </Points>" << ::std::endl; - fout << " <Cells>" << ::std::endl; + fout << " </DataArray>" << std::endl; + fout << " </Points>" << std::endl; + fout << " <Cells>" << std::endl; - fout << " <DataArray type=\"Int32\" Name=\"offsets\">" << ::std::endl; + fout << " <DataArray type=\"Int32\" Name=\"offsets\">" << std::endl; for (int i = 0; i < nElements; i++) { - fout << " " << (i + 1) * vertices << ::std::endl; + fout << " " << (i + 1) * vertices << std::endl; } - fout << " </DataArray>" << ::std::endl; + fout << " </DataArray>" << std::endl; - fout << " <DataArray type=\"UInt8\" Name=\"types\">" << ::std::endl; + fout << " <DataArray type=\"UInt8\" Name=\"types\">" << std::endl; for (int i = 0; i < nElements; i++) { switch (vertices) { case 2: - fout << " 3" << ::std::endl; + fout << " 3" << std::endl; break; case 3: - fout << " 5" << ::std::endl; + fout << " 5" << std::endl; break; case 4: - fout << " 10" << ::std::endl; + fout << " 10" << std::endl; break; default: break; } } - fout << " </DataArray>" << ::std::endl; + fout << " </DataArray>" << std::endl; - fout << " <DataArray type=\"Int32\" Name=\"connectivity\">" << ::std::endl; + fout << " <DataArray type=\"Int32\" Name=\"connectivity\">" << std::endl; int vertCntr = 0; for (int i = 0; i < nElements; ++i) { for (int j = 0; j <= dim; ++j) { fout << vertCntr << " "; ++vertCntr; } - fout << ::std::endl; + fout << std::endl; } - fout << " </DataArray>" << ::std::endl; + fout << " </DataArray>" << std::endl; - fout << " </Cells>" << ::std::endl; - fout << " <PointData>" << ::std::endl; - fout << " <DataArray type=\"Float32\" Name=\"value\" format=\"ascii\">" << ::std::endl; + fout << " </Cells>" << std::endl; + fout << " <PointData>" << std::endl; + fout << " <DataArray type=\"Float32\" Name=\"value\" format=\"ascii\">" << std::endl; fout.setf(std::ios::scientific,std::ios::floatfield); @@ -379,13 +379,13 @@ namespace AMDiS { elInfo = stack.traverseNext(elInfo); } - fout << " </DataArray>" << ::std::endl; + fout << " </DataArray>" << std::endl; - fout << " </PointData>" << ::std::endl; - fout << " </Piece>" << ::std::endl; - fout << " </UnstructuredGrid>" << ::std::endl; - fout << "</VTKFile>" << ::std::endl; + fout << " </PointData>" << std::endl; + fout << " </Piece>" << std::endl; + fout << " </UnstructuredGrid>" << std::endl; + fout << "</VTKFile>" << std::endl; fout.close(); } diff --git a/AMDiS/src/ElementInfo.h b/AMDiS/src/ElementInfo.h index c4b21de69605e787347d1e296314586b0cd4e9fd..12d26f070dfb25f4fe92c2551d6909412c801e31 100644 --- a/AMDiS/src/ElementInfo.h +++ b/AMDiS/src/ElementInfo.h @@ -56,7 +56,7 @@ namespace AMDiS { /** \brief * Vertex infos for each element vertex. */ - DimVec< ::std::list<VertexInfo>::iterator> vertexInfo; + DimVec< std::list<VertexInfo>::iterator> vertexInfo; /** \brief * Boundary type for each side. diff --git a/AMDiS/src/ElementRegion_ED.h b/AMDiS/src/ElementRegion_ED.h index 31ca421ab8fe8cd901215d8e65d9ed41e57ec31f..e95b2a8bd3ee6deb1f2dce710db35ba21b2fec69 100644 --- a/AMDiS/src/ElementRegion_ED.h +++ b/AMDiS/src/ElementRegion_ED.h @@ -78,17 +78,17 @@ namespace AMDiS { return newObj; }; - inline ::std::string getTypeName() const { return "ElementRegion_ED"; }; + inline std::string getTypeName() const { return "ElementRegion_ED"; }; inline const int getTypeID() const { return ELEMENT_REGION; }; - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); out.write(reinterpret_cast<const char*>(®ion_), sizeof(int)); }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); in.read(reinterpret_cast<char*>(®ion_), sizeof(int)); diff --git a/AMDiS/src/EmptyElementData.h b/AMDiS/src/EmptyElementData.h index 1865a51f89fb5f24f5abe8b57f13ca46572d38d2..ab6fdbea1adedc4bb99f250ce03529a1dcd99352 100644 --- a/AMDiS/src/EmptyElementData.h +++ b/AMDiS/src/EmptyElementData.h @@ -70,16 +70,16 @@ namespace AMDiS { return newObj; }; - inline ::std::string getTypeName() const { return "EmptyElementData"; }; + inline std::string getTypeName() const { return "EmptyElementData"; }; inline const int getTypeID() const { return EMPTY_ED; }; - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); }; diff --git a/AMDiS/src/Estimator.cc b/AMDiS/src/Estimator.cc index 246f1bc422bbec5fe3e8df323d5c492b5ead21e5..e50da03d12791363677f8f2c2c0ba0c685da9078 100755 --- a/AMDiS/src/Estimator.cc +++ b/AMDiS/src/Estimator.cc @@ -4,7 +4,7 @@ namespace AMDiS { - Estimator::Estimator(::std::string name_, int r) + Estimator::Estimator(std::string name_, int r) : name(name_), norm(NO_NORM), row(r) @@ -21,6 +21,7 @@ namespace AMDiS { TraverseStack stack; ElInfo *elInfo = stack.traverseFirst(mesh, -1, traverseFlag); while (elInfo) { + std::cout << elInfo->getElement()->getIndex() << std::endl; estimateElement(elInfo); elInfo = stack.traverseNext(elInfo); } diff --git a/AMDiS/src/Estimator.h b/AMDiS/src/Estimator.h index b1a92a4297538d631323635ea5892303fcf19aaa..8254c802c2449b101789b2953f391bf757e752dd 100755 --- a/AMDiS/src/Estimator.h +++ b/AMDiS/src/Estimator.h @@ -64,7 +64,7 @@ namespace AMDiS { /** \brief * Constructor. */ - Estimator(::std::string name_, int r); + Estimator(std::string name_, int r); /** \brief * destructor @@ -74,7 +74,7 @@ namespace AMDiS { /** \brief * Returns \ref name of the Estimator */ - inline const ::std::string& getName() const { + inline const std::string& getName() const { return name; }; @@ -194,7 +194,7 @@ namespace AMDiS { /** \brief * Name of the Estimator */ - ::std::string name; + std::string name; /** \brief * Used norm @@ -227,23 +227,23 @@ namespace AMDiS { * estimator. Then it contains also coupling matrices * of the different vector components. */ - ::std::vector<DOFMatrix*> matrix; + std::vector<DOFMatrix*> matrix; /** \brief * Vector of solution vectors for the different systems. */ - ::std::vector<DOFVector<double>*> uh; + std::vector<DOFVector<double>*> uh; /** \brief * Vector of old solutions vectors for the different systems. * Used for instationary problems. */ - ::std::vector<DOFVector<double>*> uhOld; + std::vector<DOFVector<double>*> uhOld; /** \brief * Vector of RHS vectors for the different systems. */ - ::std::vector<DOFVector<double>*> fh; + std::vector<DOFVector<double>*> fh; /** \brief * Used, if the scalar estimator builds one row of a vector valued estimator. @@ -286,7 +286,7 @@ namespace AMDiS { /** \brief * Sets \ref name */ - void setName(::std::string name_) { + void setName(std::string name_) { name = name_; }; @@ -301,7 +301,7 @@ namespace AMDiS { /** \brief * Name of the estimator to be created. */ - ::std::string name; + std::string name; /** \brief * Row of the estimator. diff --git a/AMDiS/src/FileWriter.cc b/AMDiS/src/FileWriter.cc index 592292385f9430e75e0322dba14adcfbb0930459..ddb8385a881a038a8ad2776efc7abc0e9b4f0195 100644 --- a/AMDiS/src/FileWriter.cc +++ b/AMDiS/src/FileWriter.cc @@ -14,7 +14,7 @@ namespace AMDiS { - FileWriter::FileWriter(const ::std::string &name_, + FileWriter::FileWriter(const std::string &name_, Mesh *mesh_, DOFVector<double> *vec) : name(name_), @@ -33,9 +33,9 @@ namespace AMDiS { } - FileWriter::FileWriter(const ::std::string &name_, + FileWriter::FileWriter(const std::string &name_, Mesh *mesh_, - ::std::vector< DOFVector<double>* > vecs) + std::vector< DOFVector<double>* > vecs) : name(name_), mesh(mesh_) { @@ -55,7 +55,7 @@ namespace AMDiS { } - FileWriter::FileWriter(const ::std::string &name_, + FileWriter::FileWriter(const std::string &name_, Mesh *mesh_, DOFVector< WorldVector<double> > *vec) : name(name_), @@ -184,7 +184,7 @@ namespace AMDiS { } } - ::std::string fn = filename; + std::string fn = filename; if (appendIndex) { TEST_EXIT(indexLength <= 99)("index lenght > 99\n"); diff --git a/AMDiS/src/FileWriter.h b/AMDiS/src/FileWriter.h index 440de6cf0da157c5679924ffaac8056bc73418f0..8300d3f2e489d7ea8b48bcad597fc982a00b5773 100644 --- a/AMDiS/src/FileWriter.h +++ b/AMDiS/src/FileWriter.h @@ -83,11 +83,11 @@ namespace AMDiS { writeElement = writeElem; }; - ::std::string getFilename() { + std::string getFilename() { return filename; }; - void setFilename(::std::string n) { + void setFilename(std::string n) { filename = n; }; @@ -95,7 +95,7 @@ namespace AMDiS { /** \brief * Used filename prefix. */ - ::std::string filename; + std::string filename; int traverseLevel; @@ -123,22 +123,22 @@ namespace AMDiS { /** \brief * Constructor for a filewriter for one data component. */ - FileWriter(const ::std::string& name_, + FileWriter(const std::string& name_, Mesh *mesh_, DOFVector<double> *vec); /** \brief * Constructor for a filewriter with more than one data component. */ - FileWriter(const ::std::string& name_, + FileWriter(const std::string& name_, Mesh *mesh_, - ::std::vector< DOFVector<double>* > vecs); + std::vector< DOFVector<double>* > vecs); /** \brief * Constructor for a filewriter, when the solution vector is a vector * of WorldVectors. */ - FileWriter(const ::std::string &name_, + FileWriter(const std::string &name_, Mesh *mesh_, DOFVector< WorldVector<double> > *vec); @@ -181,32 +181,32 @@ namespace AMDiS { /** \brief * Name of the writer. */ - ::std::string name; + std::string name; /** \brief * TecPlot file extension. */ - ::std::string tecplotExt; + std::string tecplotExt; /** \brief * AMDiS mesh-file extension. */ - ::std::string amdisMeshExt; + std::string amdisMeshExt; /** \brief * AMDiS solution-file extension. */ - ::std::string amdisDataExt; + std::string amdisDataExt; /** \brief * VTK file extension. */ - ::std::string paraViewFileExt; + std::string paraViewFileExt; /** \brief * Periodic file extension. */ - ::std::string periodicFileExt; + std::string periodicFileExt; /** \brief * 0: Don't write TecPlot files. @@ -262,7 +262,7 @@ namespace AMDiS { /** \brief * Stores all writen filename to a ParaView animation file. */ - ::std::vector< ::std::string > paraViewAnimationFrames_; + std::vector< std::string > paraViewAnimationFrames_; /** */ @@ -281,7 +281,7 @@ namespace AMDiS { /** \brief * Pointers to the vectors which store the solution. */ - ::std::vector< DOFVector<double>* > solutionVecs_; + std::vector< DOFVector<double>* > solutionVecs_; /** \brief * Stores the number of temporal solutions vectors, which have been created @@ -293,7 +293,7 @@ namespace AMDiS { /** \brief * Containers, which store the data to be written; */ - ::std::vector< DataCollector* > dataCollectors_; + std::vector< DataCollector* > dataCollectors_; /** \brief * If set to 1, the FileWriter will delay the file writing to the future, where @@ -310,7 +310,7 @@ namespace AMDiS { /** \brief * Here the filename for the file, which should be written to the next, is stored. */ - ::std::string delayedFilename_; + std::string delayedFilename_; }; } diff --git a/AMDiS/src/FiniteElemSpace.cc b/AMDiS/src/FiniteElemSpace.cc index 4827b8ba4da2ec6579e5d085a1a41613d1a696c3..fe4802accde86cd95df137b7ead5ed688e0bed04 100644 --- a/AMDiS/src/FiniteElemSpace.cc +++ b/AMDiS/src/FiniteElemSpace.cc @@ -7,11 +7,11 @@ namespace AMDiS { - ::std::vector<FiniteElemSpace*> FiniteElemSpace::feSpaces; + std::vector<FiniteElemSpace*> FiniteElemSpace::feSpaces; FiniteElemSpace::FiniteElemSpace(DOFAdmin* admin_, const BasisFunction* bas_fcts_, - Mesh* aMesh, const ::std::string& aString) + Mesh* aMesh, const std::string& aString) : name(aString), admin(admin_), basFcts(bas_fcts_), mesh(aMesh) { FUNCNAME("FiniteElemSpace::FiniteElemSpace()"); @@ -44,7 +44,7 @@ namespace AMDiS { FiniteElemSpace *FiniteElemSpace::provideFESpace(DOFAdmin *admin, const BasisFunction *basFcts, Mesh *mesh, - const ::std::string& name_) + const std::string& name_) { int numSpaces = static_cast<int>(feSpaces.size()); diff --git a/AMDiS/src/FiniteElemSpace.h b/AMDiS/src/FiniteElemSpace.h index 86bd386ec49de4cf0881502d0f2e40a8cb1514e2..5d662816a931f1bc50ed64ac2862d4876452b2a4 100644 --- a/AMDiS/src/FiniteElemSpace.h +++ b/AMDiS/src/FiniteElemSpace.h @@ -64,7 +64,7 @@ namespace AMDiS { static FiniteElemSpace *provideFESpace(DOFAdmin *admin, const BasisFunction *basFcts, Mesh *mesh, - const ::std::string& name_ = ""); + const std::string& name_ = ""); /** \brief * destructor @@ -74,7 +74,7 @@ namespace AMDiS { /** \brief * Returns \ref name */ - inline ::std::string getName() const { + inline std::string getName() const { return name; }; @@ -107,13 +107,13 @@ namespace AMDiS { FiniteElemSpace(DOFAdmin* admin_, const BasisFunction* basisFcts, Mesh* mesh, - const ::std::string& name_=""); + const std::string& name_=""); protected: /** \brief * Name of this FiniteElemSpace */ - const ::std::string name; + const std::string name; /** \brief * DOFAdmin corresponding to this FiniteElemSpace @@ -133,7 +133,7 @@ namespace AMDiS { /** \brief * */ - static ::std::vector<FiniteElemSpace*> feSpaces; + static std::vector<FiniteElemSpace*> feSpaces; }; } diff --git a/AMDiS/src/FixVec.h b/AMDiS/src/FixVec.h index ca9a691ecbc4b02882125bf527279abd8f223311..ac7e312fd608627063b8b698a26064086dca3099 100644 --- a/AMDiS/src/FixVec.h +++ b/AMDiS/src/FixVec.h @@ -630,7 +630,7 @@ namespace AMDiS { * FixVec operator for stream output */ template<typename T, GeoIndex d> - std::ostream& operator <<(::std::ostream& out, const FixVec<T,d>& fixvec) + std::ostream& operator <<(std::ostream& out, const FixVec<T,d>& fixvec) { for(int i=0; i < fixvec.getSize()-1; i++) { out << fixvec[i] << " "; diff --git a/AMDiS/src/GMResSolver.h b/AMDiS/src/GMResSolver.h index bb539a6966d8d0c277a30d003bfddd7011cfdbad..6cbf0e185f238c5de345d8813e1acec84c53279f 100644 --- a/AMDiS/src/GMResSolver.h +++ b/AMDiS/src/GMResSolver.h @@ -75,7 +75,7 @@ namespace AMDiS { /** \brief * constructor */ - GMResSolver(::std::string name); + GMResSolver(std::string name); /** \brief * destructor @@ -135,24 +135,24 @@ namespace AMDiS { /** \brief * Stores the gamma values for Givens transformations. */ - ::std::vector<double> gamma; + std::vector<double> gamma; /** \brief * Stores the c values for Givens transformations. */ - ::std::vector<double> c; + std::vector<double> c; /** \brief * Stores the s values for Givens transformations. */ - ::std::vector<double> s; + std::vector<double> s; - ::std::vector<double> y_; + std::vector<double> y_; /** \brief * H-Matrix computed in the GMRES algorithm. */ - ::std::vector< ::std::vector<double> > h; + std::vector< std::vector<double> > h; }; diff --git a/AMDiS/src/GMResSolver.hh b/AMDiS/src/GMResSolver.hh index 9315d96ef46172298beabbba69b44dd80c7541f7..e35fc959c3d0615ef9c7ab3ec89ed117fda30ee9 100644 --- a/AMDiS/src/GMResSolver.hh +++ b/AMDiS/src/GMResSolver.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - GMResSolver<VectorType>::GMResSolver(::std::string name) + GMResSolver<VectorType>::GMResSolver(std::string name) : OEMSolver<VectorType>(name), TOL_(1.e-25), restart_(0), diff --git a/AMDiS/src/GMResSolver2.h b/AMDiS/src/GMResSolver2.h index 204af83e91c808dc79a2f2b937279952207cea2c..ace8097247e998c0c18a2e35bfaa82ff8f41089c 100644 --- a/AMDiS/src/GMResSolver2.h +++ b/AMDiS/src/GMResSolver2.h @@ -74,7 +74,7 @@ namespace AMDiS { /** \brief * constructor */ - GMResSolver2(::std::string name); + GMResSolver2(std::string name); /** \brief * destructor diff --git a/AMDiS/src/GMResSolver2.hh b/AMDiS/src/GMResSolver2.hh index 62edf41b3a8d20aa782ec05e438ee3287382c88d..4ffee64efcf12e16e8ac16736d8e49521b30d6da 100644 --- a/AMDiS/src/GMResSolver2.hh +++ b/AMDiS/src/GMResSolver2.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - GMResSolver2<VectorType>::GMResSolver2(::std::string name) + GMResSolver2<VectorType>::GMResSolver2(std::string name) : OEMSolver<VectorType>(name), TOL_(1.e-25), restart_(0), diff --git a/AMDiS/src/GNUPlotWriter.cc b/AMDiS/src/GNUPlotWriter.cc index 828880f444430e9688ff358a29fbcb1bf5590f0d..90d7b54463e8b8acf77cdcb41b6f7bf6ae57904c 100644 --- a/AMDiS/src/GNUPlotWriter.cc +++ b/AMDiS/src/GNUPlotWriter.cc @@ -9,9 +9,9 @@ namespace AMDiS { - GNUPlotWriter::GNUPlotWriter(::std::string fn, + GNUPlotWriter::GNUPlotWriter(std::string fn, FiniteElemSpace *feSpace, - ::std::vector<DOFVector<double>*> &dofVectors) + std::vector<DOFVector<double>*> &dofVectors) : feSpace_(feSpace), dofVectors_(dofVectors), filename_(filename) diff --git a/AMDiS/src/GNUPlotWriter.h b/AMDiS/src/GNUPlotWriter.h index 5bdaa5cf83fac2ef5e408eb10bfe52acf6ed48a3..251b15c96f4d659e49c91a644789a7d8d76e1270 100644 --- a/AMDiS/src/GNUPlotWriter.h +++ b/AMDiS/src/GNUPlotWriter.h @@ -43,9 +43,9 @@ namespace AMDiS { /** \brief * Constructor */ - GNUPlotWriter(::std::string filename, + GNUPlotWriter(std::string filename, FiniteElemSpace *feSpace, - ::std::vector<DOFVector<double>*> &dofVectors); + std::vector<DOFVector<double>*> &dofVectors); /** \brief * Destructor @@ -66,12 +66,12 @@ namespace AMDiS { /** \brief * vector of dof vectors to write */ - ::std::vector<DOFVector<double>*> dofVectors_; + std::vector<DOFVector<double>*> dofVectors_; /** \brief * file name */ - ::std::string filename_; + std::string filename_; }; } diff --git a/AMDiS/src/GSSmoother.cc b/AMDiS/src/GSSmoother.cc index 086a6bfe1b520cdd68c36bad254097ff6e1d8e08..b87d719885f0ae7fdc8db5f6c97bef113104df3a 100755 --- a/AMDiS/src/GSSmoother.cc +++ b/AMDiS/src/GSSmoother.cc @@ -9,28 +9,28 @@ namespace AMDiS { template<> void GSSmoother<DOFMatrix, SparseVector<double>, - ::std::set<DegreeOfFreedom> >:: + std::set<DegreeOfFreedom> >:: smooth(DOFMatrix *matrix, SparseVector<double> *solution, SparseVector<double> *rhs, int iterations, - const ::std::set<DegreeOfFreedom> &dofSet) + const std::set<DegreeOfFreedom> &dofSet) { int i, j, rowNumber, colNumber, numCols; double entry, diagEntry = 0.0; double oldSolution; - ::std::set<DegreeOfFreedom>::iterator dofIt, - dofEnd = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).end(); + std::set<DegreeOfFreedom>::iterator dofIt, + dofEnd = const_cast< std::set<DegreeOfFreedom>&>(dofSet).end(); for(i = 0; i < iterations; i++) { - for(dofIt = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).begin(); + for(dofIt = const_cast< std::set<DegreeOfFreedom>&>(dofSet).begin(); dofIt != dofEnd; ++dofIt) { rowNumber = *dofIt; - const ::std::vector<MatEntry>& row = matrix->getRow(rowNumber); + const std::vector<MatEntry>& row = matrix->getRow(rowNumber); numCols = static_cast<int>(row.size()); oldSolution = (*solution)[rowNumber]; @@ -53,15 +53,15 @@ namespace AMDiS { } } - // dofEnd = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).begin(); + // dofEnd = const_cast< std::set<DegreeOfFreedom>&>(dofSet).begin(); // for(i = 0; i < iterations; i++) { - // for(dofIt = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).end(); + // for(dofIt = const_cast< std::set<DegreeOfFreedom>&>(dofSet).end(); // dofIt != dofEnd; // --dofIt) // { // rowNumber = *dofIt; - // const ::std::vector<MatEntry>& row = matrix->getRow(rowNumber); + // const std::vector<MatEntry>& row = matrix->getRow(rowNumber); // numCols = static_cast<int>(row.size()); // oldSolution = (*solution)[rowNumber]; @@ -88,12 +88,12 @@ namespace AMDiS { template<> void GSSmoother<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >:: + Vector< std::set<DegreeOfFreedom>*> >:: smooth(Matrix<DOFMatrix*> *m, Vector<SparseVector<double>*> *s, Vector<SparseVector<double>*> *r, int iterations, - const Vector< ::std::set<DegreeOfFreedom>*> &dofSet) + const Vector< std::set<DegreeOfFreedom>*> &dofSet) { int numComponents = s->getSize(); int i, j, k, l; @@ -105,7 +105,7 @@ namespace AMDiS { DOFMatrix *matrix; SparseVector<double> *rhs; - ::std::set<DegreeOfFreedom>::iterator dofIt, dofEnd; + std::set<DegreeOfFreedom>::iterator dofIt, dofEnd; for(i = 0; i < iterations; i++) { for(j = 0; j < numComponents; j++) { @@ -122,7 +122,7 @@ namespace AMDiS { matrix = (*m)[j][k]; if(matrix) { - const ::std::vector<MatEntry>& row = matrix->getRow(rowNumber); + const std::vector<MatEntry>& row = matrix->getRow(rowNumber); numCols = static_cast<int>(row.size()); for(l = 0; l < numCols; l++) { diff --git a/AMDiS/src/GSSmoother.h b/AMDiS/src/GSSmoother.h index 6309635e06a2c7b352c4907edefa08f40aa2b649..20d4e7c5c0379d52ab6d3a0ed542204be6b3df11 100755 --- a/AMDiS/src/GSSmoother.h +++ b/AMDiS/src/GSSmoother.h @@ -44,7 +44,7 @@ namespace AMDiS { }; }; - GSSmoother(::std::string name_) + GSSmoother(std::string name_) : SmootherBase<MatrixType, VectorType, DOFSetType>(name_), omega_(1.0) { diff --git a/AMDiS/src/Global.cc b/AMDiS/src/Global.cc index ab243aa5d74f1793eda710cfa37fdf710225298f..b504aaf33f1fe4bf097fa9073468ac4d9943bdde 100644 --- a/AMDiS/src/Global.cc +++ b/AMDiS/src/Global.cc @@ -13,10 +13,10 @@ namespace AMDiS { const char *funcName = NULL; const char *Msg::oldFuncName = NULL; - ::std::ostream* Msg::out = NULL; - ::std::ostream* Msg::error = NULL; + std::ostream* Msg::out = NULL; + std::ostream* Msg::error = NULL; int Global::dimOfWorld = 0; - ::std::vector< ::std::vector< int > > Global::geoIndexTable; + std::vector< std::vector< int > > Global::geoIndexTable; int Msg::msgInfo = 10; bool Msg::msgWait = true; @@ -39,13 +39,13 @@ namespace AMDiS { return; } - void Msg::change_out(::std::ostream *fp) + void Msg::change_out(std::ostream *fp) { FUNCNAME("Msg::change_out()"); if (fp) { - if (out && *out != ::std::cout && *out != ::std::cerr) { - dynamic_cast< ::std::ofstream*>(out)->close(); + if (out && *out != std::cout && *out != std::cerr) { + dynamic_cast< std::ofstream*>(out)->close(); delete out; } @@ -61,12 +61,12 @@ namespace AMDiS { void Msg::open_file(const char *filename, OPENMODE type) { FUNCNAME("Msg::open_file()"); - ::std::ofstream *fp; + std::ofstream *fp; - if (filename && (fp = new ::std::ofstream(filename, type))) { - if (out && *out != ::std::cout && *out != ::std::cerr) { - dynamic_cast< ::std::ofstream*>(out)->close(); + if (filename && (fp = new std::ofstream(filename, type))) { + if (out && *out != std::cout && *out != std::cerr) { + dynamic_cast< std::ofstream*>(out)->close(); delete out; } @@ -82,13 +82,13 @@ namespace AMDiS { return; } - void Msg::change_error_out(::std::ofstream *fp) + void Msg::change_error_out(std::ofstream *fp) { FUNCNAME("Msg::change_error_out()"); if (fp) { - if (error && *error != ::std::cout && *error != ::std::cerr) { - dynamic_cast< ::std::ofstream*>(error)->close(); + if (error && *error != std::cout && *error != std::cerr) { + dynamic_cast< std::ofstream*>(error)->close(); delete error; } @@ -104,11 +104,11 @@ namespace AMDiS { void Msg::open_error_file(const char *filename, OPENMODE type) { FUNCNAME("Msg::open_error_file()"); - ::std::ofstream *fp; + std::ofstream *fp; - if (filename && (fp = new ::std::ofstream(filename, type))) { - if (error && *error != ::std::cout && *error != ::std::cerr) { - dynamic_cast< ::std::ofstream*>(error)->close(); + if (filename && (fp = new std::ofstream(filename, type))) { + if (error && *error != std::cout && *error != std::cerr) { + dynamic_cast< std::ofstream*>(error)->close(); delete error; } @@ -153,12 +153,12 @@ namespace AMDiS { void Msg::print_funcname(const char *funcName) { if (!out) - out = &::std::cout; + out = &std::cout; if (funcName && oldFuncName != funcName) { - (*out)<< funcName << ":" << ::std::endl; + (*out)<< funcName << ":" << std::endl; } else if (!funcName) { - (*out)<<"*unknown function*" << ::std::endl; + (*out)<<"*unknown function*" << std::endl; } (*out) << " "; oldFuncName = funcName; @@ -171,7 +171,7 @@ namespace AMDiS { static int old_line = -1; if (!error) - error = &::std::cerr; + error = &std::cerr; if (funcName && oldFuncName != funcName) { (*error)<<funcName<< ": "; @@ -195,7 +195,7 @@ namespace AMDiS { char buff[255]; if (!error) - error = &::std::cerr; + error = &std::cerr; va_start(arg, format); vsprintf(buff, format, arg); @@ -212,7 +212,7 @@ namespace AMDiS { if (!error) - error = &::std::cerr; + error = &std::cerr; va_start(arg, format); vsprintf(buff, format, arg); @@ -229,7 +229,7 @@ namespace AMDiS { static int old_line = -1; if (!out) - out = &::std::cout; + out = &std::cout; if (funcName && oldFuncName != funcName) { (*out) << funcName << ": "; @@ -252,7 +252,7 @@ namespace AMDiS { char buff[255]; if (!out) - out = &::std::cout; + out = &std::cout; va_start(arg, format); vsprintf(buff, format, arg); @@ -269,7 +269,7 @@ namespace AMDiS { char buff[255]; if (!out) - out = &::std::cout; + out = &std::cout; va_start(arg, format); vsprintf(buff, format, arg); @@ -332,9 +332,9 @@ namespace AMDiS { return i * fac(i - 1); } - ::std::string memSizeStr(int size) + std::string memSizeStr(int size) { - ::std::string result; + std::string result; // if (size > 1024) { // if (size > 1024 * 1024) { // result << size / (1024 * 1024) << " MByte"; diff --git a/AMDiS/src/Global.h b/AMDiS/src/Global.h index b189b114f3620a12a44e066f76438bca5a7edc69..5f0f8cc63417e6b41603f50a6c6c08983f333eb1 100644 --- a/AMDiS/src/Global.h +++ b/AMDiS/src/Global.h @@ -30,9 +30,9 @@ #define AMDIS_GLOBAL_H #if (__GNUC__) && (__GNUC__ > 2) -#define OPENMODE ::std::ios::openmode +#define OPENMODE std::ios::openmode #else -#define OPENMODE ::std::ios::open_mode +#define OPENMODE std::ios::open_mode #endif /** \brief current AMDiS version */ @@ -103,13 +103,13 @@ namespace AMDiS { /** \brief * Calculates the logaritmic error progression */ -#define EOC(e,eo) log(eo/::std::max(e,1.0e-15))/M_LN2 +#define EOC(e,eo) log(eo/std::max(e,1.0e-15))/M_LN2 /** \brief - * Content comparision of two pointers. Used e.g. for ::std::find_if + * Content comparision of two pointers. Used e.g. for std::find_if */ template<typename T> - struct comparePtrContents : public ::std::binary_function<T*, T*, bool> + struct comparePtrContents : public std::binary_function<T*, T*, bool> { /** \brief * Overrides binary_function::operator() @@ -221,7 +221,7 @@ namespace AMDiS { /** \brief * Changes the message stream */ - static void change_out(::std::ostream*); + static void change_out(std::ostream*); /** \brief * Creates a filestream and sets the message stream to this filestream @@ -231,7 +231,7 @@ namespace AMDiS { /** \brief * Changes the error stream */ - static void change_error_out(::std::ofstream *fp); + static void change_error_out(std::ofstream *fp); /** \brief * Creates a filestream and sets the error stream to this filestream @@ -273,23 +273,23 @@ namespace AMDiS { /** \brief * Returns \ref out */ - static ::std::ostream *getOutStream() { return out; }; + static std::ostream *getOutStream() { return out; }; /** \brief * Returns \ref error */ - static ::std::ostream *getErrorStream() { return error; }; + static std::ostream *getErrorStream() { return error; }; protected: /** \brief * Message stram */ - static ::std::ostream *out; + static std::ostream *out; /** \brief * Error stream */ - static ::std::ostream *error; + static std::ostream *error; /** \brief * Remember funcName to avoid multiple output of funcName within the same @@ -366,13 +366,13 @@ namespace AMDiS { * prints a message, if min(Msg::msgInfo, info) >= noinfo */ #define INFO(info,noinfo) \ - if (Msg::getMsgInfo()&&(::std::min(Msg::getMsgInfo(),(info))>=(noinfo))) MSG + if (Msg::getMsgInfo()&&(std::min(Msg::getMsgInfo(),(info))>=(noinfo))) MSG /** \brief * prints a message, if min(Msg::msgInfo, info) >= noinfo */ #define PRINT_INFO(info,noinfo) \ - if (Msg::getMsgInfo()&&(::std::min(Msg::getMsgInfo(),(info))>=(noinfo))) Msg::print + if (Msg::getMsgInfo()&&(std::min(Msg::getMsgInfo(),(info))>=(noinfo))) Msg::print /** \brief @@ -504,14 +504,14 @@ namespace AMDiS { /** \brief * Stores the precalculated results that should be returned by Global::getGeo. */ - static ::std::vector< ::std::vector< int > > geoIndexTable; + static std::vector< std::vector< int > > geoIndexTable; }; #define COMMA , const int RescheduleErrorCode = 23; - ::std::string memSizeStr(int size); + std::string memSizeStr(int size); } #endif // AMDIS_GLOBAL_H diff --git a/AMDiS/src/GlobalDOFNumbering.cc b/AMDiS/src/GlobalDOFNumbering.cc index a3f1ff2198155771182db009ab1ca026ed6adf23..b8fc33c7bd215ef0546aa3b60a3d82f81a2b1876 100644 --- a/AMDiS/src/GlobalDOFNumbering.cc +++ b/AMDiS/src/GlobalDOFNumbering.cc @@ -4,15 +4,15 @@ namespace AMDiS { - GlobalDOFNumbering::GlobalDOFNumbering(::std::vector<MeshStructure*> &meshCodes, - ::std::vector< ::std::vector<DegreeOfFreedom> > &dofCodes, + GlobalDOFNumbering::GlobalDOFNumbering(std::vector<MeshStructure*> &meshCodes, + std::vector< std::vector<DegreeOfFreedom> > &dofCodes, int dofsPerElement) : dofsPerElement_(dofsPerElement), globalIndexCounter_(0) { int rank, mpiSize = static_cast<int>(meshCodes.size()); - ::std::vector< ::std::vector<DegreeOfFreedom>::iterator> it(mpiSize); + std::vector< std::vector<DegreeOfFreedom>::iterator> it(mpiSize); // init for(rank = 0; rank < mpiSize; rank++) { @@ -27,8 +27,8 @@ namespace AMDiS { } } - void GlobalDOFNumbering::handleRecursive(::std::vector<MeshStructure*> &meshCodes, - ::std::vector< ::std::vector<DegreeOfFreedom>::iterator> &it) + void GlobalDOFNumbering::handleRecursive(std::vector<MeshStructure*> &meshCodes, + std::vector< std::vector<DegreeOfFreedom>::iterator> &it) { int rank, mpiSize = static_cast<int>(meshCodes.size()); int dofNr; @@ -65,7 +65,7 @@ namespace AMDiS { } // === recursion === - ::std::vector<MeshStructure*> recursiveCodes; + std::vector<MeshStructure*> recursiveCodes; bool cont = false; for(rank = 0; rank < mpiSize; rank++) { if(meshCodes[rank]) { diff --git a/AMDiS/src/GlobalDOFNumbering.h b/AMDiS/src/GlobalDOFNumbering.h index f2f25c159ce08a338bf28db516e46b6c4ec9ba38..ed3cbb633f840751b103409f426751deb9791024 100644 --- a/AMDiS/src/GlobalDOFNumbering.h +++ b/AMDiS/src/GlobalDOFNumbering.h @@ -50,8 +50,8 @@ namespace AMDiS { /** \brief * Constructor */ - GlobalDOFNumbering(::std::vector<MeshStructure*> &meshCodes, - ::std::vector< ::std::vector<DegreeOfFreedom> > &dofCodes, + GlobalDOFNumbering(std::vector<MeshStructure*> &meshCodes, + std::vector< std::vector<DegreeOfFreedom> > &dofCodes, int dofsPerElement); /** \brief @@ -65,13 +65,13 @@ namespace AMDiS { int getGlobalIndex(int rank, int localIndex); protected: - void handleRecursive(::std::vector<MeshStructure*> &meshCodes, - ::std::vector< ::std::vector<DegreeOfFreedom>::iterator> &it); + void handleRecursive(std::vector<MeshStructure*> &meshCodes, + std::vector< std::vector<DegreeOfFreedom>::iterator> &it); protected: - ::std::vector< ::std::map<DegreeOfFreedom, DegreeOfFreedom> > localToGlobal_; + std::vector< std::map<DegreeOfFreedom, DegreeOfFreedom> > localToGlobal_; - ::std::vector< ::std::map<DegreeOfFreedom, DegreeOfFreedom> > globalToLocal_; + std::vector< std::map<DegreeOfFreedom, DegreeOfFreedom> > globalToLocal_; int dofsPerElement_; diff --git a/AMDiS/src/GlobalElementNumbering.h b/AMDiS/src/GlobalElementNumbering.h index afe9b468d654047cc9db0b362b28bfb2819f6f30..800d47686b391cde69f1511c37767b3c2439bdf4 100644 --- a/AMDiS/src/GlobalElementNumbering.h +++ b/AMDiS/src/GlobalElementNumbering.h @@ -66,12 +66,12 @@ namespace AMDiS { /** \brief * Maps each local index to its global index. */ - ::std::map<int, int> localToGlobal_; + std::map<int, int> localToGlobal_; /** \brief * Stores local index for each global index. */ - ::std::map<int, int> globalToLocal_; + std::map<int, int> globalToLocal_; }; } diff --git a/AMDiS/src/GridWriter.hh b/AMDiS/src/GridWriter.hh index 989336ee193830e368872cc4e7fb29e8f7caa8c4..fd6419e41a433d823899f6fb3c3c0e7236f5bfce 100644 --- a/AMDiS/src/GridWriter.hh +++ b/AMDiS/src/GridWriter.hh @@ -16,7 +16,7 @@ namespace AMDiS { { FUNCNAME("GridWriter<T>::writeGrid()"); - ::std::ofstream *outFile = new ::std::ofstream(filename); + std::ofstream *outFile = new std::ofstream(filename); TEST_EXIT(outFile)("can't open file %s\n", filename); const Mesh *mesh = vec->getFESpace()->getMesh(); @@ -105,19 +105,19 @@ namespace AMDiS { warning = true; } /* write value */ - (*outFile) << "0.0" << ::std::endl; + (*outFile) << "0.0" << std::endl; } else { /* get value at coords */ uhLoc = vec->getLocalVector(elp, NULL); value = basFcts->evalUh(bary, uhLoc); /* write value */ - (*outFile) << value << ::std::endl; + (*outFile) << value << std::endl; } } - if (localNumPoints[2] > 1) (*outFile) << ::std::endl; + if (localNumPoints[2] > 1) (*outFile) << std::endl; } - if (localNumPoints[1] > 1) (*outFile) << ::std::endl; + if (localNumPoints[1] > 1) (*outFile) << std::endl; } DELETE [] basis; diff --git a/AMDiS/src/ILUPreconditioner.cc b/AMDiS/src/ILUPreconditioner.cc index 972137d3ee9b418f222c3ae41cb685a144796fea..34c7a12a38903842ff9def81e3d9d4dd7802f9dd 100644 --- a/AMDiS/src/ILUPreconditioner.cc +++ b/AMDiS/src/ILUPreconditioner.cc @@ -111,7 +111,7 @@ namespace AMDiS { // Must not be assigned directly, since x = b and y will take // the results of y. - ::std::vector<MatEntry> *m = &(*ilu)[i]; + std::vector<MatEntry> *m = &(*ilu)[i]; // y_i = b_i - \sum_{1}^{i-1} ( l_{i,k} * y_k ) for (int col = 0; col < static_cast<int>((*m).size()); col++) { @@ -135,7 +135,7 @@ namespace AMDiS { itx--; i--; - ::std::vector<MatEntry> *m = &(*ilu)[i]; + std::vector<MatEntry> *m = &(*ilu)[i]; // x_i = y_i - \sum_{i + 1}^(n} ( r_{i,k} * x_k ) // The sum is build backwards, since the directon of calculation does not @@ -182,7 +182,7 @@ namespace AMDiS { // ilu_[i] = (*matrix // } - ::std::vector< ::std::vector<MatEntry> > *ilu = &ilu_; + std::vector< std::vector<MatEntry> > *ilu = &ilu_; @@ -242,9 +242,9 @@ namespace AMDiS { { } - void ILUPreconditionerStd::precon(::std::vector<double> *x) + void ILUPreconditionerStd::precon(std::vector<double> *x) { - ::std::vector< ::std::vector<MatEntry> > *ilu = &ilu_; + std::vector< std::vector<MatEntry> > *ilu = &ilu_; // The solution of P * x = b must be calculated in the // following. Note that the vector b is stored in x to @@ -254,7 +254,7 @@ namespace AMDiS { // DOFVector<double>::Iterator itx(x, USED_DOFS); - ::std::vector<double>::iterator itx; + std::vector<double>::iterator itx; // Forward substitution: L * y = b // We use x to save the new results of y. Note that all diagonal @@ -266,7 +266,7 @@ namespace AMDiS { // Must not be assigned directly, since x = b and y will take // the results of y. - ::std::vector<MatEntry> *m = &(*ilu)[i]; + std::vector<MatEntry> *m = &(*ilu)[i]; // y_i = b_i - \sum_{1}^{i-1} ( l_{i,k} * y_k ) for (int col = 0; col < static_cast<int>((*m).size()); col++) { @@ -290,7 +290,7 @@ namespace AMDiS { itx--; i--; - ::std::vector<MatEntry> *m = &(*ilu)[i]; + std::vector<MatEntry> *m = &(*ilu)[i]; // x_i = y_i - \sum_{i + 1}^(n} ( r_{i,k} * x_k ) // The sum is build backwards, since the directon of calculation does not diff --git a/AMDiS/src/ILUPreconditioner.h b/AMDiS/src/ILUPreconditioner.h index 8eee1ee5e841a3698a97862ee11eb71fc34d93fa..104001aadad1f65ad3da8c62153b1f6a2ea657ab 100644 --- a/AMDiS/src/ILUPreconditioner.h +++ b/AMDiS/src/ILUPreconditioner.h @@ -110,7 +110,7 @@ namespace AMDiS { * Here we store the diagonal elements of ilu_ matrix. This * allows faster computations. */ - ::std::vector<double> diag_; + std::vector<double> diag_; }; @@ -160,20 +160,20 @@ namespace AMDiS { /** \brief * Realisation of Preconditioner::precon */ - void precon(::std::vector<double>* x); + void precon(std::vector<double>* x); private: /** \brief * This matrix stores the incomplete LU factorization * of the coefficient matrix. */ - ::std::vector< ::std::vector<MatEntry> > ilu_; + std::vector< std::vector<MatEntry> > ilu_; /** \brief * Here we store the diagonal elements of ilu_ matrix. This * allows faster computations. */ - ::std::vector<double> diag_; + std::vector<double> diag_; }; } diff --git a/AMDiS/src/ILUTPreconditioner.cc b/AMDiS/src/ILUTPreconditioner.cc index aa6fdb2d0a5b2734d58402caf3bd035e2fac2dc6..04f966b1f5f632d10f28f393a8fcf4d731ce1483 100644 --- a/AMDiS/src/ILUTPreconditioner.cc +++ b/AMDiS/src/ILUTPreconditioner.cc @@ -26,7 +26,7 @@ namespace AMDiS { for (int i = 0; i < matrixSize; i++) { // We do not make a real copy of the row, but instead w is a pointer to // the current row. - ::std::vector<MatEntry> *w = &(ilu_[i]); + std::vector<MatEntry> *w = &(ilu_[i]); // Calculate tau_i by calculating the 2-norm of the current row and @@ -137,7 +137,7 @@ namespace AMDiS { // them all the elements of the U-part. Because we are in the i-th row, elements // of L must have a column index smaller than i. // itMiddle is then an iterator to the first element of the U-part. - ::std::vector<MatEntry>::iterator itMiddle = + std::vector<MatEntry>::iterator itMiddle = partition((*w).begin() + 1, (*w).end(), MatEntryColLess(i)); // If there are elements in the L-part: diff --git a/AMDiS/src/ILUTPreconditioner.h b/AMDiS/src/ILUTPreconditioner.h index b313eaffb9a17e2325e553dd4b843ba15a27b2b7..329168242a6b1de53e4bc8a57ec516cdc599ad0f 100644 --- a/AMDiS/src/ILUTPreconditioner.h +++ b/AMDiS/src/ILUTPreconditioner.h @@ -74,7 +74,7 @@ namespace AMDiS { /** \brief * Constructor. */ - ILUTPreconditioner(::std::string name, int size = 1, int row = 0) + ILUTPreconditioner(std::string name, int size = 1, int row = 0) : PreconditionerScal(size, row), name_(name), tau_(0.0001), @@ -106,7 +106,7 @@ namespace AMDiS { void precon(DOFVector<double>* x); private: - ::std::string name_; + std::string name_; /** \brief * This matrix stores the incomplete LU factorization @@ -118,7 +118,7 @@ namespace AMDiS { * Here we store the diagonal elements of ilu_ matrix. This * allows faster computations. */ - ::std::vector<double> diag_; + std::vector<double> diag_; /** \brief * Stores the threshold factor for the preconditioning process. diff --git a/AMDiS/src/InterpolRestrictMatrix.cc b/AMDiS/src/InterpolRestrictMatrix.cc index 816453d67467365346e102bbf3315fe39fd914da..ce9247714d30440bf87d513d33ecc1c991b1d18e 100644 --- a/AMDiS/src/InterpolRestrictMatrix.cc +++ b/AMDiS/src/InterpolRestrictMatrix.cc @@ -64,22 +64,22 @@ namespace AMDiS { } // copy directCopyDOFs_ - ::std::vector<DegreeOfFreedom>::const_iterator copyIt; - ::std::vector<DegreeOfFreedom>::const_iterator copyBegin = + std::vector<DegreeOfFreedom>::const_iterator copyIt; + std::vector<DegreeOfFreedom>::const_iterator copyBegin = matrix.directCopyDOFs_.begin(); - ::std::vector<DegreeOfFreedom>::const_iterator copyEnd = + std::vector<DegreeOfFreedom>::const_iterator copyEnd = matrix.directCopyDOFs_.end(); for(copyIt = copyBegin; copyIt != copyEnd; ++copyIt) { directCopyDOFs_.push_back(*copyIt); } // fill matrices - ::std::map<int, ::std::map<int, double> >::const_iterator rowsIt; - ::std::map<int, ::std::map<int, double> >::const_iterator rowsBegin; - ::std::map<int, ::std::map<int, double> >::const_iterator rowsEnd; - ::std::map<int, double>::const_iterator colIt; - ::std::map<int, double>::const_iterator colBegin; - ::std::map<int, double>::const_iterator colEnd; + std::map<int, std::map<int, double> >::const_iterator rowsIt; + std::map<int, std::map<int, double> >::const_iterator rowsBegin; + std::map<int, std::map<int, double> >::const_iterator rowsEnd; + std::map<int, double>::const_iterator colIt; + std::map<int, double>::const_iterator colBegin; + std::map<int, double>::const_iterator colEnd; // unique row matrix rowsBegin = matrix.uniqueColMatrix_.begin(); @@ -169,15 +169,15 @@ namespace AMDiS { const BasisFunction *basFcts = feSpace->getBasisFcts(); DOFAdmin *admin = feSpace->getAdmin(); - ::std::map<int, ::std::map<int, double> >::iterator rowsIt; - ::std::map<int, ::std::map<int, double> >::iterator rowsBegin; - ::std::map<int, ::std::map<int, double> >::iterator rowsEnd; - ::std::map<int, double>::iterator colIt; - ::std::map<int, double>::iterator colBegin; - ::std::map<int, double>::iterator colEnd; - ::std::vector<DegreeOfFreedom>::iterator dofIt; - ::std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); - ::std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); + std::map<int, std::map<int, double> >::iterator rowsIt; + std::map<int, std::map<int, double> >::iterator rowsBegin; + std::map<int, std::map<int, double> >::iterator rowsEnd; + std::map<int, double>::iterator colIt; + std::map<int, double>::iterator colBegin; + std::map<int, double>::iterator colEnd; + std::vector<DegreeOfFreedom>::iterator dofIt; + std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); + std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); // traverse mesh TraverseStack stack; @@ -238,7 +238,7 @@ namespace AMDiS { } // treat unique cols - ::std::set<DegreeOfFreedom> elementColDOFs; + std::set<DegreeOfFreedom> elementColDOFs; rowsBegin = uniqueColMatrix_.begin(); rowsEnd = uniqueColMatrix_.end(); for(rowsIt = rowsBegin; rowsIt != rowsEnd; ++rowsIt) { @@ -257,9 +257,9 @@ namespace AMDiS { } } - ::std::set<DegreeOfFreedom>::iterator setIt; - ::std::set<DegreeOfFreedom>::iterator setBegin = elementColDOFs.begin(); - ::std::set<DegreeOfFreedom>::iterator setEnd = elementColDOFs.end(); + std::set<DegreeOfFreedom>::iterator setIt; + std::set<DegreeOfFreedom>::iterator setBegin = elementColDOFs.begin(); + std::set<DegreeOfFreedom>::iterator setEnd = elementColDOFs.end(); for(setIt = setBegin; setIt != setEnd; ++setIt) { visitedColDOFs[*setIt] = 1; } @@ -309,15 +309,15 @@ namespace AMDiS { const BasisFunction *basFcts = feSpace->getBasisFcts(); DOFAdmin *admin = feSpace->getAdmin(); - ::std::map<int, ::std::map<int, double> >::iterator rowsIt; - ::std::map<int, ::std::map<int, double> >::iterator rowsBegin; - ::std::map<int, ::std::map<int, double> >::iterator rowsEnd; - ::std::map<int, double>::iterator colIt; - ::std::map<int, double>::iterator colBegin; - ::std::map<int, double>::iterator colEnd; - ::std::vector<DegreeOfFreedom>::iterator dofIt; - ::std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); - ::std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); + std::map<int, std::map<int, double> >::iterator rowsIt; + std::map<int, std::map<int, double> >::iterator rowsBegin; + std::map<int, std::map<int, double> >::iterator rowsEnd; + std::map<int, double>::iterator colIt; + std::map<int, double>::iterator colBegin; + std::map<int, double>::iterator colEnd; + std::vector<DegreeOfFreedom>::iterator dofIt; + std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); + std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); ElementMatrix elementMatrix(numRows_, numCols_); @@ -388,7 +388,7 @@ namespace AMDiS { } // treat unique cols - ::std::set<DegreeOfFreedom> elementColDOFs; + std::set<DegreeOfFreedom> elementColDOFs; rowsBegin = uniqueColMatrix_.begin(); rowsEnd = uniqueColMatrix_.end(); for(rowsIt = rowsBegin; rowsIt != rowsEnd; ++rowsIt) { @@ -406,9 +406,9 @@ namespace AMDiS { } } - ::std::set<DegreeOfFreedom>::iterator setIt; - ::std::set<DegreeOfFreedom>::iterator setBegin = elementColDOFs.begin(); - ::std::set<DegreeOfFreedom>::iterator setEnd = elementColDOFs.end(); + std::set<DegreeOfFreedom>::iterator setIt; + std::set<DegreeOfFreedom>::iterator setBegin = elementColDOFs.begin(); + std::set<DegreeOfFreedom>::iterator setEnd = elementColDOFs.end(); for(setIt = setBegin; setIt != setEnd; ++setIt) { visitedColDOFs[*setIt] = 1; } @@ -454,15 +454,15 @@ namespace AMDiS { fillMemory(); } - ::std::map<int, ::std::map<int, double> >::iterator rowsIt; - ::std::map<int, ::std::map<int, double> >::iterator rowsBegin; - ::std::map<int, ::std::map<int, double> >::iterator rowsEnd; - ::std::map<int, double>::iterator colIt; - ::std::map<int, double>::iterator colBegin; - ::std::map<int, double>::iterator colEnd; - ::std::vector<DegreeOfFreedom>::iterator dofIt; - ::std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); - ::std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); + std::map<int, std::map<int, double> >::iterator rowsIt; + std::map<int, std::map<int, double> >::iterator rowsBegin; + std::map<int, std::map<int, double> >::iterator rowsEnd; + std::map<int, double>::iterator colIt; + std::map<int, double>::iterator colBegin; + std::map<int, double>::iterator colEnd; + std::vector<DegreeOfFreedom>::iterator dofIt; + std::vector<DegreeOfFreedom>::iterator dofBegin = directCopyDOFs_.begin(); + std::vector<DegreeOfFreedom>::iterator dofEnd = directCopyDOFs_.end(); // treat direct-copy dofs diff --git a/AMDiS/src/InterpolRestrictMatrix.h b/AMDiS/src/InterpolRestrictMatrix.h index e7f3f16e301cd3711ebfdaad345a74a2a5e57a07..00f9a857ddf385cd783fc06a33f4b8aa50e5c099 100644 --- a/AMDiS/src/InterpolRestrictMatrix.h +++ b/AMDiS/src/InterpolRestrictMatrix.h @@ -57,11 +57,11 @@ namespace AMDiS { int numRows_; int numCols_; - ::std::vector<DegreeOfFreedom> directCopyDOFs_; + std::vector<DegreeOfFreedom> directCopyDOFs_; - ::std::map<int, ::std::map<int, double> > uniqueRowMatrix_; - ::std::map<int, ::std::map<int, double> > uniqueColMatrix_; - ::std::map<int, ::std::map<int, double> > matrix_; + std::map<int, std::map<int, double> > uniqueRowMatrix_; + std::map<int, std::map<int, double> > uniqueColMatrix_; + std::map<int, std::map<int, double> > matrix_; DegreeOfFreedom *parentDOFs_; DegreeOfFreedom *child0DOFs_; diff --git a/AMDiS/src/JacobiSmoother.cc b/AMDiS/src/JacobiSmoother.cc index a8ccc5077b410cd07a26e73e5d3fd4f1cd4f0061..8a4e5a6480bdf7c1d143c76203a5ae2eed795345 100755 --- a/AMDiS/src/JacobiSmoother.cc +++ b/AMDiS/src/JacobiSmoother.cc @@ -9,12 +9,12 @@ namespace AMDiS { template<> void JacobiSmoother<DOFMatrix, SparseVector<double>, - ::std::set<DegreeOfFreedom> >:: + std::set<DegreeOfFreedom> >:: smooth(DOFMatrix *matrix, SparseVector<double> *solution, SparseVector<double> *rhs, int iterations, - const ::std::set<DegreeOfFreedom> &dofSet) + const std::set<DegreeOfFreedom> &dofSet) { int i, j, rowNumber, colNumber, numCols; @@ -22,17 +22,17 @@ namespace AMDiS { SparseVector<double> oldSolution("old solution", solution); - ::std::set<DegreeOfFreedom>::iterator dofIt, - dofEnd = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).end(); + std::set<DegreeOfFreedom>::iterator dofIt, + dofEnd = const_cast< std::set<DegreeOfFreedom>&>(dofSet).end(); for(i = 0; i < iterations; i++) { oldSolution.copy(*solution, dofSet); - for(dofIt = const_cast< ::std::set<DegreeOfFreedom>&>(dofSet).begin(); + for(dofIt = const_cast< std::set<DegreeOfFreedom>&>(dofSet).begin(); dofIt != dofEnd; ++dofIt) { rowNumber = *dofIt; - const ::std::vector<MatEntry>& row = matrix->getRow(rowNumber); + const std::vector<MatEntry>& row = matrix->getRow(rowNumber); numCols = static_cast<int>(row.size()); (*solution)[rowNumber] = (*rhs)[rowNumber]; @@ -57,12 +57,12 @@ namespace AMDiS { template<> void JacobiSmoother<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> >:: + Vector< std::set<DegreeOfFreedom>*> >:: smooth(Matrix<DOFMatrix*> *m, Vector<SparseVector<double>*> *s, Vector<SparseVector<double>*> *r, int iterations, - const Vector< ::std::set<DegreeOfFreedom>*> &dofSet) + const Vector< std::set<DegreeOfFreedom>*> &dofSet) { ERROR_EXIT("not yet (still gs)\n"); @@ -76,7 +76,7 @@ namespace AMDiS { DOFMatrix *matrix; SparseVector<double> *rhs; - ::std::set<DegreeOfFreedom>::iterator dofIt, dofEnd; + std::set<DegreeOfFreedom>::iterator dofIt, dofEnd; for(i = 0; i < iterations; i++) { for(j = 0; j < numComponents; j++) { @@ -93,7 +93,7 @@ namespace AMDiS { matrix = (*m)[j][k]; if(matrix) { - const ::std::vector<MatEntry>& row = matrix->getRow(rowNumber); + const std::vector<MatEntry>& row = matrix->getRow(rowNumber); numCols = static_cast<int>(row.size()); for(l = 0; l < numCols; l++) { diff --git a/AMDiS/src/JacobiSmoother.h b/AMDiS/src/JacobiSmoother.h index 08ac6b9f6e79c36b1439ee6accf957a6e4c574be..4c6c99de7689105d98855273ee681ca1b900c46b 100755 --- a/AMDiS/src/JacobiSmoother.h +++ b/AMDiS/src/JacobiSmoother.h @@ -44,7 +44,7 @@ namespace AMDiS { }; }; - JacobiSmoother(::std::string name) + JacobiSmoother(std::string name) : SmootherBase<MatrixType, VectorType, DOFSetType>(name), omega_(1.0) { diff --git a/AMDiS/src/Lagrange.cc b/AMDiS/src/Lagrange.cc index bea2474a917cbe2c0dcd3fc9b7c7417b2ab35dde..81fdbd010ad141955129d53f5debd3b6178110a3 100644 --- a/AMDiS/src/Lagrange.cc +++ b/AMDiS/src/Lagrange.cc @@ -16,17 +16,17 @@ namespace AMDiS { - ::std::vector<DimVec<double>* > Lagrange::baryDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + std::vector<DimVec<double>* > Lagrange::baryDimDegree[MAX_DIM+1][MAX_DEGREE+1]; DimVec<int>* Lagrange::ndofDimDegree[MAX_DIM+1][MAX_DEGREE+1]; int Lagrange::nBasFctsDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - ::std::vector<BasFctType*> Lagrange::phiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - ::std::vector<GrdBasFctType*> Lagrange::grdPhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - ::std::vector<D2BasFctType*> Lagrange::D2PhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - ::std::list<Lagrange*> Lagrange::allBasFcts; + std::vector<BasFctType*> Lagrange::phiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + std::vector<GrdBasFctType*> Lagrange::grdPhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + std::vector<D2BasFctType*> Lagrange::D2PhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + std::list<Lagrange*> Lagrange::allBasFcts; Lagrange::Lagrange(int dim, int degree) - : BasisFunction(::std::string("Lagrange"), dim, degree) + : BasisFunction(std::string("Lagrange"), dim, degree) { // set name char dummy[3]; @@ -53,7 +53,7 @@ namespace AMDiS { Lagrange* Lagrange::getLagrange(int dim, int degree) { - ::std::list<Lagrange*>::iterator it; + std::list<Lagrange*>::iterator it; for(it = allBasFcts.begin(); it != allBasFcts.end(); it++) { if(((*it)->dim == dim) && ((*it)->degree == degree)) { diff --git a/AMDiS/src/Lagrange.h b/AMDiS/src/Lagrange.h index cb5e381cf9877ef306776236db90d9b0a8caa28f..5b6061e7addf2f2fb2cf28b29df42d98c0ec8535 100644 --- a/AMDiS/src/Lagrange.h +++ b/AMDiS/src/Lagrange.h @@ -218,24 +218,24 @@ namespace AMDiS { /** \brief * barycentric coordinates of the locations of all basis functions */ - ::std::vector<DimVec<double>* > *bary; + std::vector<DimVec<double>* > *bary; /** \name static dim-degree-arrays * \{ */ - static ::std::vector<DimVec<double>* > baryDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + static std::vector<DimVec<double>* > baryDimDegree[MAX_DIM+1][MAX_DEGREE+1]; static DimVec<int>* ndofDimDegree[MAX_DIM+1][MAX_DEGREE+1]; static int nBasFctsDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - static ::std::vector<BasFctType*> phiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - static ::std::vector<GrdBasFctType*> grdPhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; - static ::std::vector<D2BasFctType*> D2PhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + static std::vector<BasFctType*> phiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + static std::vector<GrdBasFctType*> grdPhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; + static std::vector<D2BasFctType*> D2PhiDimDegree[MAX_DIM+1][MAX_DEGREE+1]; /** \} */ /** \brief * List of all used BasisFunctions in the whole program. Avoids duplicate * instantiation of identical BasisFunctions. */ - static ::std::list<Lagrange*> allBasFcts; + static std::list<Lagrange*> allBasFcts; protected: diff --git a/AMDiS/src/LeafData.cc b/AMDiS/src/LeafData.cc index 1d4b868157de7fde9ae47706117ec31ecf417ed3..b3fc1041f73dd5312d8c57641c7a064c2d6f06a1 100644 --- a/AMDiS/src/LeafData.cc +++ b/AMDiS/src/LeafData.cc @@ -125,7 +125,7 @@ namespace AMDiS { LeafDataPeriodic *ld[2] = {NULL, NULL}; - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; + std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; for(it = periodicInfoList.begin(); it != periodicInfoList.end(); diff --git a/AMDiS/src/LeafData.h b/AMDiS/src/LeafData.h index 8178c4b3c4715699c5113a1fc25aa2d5a8b17a0e..14e8f278f38e4695f5375c7ebd47bdacbb4eba29 100644 --- a/AMDiS/src/LeafData.h +++ b/AMDiS/src/LeafData.h @@ -113,17 +113,17 @@ namespace AMDiS { /** \brief * Returns the name of element data type. */ - inline ::std::string getTypeName() const { return "LeafDataEstimatable"; }; + inline std::string getTypeName() const { return "LeafDataEstimatable"; }; inline const int getTypeID() const { return ESTIMATABLE; }; - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); out.write(reinterpret_cast<const char*>(&errorEstimate), sizeof(double)); }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); in.read(reinterpret_cast<char*>(&errorEstimate), sizeof(double)); @@ -209,19 +209,19 @@ namespace AMDiS { return newObj; }; - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); unsigned int size = errorEstimate.size(); out.write(reinterpret_cast<const char*>(&size), sizeof(unsigned int)); - ::std::map<int, double>::iterator it; + std::map<int, double>::iterator it; for(it = errorEstimate.begin(); it != errorEstimate.end(); ++it) { out.write(reinterpret_cast<const char*>(&(it->first)), sizeof(int)); out.write(reinterpret_cast<const char*>(&(it->second)), sizeof(double)); } }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); unsigned int i, size; @@ -235,7 +235,7 @@ namespace AMDiS { } }; - ::std::string getTypeName() const + std::string getTypeName() const { return "LeafDataEstimatableVec"; }; @@ -243,7 +243,7 @@ namespace AMDiS { inline const int getTypeID() const { return ESTIMATABLE; }; private: - ::std::map<int, double> errorEstimate; + std::map<int, double> errorEstimate; }; class LeafDataCoarsenableInterface @@ -335,19 +335,19 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); out.write(reinterpret_cast<const char*>(&coarseningError), sizeof(double)); }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); in.read(reinterpret_cast<char*>(&coarseningError), sizeof(double)); }; - ::std::string getTypeName() const + std::string getTypeName() const { return "LeafDataCoarsenable"; }; @@ -436,19 +436,19 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); unsigned int size = coarseningError.size(); out.write(reinterpret_cast<const char*>(&size), sizeof(unsigned int)); - ::std::map<int, double>::iterator it; + std::map<int, double>::iterator it; for(it = coarseningError.begin(); it != coarseningError.end(); ++it) { out.write(reinterpret_cast<const char*>(&(it->first)), sizeof(int)); out.write(reinterpret_cast<const char*>(&(it->second)), sizeof(double)); } }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); unsigned int i, size; @@ -462,7 +462,7 @@ namespace AMDiS { } }; - ::std::string getTypeName() const + std::string getTypeName() const { return "LeafDataCoarsenableVec"; }; @@ -470,7 +470,7 @@ namespace AMDiS { inline const int getTypeID() const { return COARSENABLE; }; private: - ::std::map<int, double> coarseningError; /**< \brief coarsening error */ + std::map<int, double> coarseningError; /**< \brief coarsening error */ }; @@ -513,7 +513,7 @@ namespace AMDiS { PeriodicInfo(const PeriodicInfo &rhs); - void serialize(::std::ostream &out) { + void serialize(std::ostream &out) { out.write(reinterpret_cast<const char*>(&periodicMode), sizeof(int)); out.write(reinterpret_cast<const char*>(&type), sizeof(BoundaryType)); out.write(reinterpret_cast<const char*>(&elementSide), sizeof(int)); @@ -530,7 +530,7 @@ namespace AMDiS { } }; - void deserialize(::std::istream &in) + void deserialize(std::istream &in) { in.read(reinterpret_cast<char*>(&periodicMode), sizeof(int)); in.read(reinterpret_cast<char*>(&type), sizeof(BoundaryType)); @@ -587,38 +587,38 @@ namespace AMDiS { periodicInfoList.push_back(periodicInfo); }; - inline ::std::list<PeriodicInfo>& getInfoList() { + inline std::list<PeriodicInfo>& getInfoList() { return periodicInfoList; }; // ===== Serializable implementation ===== - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); //out.write(reinterpret_cast<const char*>(&newDOF), sizeof(DegreeOfFreedom)); unsigned int size = periodicInfoList.size(); out.write(reinterpret_cast<const char*>(&size), sizeof(unsigned int)); - ::std::list<PeriodicInfo>::iterator it; + std::list<PeriodicInfo>::iterator it; for(it = periodicInfoList.begin(); it != periodicInfoList.end(); ++it) { it->serialize(out); } }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); //in.read(reinterpret_cast<char*>(&newDOF), sizeof(DegreeOfFreedom)); unsigned int size; in.read(reinterpret_cast<char*>(&size), sizeof(unsigned int)); periodicInfoList.resize(size); - ::std::list<PeriodicInfo>::iterator it; + std::list<PeriodicInfo>::iterator it; for(it = periodicInfoList.begin(); it != periodicInfoList.end(); ++it) { it->deserialize(in); } }; - ::std::string getTypeName() const + std::string getTypeName() const { return "LeafDataPeriodic"; }; @@ -634,7 +634,7 @@ namespace AMDiS { private: //DegreeOfFreedom newDOF; - ::std::list<PeriodicInfo> periodicInfoList; + std::list<PeriodicInfo> periodicInfoList; friend class LeafDataPeriodicRefinable; friend class LeafDataPeriodicCoarsenable; diff --git a/AMDiS/src/Line.h b/AMDiS/src/Line.h index dbec689f1c8f922f6a2c336649b744d912be336d..7f68b6e5e1e2b6eb6a49fc13617dc50ff16a6070 100644 --- a/AMDiS/src/Line.h +++ b/AMDiS/src/Line.h @@ -156,7 +156,7 @@ public: // ===== Serializable implementation ===== - ::std::string getTypeName() const { return "Line"; }; + std::string getTypeName() const { return "Line"; }; protected: /** \brief diff --git a/AMDiS/src/MacroElement.cc b/AMDiS/src/MacroElement.cc index a8b32193bdd863a6b456fba605bf5fecaa3d48da..b3dd85cfbdb532dd16be40e86399d9a8012e5373 100644 --- a/AMDiS/src/MacroElement.cc +++ b/AMDiS/src/MacroElement.cc @@ -30,7 +30,7 @@ namespace AMDiS { DELETE element; }; - void MacroElement::serialize(::std::ostream &out) + void MacroElement::serialize(std::ostream &out) { // write element-tree out << element->getTypeName() << "\n"; diff --git a/AMDiS/src/MacroElement.h b/AMDiS/src/MacroElement.h index 03691f5f8691319acc1f04fb71c098b34742286d..90555e4991fd63e3d13866700fa741ba071c563f 100644 --- a/AMDiS/src/MacroElement.h +++ b/AMDiS/src/MacroElement.h @@ -205,11 +205,11 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out); + void serialize(std::ostream &out); - void deserialize(::std::istream &in); + void deserialize(std::istream &in); - inline void writeNeighboursTo(::std::vector<int> *indices) { + inline void writeNeighboursTo(std::vector<int> *indices) { deserializedNeighbourIndices_ = indices; }; @@ -257,7 +257,7 @@ namespace AMDiS { /** \brief * */ - ::std::vector<int> *deserializedNeighbourIndices_; + std::vector<int> *deserializedNeighbourIndices_; // friend classes friend class MacroInfo; diff --git a/AMDiS/src/MacroReader.cc b/AMDiS/src/MacroReader.cc index 1ae037d23f572f03be4a844cda92b56c39e82fb6..230c947f5188c11dfed0a3b01a1ffb2a423014a2 100644 --- a/AMDiS/src/MacroReader.cc +++ b/AMDiS/src/MacroReader.cc @@ -33,7 +33,7 @@ namespace AMDiS { MacroInfo *macroInfo = NEW MacroInfo(); macroInfo->readAMDiSMacro(filename, mesh); - ::std::deque<MacroElement*>::iterator mel = macroInfo->mel.begin(); + std::deque<MacroElement*>::iterator mel = macroInfo->mel.begin(); int **melVertex = macroInfo->mel_vertex; WorldVector<double> *coords = macroInfo->coords; DegreeOfFreedom **dof = macroInfo->dof; @@ -62,8 +62,8 @@ namespace AMDiS { PeriodicMap periodicMap; for (int i = 0; i < n; i++) { - ::std::map<int, int> vertexMapEl1; - ::std::map<int, int> vertexMapEl2; + std::map<int, int> vertexMapEl1; + std::map<int, int> vertexMapEl2; result = fscanf(file, "%d", &mode); TEST_EXIT(result == 1)("mode?\n"); @@ -181,8 +181,8 @@ namespace AMDiS { mesh->freeDOF(dof[i], VERTEX); dof[i] = dof[periodicMap.getEntry(i)]; - ::std::map<BoundaryType, VertexVector*>::iterator assoc; - ::std::map<BoundaryType, VertexVector*>::iterator assocEnd = + std::map<BoundaryType, VertexVector*>::iterator assoc; + std::map<BoundaryType, VertexVector*>::iterator assocEnd = mesh->periodicAssociations.end(); for (assoc = mesh->periodicAssociations.begin(); @@ -199,8 +199,8 @@ namespace AMDiS { } } - ::std::map<BoundaryType, VertexVector*>::iterator assoc; - ::std::map<BoundaryType, VertexVector*>::iterator assocEnd = + std::map<BoundaryType, VertexVector*>::iterator assoc; + std::map<BoundaryType, VertexVector*>::iterator assocEnd = mesh->periodicAssociations.end(); for (assoc = mesh->periodicAssociations.begin(); assoc != assocEnd; @@ -315,8 +315,8 @@ namespace AMDiS { for (int i = 0; i < mesh->getNumberOfVertices(); i++) { for (int j = 0; j < Global::getGeo(WORLD); j++) { - x_min[j] = ::std::min(x_min[j], coords[i][j]); - x_max[j] = ::std::max(x_max[j], coords[i][j]); + x_min[j] = std::min(x_min[j], coords[i][j]); + x_max[j] = std::max(x_max[j], coords[i][j]); } } @@ -835,7 +835,7 @@ namespace AMDiS { { int i,j,k, nv = mesh->getNumberOfVertices(); - ::std::deque<MacroElement*>::iterator melIt; + std::deque<MacroElement*>::iterator melIt; BoundaryType *bound = GET_MEMORY(BoundaryType, nv); @@ -1009,7 +1009,7 @@ namespace AMDiS { int lnode = mesh->getNode(EDGE); int k, lne = mesh->getNumberOfLeaves(); int max_n_neigh = 0, n_neigh, ov; - ::std::deque<MacroElement*>::iterator mel; + std::deque<MacroElement*>::iterator mel; const MacroElement* neigh; DegreeOfFreedom *dof; @@ -1028,10 +1028,10 @@ namespace AMDiS { DimVec<bool> periodic(dim, DEFAULT_VALUE, false); if (ed) { - ::std::list<LeafDataPeriodic::PeriodicInfo> &periodicInfos = + std::list<LeafDataPeriodic::PeriodicInfo> &periodicInfos = dynamic_cast<LeafDataPeriodic*>(ed)->getInfoList(); - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = periodicInfos.end(); + std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; + std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = periodicInfos.end(); for (it = periodicInfos.begin(); it != end; ++it) { if (it->type != 0) { periodic[it->elementSide] = true; @@ -1074,10 +1074,10 @@ namespace AMDiS { DimVec<bool> periodic(dim, DEFAULT_VALUE, false); if(ed) { - ::std::list<LeafDataPeriodic::PeriodicInfo> &periodicInfos = + std::list<LeafDataPeriodic::PeriodicInfo> &periodicInfos = dynamic_cast<LeafDataPeriodic*>(ed)->getInfoList(); - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = periodicInfos.end(); + std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; + std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = periodicInfos.end(); for(it = periodicInfos.begin(); it != end; ++it) { if(it->type != 0) { periodic[it->elementSide] = true; @@ -1156,7 +1156,7 @@ namespace AMDiS { } if (3 == dim) { - mesh->setMaxEdgeNeigh(::std::max(8, 2*max_n_neigh)); + mesh->setMaxEdgeNeigh(std::max(8, 2*max_n_neigh)); } else { mesh->setMaxEdgeNeigh(dim-1); } @@ -1204,9 +1204,9 @@ namespace AMDiS { int *test; int *zykl; - ::std::deque<MacroElement*>::const_iterator macro,mac; + std::deque<MacroElement*>::const_iterator macro,mac; int flg; - ::std::deque<MacroElement*>::const_iterator macrolfd; + std::deque<MacroElement*>::const_iterator macrolfd; int zykstart; int dim = mesh->getDim(); @@ -1557,7 +1557,7 @@ namespace AMDiS { void MacroReader::fillMelNeigh(MacroElement *mel, - ::std::deque<MacroElement*>& macro_elements, + std::deque<MacroElement*>& macro_elements, FixVec<int,NEIGH> ind) { int dim = mel->element->getMesh()->getDim(); @@ -1838,7 +1838,7 @@ namespace AMDiS { if (l[i] < kz) kz=l[i]; } - eps=::std::min(0.000001,kz/10000); + eps=std::min(0.000001,kz/10000); k=0; for (i=0; i < vertices; i++) { diff --git a/AMDiS/src/MacroReader.h b/AMDiS/src/MacroReader.h index a0a853cb79355fe8aa99e80a3912cc95a5d496c7..f52ea898ab77961ff64406ea4408e3db88f8893f 100644 --- a/AMDiS/src/MacroReader.h +++ b/AMDiS/src/MacroReader.h @@ -75,7 +75,7 @@ namespace AMDiS { FixVec<BoundaryType ,NEIGH>); static void fillMelNeigh(MacroElement *mel, - ::std::deque<MacroElement*>& macro_elements, + std::deque<MacroElement*>& macro_elements, FixVec<int,NEIGH> ind); static void umbVkantMacro(Mesh *mesh, @@ -123,7 +123,7 @@ namespace AMDiS { /** \brief * list of macro elements */ - ::std::deque<MacroElement*> mel; + std::deque<MacroElement*> mel; /** \brief * vector of all vertex dofs diff --git a/AMDiS/src/MacroWriter.cc b/AMDiS/src/MacroWriter.cc index 6dcdad116d96be049381ccaabcc828da1c72a8be..65bd72833889fbcfec50de3f2a4e4003647da637 100644 --- a/AMDiS/src/MacroWriter.cc +++ b/AMDiS/src/MacroWriter.cc @@ -15,8 +15,8 @@ namespace AMDiS { - DOFVector< ::std::list<VertexInfo> >* MacroWriter::vertexInfos = NULL; - ::std::list<ElementInfo> MacroWriter::elements; + DOFVector< std::list<VertexInfo> >* MacroWriter::vertexInfos = NULL; + std::list<ElementInfo> MacroWriter::elements; Mesh *MacroWriter::mesh = NULL; FILE *MacroWriter::macroFile = NULL; @@ -27,9 +27,9 @@ namespace AMDiS { int MacroWriter::nc = 0; int MacroWriter::dim = 0; - ::std::map<int, int> MacroWriter::outputIndices; + std::map<int, int> MacroWriter::outputIndices; - ::std::vector<DimVec<bool> > MacroWriter::periodicConnections; + std::vector<DimVec<bool> > MacroWriter::periodicConnections; bool (*MacroWriter::writeElement)(ElInfo*) = NULL; @@ -46,9 +46,9 @@ namespace AMDiS { writeElement = writeElem; - ::std::ofstream file; - ::std::list<ElementInfo> *elements = dc->getElementInfos(); - DOFVector< ::std::list<VertexInfo> > *vertexInfos = dc->getVertexInfos(); + std::ofstream file; + std::list<ElementInfo> *elements = dc->getElementInfos(); + DOFVector< std::list<VertexInfo> > *vertexInfos = dc->getVertexInfos(); int dow = Global::getGeo(WORLD); int dim = dc->getMesh()->getDim(); @@ -59,72 +59,72 @@ namespace AMDiS { file.open(name); // === print file header === - file << "mesh name: " << dc->getMesh()->getName() << ::std::endl << ::std::endl; - file << "time: " << ::std::scientific << time << ::std::endl << ::std::endl; + file << "mesh name: " << dc->getMesh()->getName() << std::endl << std::endl; + file << "time: " << std::scientific << time << std::endl << std::endl; - file << "DIM: " << dim << ::std::endl; - file << "DIM_OF_WORLD: " << dow << ::std::endl << ::std::endl; + file << "DIM: " << dim << std::endl; + file << "DIM_OF_WORLD: " << dow << std::endl << std::endl; - file << "number of vertices: " << nv << ::std::endl; - file << "number of elements: " << ne << ::std::endl << ::std::endl; + file << "number of vertices: " << nv << std::endl; + file << "number of elements: " << ne << std::endl << std::endl; // === print vertex coords and remember global output indices === - file << "vertex coordinates:" << ::std::endl; + file << "vertex coordinates:" << std::endl; - DOFVector< ::std::list<VertexInfo> >::Iterator it(vertexInfos, USED_DOFS); + DOFVector< std::list<VertexInfo> >::Iterator it(vertexInfos, USED_DOFS); int i, counter = 0; // for all DOFs for(it.reset(); !it.end(); ++it) { // for all vertex infos of this DOF - ::std::list<VertexInfo>::iterator it2; + std::list<VertexInfo>::iterator it2; for(it2 = it->begin(); it2 != it->end(); ++it2) { it2->outputIndex = counter++; for(i = 0; i < dow; i++) { - file << ::std::scientific << it2->coords[i] << " "; + file << std::scientific << it2->coords[i] << " "; } - file << ::std::endl; + file << std::endl; } } // === print element vertices === - file << ::std::endl << "element vertices:" << ::std::endl; + file << std::endl << "element vertices:" << std::endl; // iterate the element list - ::std::list<ElementInfo>::iterator elementIt; + std::list<ElementInfo>::iterator elementIt; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { // for all vertices for(i = 0; i < vertices; i++) { file << elementIt->vertexInfo[i]->outputIndex << " "; } - file << ::std::endl; + file << std::endl; } // === print boundaries === - file << ::std::endl << "element boundaries:" << ::std::endl; + file << std::endl << "element boundaries:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { // for all vertices for(i = 0; i < vertices; i++) { file << elementIt->boundary[i] << " "; } - file << ::std::endl; + file << std::endl; } // === print neighbours === - file << ::std::endl << "element neighbours:" << ::std::endl; + file << std::endl << "element neighbours:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { // for all vertices for(i = 0; i < vertices; i++) { file << elementIt->neighbour[i] << " "; } - file << ::std::endl; + file << std::endl; } // === print boundary projections === - file << ::std::endl << "projections:" << ::std::endl; + file << std::endl << "projections:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { // for all vertices @@ -134,29 +134,29 @@ namespace AMDiS { else file << "0 "; } - file << ::std::endl; + file << std::endl; } // === print element regions === - file << ::std::endl << "element region:" << ::std::endl; + file << std::endl << "element region:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { - file << elementIt->elementRegion << ::std::endl; + file << elementIt->elementRegion << std::endl; } // === print surface regions === - file << ::std::endl << "surface region:" << ::std::endl; + file << std::endl << "surface region:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { for(i = 0; i < vertices; i++) { file << elementIt->surfaceRegions[i] << " "; } - file << ::std::endl; + file << std::endl; } // === print element types if necessary === if (dim == 3) { - file << ::std::endl << "element type:" << ::std::endl; + file << std::endl << "element type:" << std::endl; for(elementIt = elements->begin(); elementIt != elements->end(); ++elementIt) { file << (int)(elementIt->type) << " "; @@ -170,26 +170,26 @@ namespace AMDiS { void MacroWriter::writePeriodicFile(DataCollector *dc, - const ::std::string filename) + const std::string filename) { FUNCNAME("MacroWriter::writePeriodicFile2"); TEST_EXIT(dc)("no data collector\n"); - ::std::ofstream file; + std::ofstream file; file.open(filename.c_str()); - file << "associations: " << dc->getNumberConnections() << ::std::endl; - file << ::std::endl << "mode bc el1 - local vertices <-> el2 - local vertices" << ::std::endl; + file << "associations: " << dc->getNumberConnections() << std::endl; + file << std::endl << "mode bc el1 - local vertices <-> el2 - local vertices" << std::endl; - ::std::list<PeriodicInfo>::iterator periodicIt; + std::list<PeriodicInfo>::iterator periodicIt; // Iterate on all periodic connections for(periodicIt = dc->getPeriodicInfos()->begin(); periodicIt != dc->getPeriodicInfos()->end(); ++periodicIt) { - ::std::map<int, int>::iterator mapIt; + std::map<int, int>::iterator mapIt; // Write mode and type of periodic connection file << periodicIt->mode << " " << periodicIt->type << " "; @@ -214,7 +214,7 @@ namespace AMDiS { file << mapIt->second << " "; } - file << ::std::endl; + file << std::endl; } diff --git a/AMDiS/src/MacroWriter.h b/AMDiS/src/MacroWriter.h index 7684733378ecb33cdb3df25a8c3b438a72143b89..154486cc84215649c5f9e0ef2439cd875bf4e5a7 100644 --- a/AMDiS/src/MacroWriter.h +++ b/AMDiS/src/MacroWriter.h @@ -59,12 +59,12 @@ namespace AMDiS { /** \brief * Stores a list of vertex infos for each dof. */ - static DOFVector< ::std::list<VertexInfo> > *vertexInfos; + static DOFVector< std::list<VertexInfo> > *vertexInfos; /** \brief * List that stores an ElementInfo for each element. */ - static ::std::list<ElementInfo> elements; + static std::list<ElementInfo> elements; public: MEMORY_MANAGED(MacroWriter); @@ -83,7 +83,7 @@ namespace AMDiS { * Init \ref periodicFile for the next macro to be written. */ static void writePeriodicFile(DataCollector *dc, - const ::std::string filename); + const std::string filename); protected: @@ -130,13 +130,13 @@ namespace AMDiS { /** \brief * Maps internal element indices to global output indices. */ - static ::std::map<int, int> outputIndices; + static std::map<int, int> outputIndices; /** \brief * periodicConnections[i][j] stores whether the connection at side j of * the element with output index i has already been written. */ - static ::std::vector<DimVec<bool> > periodicConnections; + static std::vector<DimVec<bool> > periodicConnections; /** \brief * diff --git a/AMDiS/src/MatVecMultiplier.cc b/AMDiS/src/MatVecMultiplier.cc index fdb4b31b75deda777455cde7b6fe45266f155aba..d670b60b63349c94553d87736896cb750316acdf 100644 --- a/AMDiS/src/MatVecMultiplier.cc +++ b/AMDiS/src/MatVecMultiplier.cc @@ -38,10 +38,10 @@ namespace AMDiS { template<> void - StandardMatVec< ::std::vector< ::std::vector<MatEntry> >, - ::std::vector<double> >::matVec(MatrixTranspose transpose, - const ::std::vector<double> &x, - ::std::vector<double> &result, + StandardMatVec< std::vector< std::vector<MatEntry> >, + std::vector<double> >::matVec(MatrixTranspose transpose, + const std::vector<double> &x, + std::vector<double> &result, bool add) { FUNCNAME("StandardMatVec::matVec()"); diff --git a/AMDiS/src/MemoryManager.cc b/AMDiS/src/MemoryManager.cc index b39c71bbc65f2dd0ba3a0386d1accf61972dcba9..9fca0a6fb7e1da76530a396c94f0e8d3c3ad59c5 100644 --- a/AMDiS/src/MemoryManager.cc +++ b/AMDiS/src/MemoryManager.cc @@ -4,19 +4,19 @@ namespace AMDiS { unsigned long MemoryManagerBase::byteCount = 0; unsigned long MemoryManagerBase::idCounter = 0; - ::std::vector<MemoryManagerBase*> MemoryManagerBase::memoryManagers; - ::std::vector<MemoryMonitor*> MemoryManagerBase::memoryMonitors; + std::vector<MemoryManagerBase*> MemoryManagerBase::memoryManagers; + std::vector<MemoryMonitor*> MemoryManagerBase::memoryMonitors; void MemoryManagerBase::addMemoryMonitor(MemoryMonitor* monitor) { memoryMonitors.push_back(monitor); - ::std::vector<MemoryManagerBase*>::iterator it; + std::vector<MemoryManagerBase*>::iterator it; for(it = memoryManagers.begin(); it != memoryManagers.end(); it++) { monitor->addInstanceCounter((*it)->newInstanceCounter()); } } void MemoryManagerBase::removeMemoryMonitor(MemoryMonitor* monitor) { - ::std::vector<MemoryMonitor*>::iterator it; + std::vector<MemoryMonitor*>::iterator it; it = find(memoryMonitors.begin(), memoryMonitors.end(), monitor); if(it != memoryMonitors.end()) { memoryMonitors.erase(it); diff --git a/AMDiS/src/MemoryManager.h b/AMDiS/src/MemoryManager.h index dab4a588dbb1559957c5621b61825627cba917d7..8c69fc7c46ebc7b6d05f4bfc97a1e11b9fbddeef 100644 --- a/AMDiS/src/MemoryManager.h +++ b/AMDiS/src/MemoryManager.h @@ -83,7 +83,7 @@ namespace AMDiS { const char* sg="\n"; sort(memoryManagers.begin(), memoryManagers.end(), orderInstanceCount()); - ::std::vector<MemoryManagerBase*>::iterator it; + std::vector<MemoryManagerBase*>::iterator it; MSG("================================================================\n"); MSG("memory statistics:\n"); MSG("==================\n"); @@ -105,7 +105,7 @@ namespace AMDiS { * the managed data type. Can be accessed via the singleton pointer of * MemoryManager<T>. */ - virtual ::std::string getName() = 0; + virtual std::string getName() = 0; /** \brief * Returns the number of currently allocated instances (\ref instanceCount). @@ -143,7 +143,7 @@ namespace AMDiS { * of currently allocated instances. */ class orderInstanceCount - : public ::std::binary_function<MemoryManagerBase*,MemoryManagerBase*, bool> + : public std::binary_function<MemoryManagerBase*,MemoryManagerBase*, bool> { public: bool operator()(MemoryManagerBase *a, MemoryManagerBase *b) { @@ -180,12 +180,12 @@ namespace AMDiS { * Vector of all MemoryManagers. Every concrete MemoryManager must add * a pointer to itself to this vector when constructed. */ - static ::std::vector<MemoryManagerBase*> memoryManagers; + static std::vector<MemoryManagerBase*> memoryManagers; /** \brief * List of all registered MemoryMonitors */ - static ::std::vector<MemoryMonitor*> memoryMonitors; + static std::vector<MemoryMonitor*> memoryMonitors; /** \brief * Used to create unique IDs for every concrete MemoryManager @@ -294,7 +294,7 @@ namespace AMDiS { /** \brief * Returns name of T by demangle the mangled typeid of T. */ - inline ::std::string getName() { + inline std::string getName() { #if 0 char result[100]; // demangle(typeid(T).name(), result); @@ -302,7 +302,7 @@ namespace AMDiS { size_t length; abi::__cxa_demangle(typeid(T).name(), result, &length, &status); TEST_EXIT_DBG(status == 0)("demangling failed\n"); - return ::std::string(result); + return std::string(result); #endif return typeid(T).name(); }; @@ -387,7 +387,7 @@ namespace AMDiS { /** \brief * To be overloaded by a concrete InstanceCounter */ - virtual ::std::string getTypeName() = 0; + virtual std::string getTypeName() = 0; /** \brief * Destructor @@ -439,7 +439,7 @@ namespace AMDiS { /** \brief * Returns the name of T. Calls MemoryManager<T>::getName() */ - ::std::string getTypeName() { + std::string getTypeName() { return MemoryManager<T>::getSingleton()->getName(); }; @@ -493,14 +493,14 @@ namespace AMDiS { */ void printStatistics() { FUNCNAME("MemoryMonitor::printStatistics()"); - ::std::ostream *oldOut; + std::ostream *oldOut; static bool fileOpen = false; if(filename && !fileOpen) { oldOut = Msg::getOutStream(); - Msg::open_file(filename, ::std::ios::out); + Msg::open_file(filename, std::ios::out); fileOpen = true; } - ::std::vector<InstanceCounterBase*>::iterator it; + std::vector<InstanceCounterBase*>::iterator it; sort(instanceCounters.begin(), instanceCounters.end(), orderInstanceCount()); @@ -534,7 +534,7 @@ namespace AMDiS { * of currently allocated instances. */ class orderInstanceCount - : public ::std::binary_function<InstanceCounterBase*,InstanceCounterBase*, bool> + : public std::binary_function<InstanceCounterBase*,InstanceCounterBase*, bool> { public: bool operator()(InstanceCounterBase *a, InstanceCounterBase *b) { @@ -546,7 +546,7 @@ namespace AMDiS { /** \brief * Name of the monitor */ - ::std::string name; + std::string name; /** \brief * Filename @@ -556,7 +556,7 @@ namespace AMDiS { /** \brief * List with InstanceCounters for every data type */ - ::std::vector<InstanceCounterBase*> instanceCounters; + std::vector<InstanceCounterBase*> instanceCounters; friend class MemoryManagerBase; }; @@ -571,7 +571,7 @@ namespace AMDiS { singleton->typeId = idCounter++; singleton->instanceCount = 0; memoryManagers.push_back(singleton); - ::std::vector<MemoryMonitor*>::iterator it; + std::vector<MemoryMonitor*>::iterator it; for(it = memoryMonitors.begin(); it != memoryMonitors.end(); it++) { (*it)->addInstanceCounter(new InstanceCounter<T>); } diff --git a/AMDiS/src/MemoryPool.cc b/AMDiS/src/MemoryPool.cc index 0e394aabeea971ca03bed9ac7658d185071b02f5..a05b2f7726d638944d2506eb399a16ef84d537ee 100644 --- a/AMDiS/src/MemoryPool.cc +++ b/AMDiS/src/MemoryPool.cc @@ -2,7 +2,7 @@ namespace AMDiS { - ::std::vector<MemoryPool*> MemoryPool::containerArray; + std::vector<MemoryPool*> MemoryPool::containerArray; unsigned int MemoryPool::increment = 8*1024-12; void MemoryPool::grow() diff --git a/AMDiS/src/MemoryPool.h b/AMDiS/src/MemoryPool.h index dea94a7500712c4d8bced6ed67035fe8d3ccda21..6313b00b51e3676cfd984d7c06f1af3c5190edf9 100644 --- a/AMDiS/src/MemoryPool.h +++ b/AMDiS/src/MemoryPool.h @@ -224,7 +224,7 @@ namespace AMDiS { /** \brief * Vector of pointers to the MemoryPool for the different element sizes. */ - static ::std::vector<MemoryPool*> containerArray; + static std::vector<MemoryPool*> containerArray; /** \brief * = max(\ref increment / \ref elementSize, 1) diff --git a/AMDiS/src/Mesh.h b/AMDiS/src/Mesh.h index 87bd74a0c967dd9df2bf32eba89a85c659791f27..962ef0c34f9b3c7b0f441f2e126d442dd6e796d4 100644 --- a/AMDiS/src/Mesh.h +++ b/AMDiS/src/Mesh.h @@ -89,7 +89,7 @@ namespace AMDiS { /** \brief * Creates a mesh with the given name of dimension dim */ - Mesh(const ::std::string& name, int dim); + Mesh(const std::string& name, int dim); /** \brief * Destructor @@ -138,7 +138,7 @@ namespace AMDiS { /** \brief * Returns \ref name of the mesh */ - inline const ::std::string& getName() const { + inline const std::string& getName() const { return name; }; @@ -267,7 +267,7 @@ namespace AMDiS { * are needed at the different positions (see \ref DOFAdmin::nrDOF). * A pointer to the created DOFAdmin is returned. */ - const DOFAdmin* createDOFAdmin(const ::std::string& lname, DimVec<int> nDOF); + const DOFAdmin* createDOFAdmin(const std::string& lname, DimVec<int> nDOF); /** \brief * Returns the size of \ref admin which is the number of the DOFAdmins @@ -306,7 +306,7 @@ namespace AMDiS { /** \brief * Returns an iterator to the begin of \ref macroElements */ - inline ::std::deque<MacroElement*>::iterator firstMacroElement() { + inline std::deque<MacroElement*>::iterator firstMacroElement() { return macroElements.begin(); }; @@ -320,7 +320,7 @@ namespace AMDiS { /** \brief * Returns an iterator to the end of \ref macroElements */ - inline ::std::deque<MacroElement*>::iterator endOfMacroElements() { + inline std::deque<MacroElement*>::iterator endOfMacroElements() { return macroElements.end(); }; @@ -334,7 +334,7 @@ namespace AMDiS { /** \brief * Sets \ref name of the mesh */ - inline void setName(const ::std::string& aName) { + inline void setName(const std::string& aName) { name = aName; }; @@ -601,9 +601,9 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out); + void serialize(std::ostream &out); - void deserialize(::std::istream &in); + void deserialize(std::istream &in); /** \brief * Returns \ref elementIndex and increments it by 1. @@ -617,7 +617,7 @@ namespace AMDiS { */ inline bool isInitialized() { return initialized; }; - inline ::std::map<BoundaryType, VertexVector*>& getPeriodicAssociations() { + inline std::map<BoundaryType, VertexVector*>& getPeriodicAssociations() { return periodicAssociations; }; @@ -746,7 +746,7 @@ namespace AMDiS { /** \brief * Name of this Mesh */ - ::std::string name; + std::string name; /** \brief * Dimension of this Mesh. Doesn't have to be equal to dimension of world. @@ -854,17 +854,17 @@ namespace AMDiS { /** \brief * list of all DOFAdmins */ - ::std::vector<DOFAdmin*> admin; + std::vector<DOFAdmin*> admin; /** \brief * List of all MacroElements of this Mesh */ - ::std::deque<MacroElement*> macroElements; + std::deque<MacroElement*> macroElements; /** \brief * Needed during DOF compression (\ref DOFAdmin::compress). */ - ::std::vector<DegreeOfFreedom> newDOF; + std::vector<DegreeOfFreedom> newDOF; /** \brief * Needed during DOF compression (\ref DOFAdmin::compress). @@ -886,12 +886,12 @@ namespace AMDiS { /** \brief * Used by check functions */ - static ::std::vector<DegreeOfFreedom> dof_used; + static std::vector<DegreeOfFreedom> dof_used; /** \brief * */ - static ::std::map<DegreeOfFreedom, DegreeOfFreedom*> serializedDOFs; + static std::map<DegreeOfFreedom, DegreeOfFreedom*> serializedDOFs; /** \brief * Used while mesh refinement. To create new elements @@ -920,7 +920,7 @@ namespace AMDiS { /** \brief * Map of managed periodic vertex associations. */ - ::std::map<BoundaryType, VertexVector*> periodicAssociations; + std::map<BoundaryType, VertexVector*> periodicAssociations; /** \brief * If the mesh has been created by reading a macro file, here diff --git a/AMDiS/src/MpCCIAdapter.cc b/AMDiS/src/MpCCIAdapter.cc index 2401716c18415f177c16e0e6534fdd23fb5c5c06..dbe7b98c1ae636665f5aaa68fa4b03dc741e16b3 100644 --- a/AMDiS/src/MpCCIAdapter.cc +++ b/AMDiS/src/MpCCIAdapter.cc @@ -536,10 +536,10 @@ namespace AMDiS TEST_EXIT(error == 0)("CCI_Close_coupling_step() failed\n"); } - void MpCCIAdapter::setIndexMappings(::std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, - ::std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, - ::std::map<int, int> *newElementIndex, - ::std::map<int, int> *oldElementIndex) + void MpCCIAdapter::setIndexMappings(std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, + std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, + std::map<int, int> *newElementIndex, + std::map<int, int> *oldElementIndex) { smiAdapter_->setIndexMappings(newNodeIndex, oldNodeIndex, diff --git a/AMDiS/src/MpCCIAdapter.h b/AMDiS/src/MpCCIAdapter.h index d653f2895493fe26145a2817fdc9f012e6601b59..71969b729985aff48e02fa9d01732bee8dfe66e6 100644 --- a/AMDiS/src/MpCCIAdapter.h +++ b/AMDiS/src/MpCCIAdapter.h @@ -79,10 +79,10 @@ namespace AMDiS { void checkConvergence(int myConvergence, int *globalConvergence); - void setIndexMappings(::std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, - ::std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, - ::std::map<int, int> *newElementIndex, - ::std::map<int, int> *oldElementIndex); + void setIndexMappings(std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, + std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, + std::map<int, int> *newElementIndex, + std::map<int, int> *oldElementIndex); int getNumElements(); diff --git a/AMDiS/src/MultiGridPreconWrapper.cc b/AMDiS/src/MultiGridPreconWrapper.cc index d0c4be01daad7e277d5bda6f2420a16783ca6ee5..bdddb726dc3d1412eba14725b51a7492d161099c 100644 --- a/AMDiS/src/MultiGridPreconWrapper.cc +++ b/AMDiS/src/MultiGridPreconWrapper.cc @@ -4,7 +4,7 @@ namespace AMDiS { - MGPreconWrapperScal::MGPreconWrapperScal(::std::string name, int size_, int row_) + MGPreconWrapperScal::MGPreconWrapperScal(std::string name, int size_, int row_) : PreconditionerScal(size_, row_), solution_(NULL) { diff --git a/AMDiS/src/MultiGridPreconWrapper.h b/AMDiS/src/MultiGridPreconWrapper.h index 050dcc4052f2617cd6bd789c50b3db147155c6e7..3dfb38d036121a16dce4182d8ba1dbf34363c821 100644 --- a/AMDiS/src/MultiGridPreconWrapper.h +++ b/AMDiS/src/MultiGridPreconWrapper.h @@ -45,7 +45,7 @@ namespace AMDiS { /** \brief * Constructor. */ - MGPreconWrapperScal(::std::string name, int size_ = 1, int row_ = 0); + MGPreconWrapperScal(std::string name, int size_ = 1, int row_ = 0); /** \brief * Destructor. diff --git a/AMDiS/src/MultiGridSolver.cc b/AMDiS/src/MultiGridSolver.cc index 5ec7e0a829a319e585660b49d3911bfba2455353..b9a69e33bbb5e13a95bf99291e7e431847ce8c12 100644 --- a/AMDiS/src/MultiGridSolver.cc +++ b/AMDiS/src/MultiGridSolver.cc @@ -18,7 +18,7 @@ namespace AMDiS { - MultiGridSolverScal::MultiGridSolverScal(const ::std::string &name) + MultiGridSolverScal::MultiGridSolverScal(const std::string &name) : MultiGridSolverBase<DOFMatrix, DOFVector<double> >(name), sparseResidual_(NULL), denseResidual_(NULL), @@ -39,11 +39,11 @@ namespace AMDiS { GET_PARAMETER(0, name_ + "->use galerkin operator", "%d", &galerkin_); // Create smoother - ::std::string smootherType("gs"); + std::string smootherType("gs"); GET_PARAMETER(0, name_ + "->smoother", &smootherType); - SmootherCreator<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> > *smootherCreator = - dynamic_cast<SmootherCreator<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> >*>( - CreatorMap<SmootherBase<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> > >::getCreator(smootherType)); + SmootherCreator<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> > *smootherCreator = + dynamic_cast<SmootherCreator<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> >*>( + CreatorMap<SmootherBase<DOFMatrix, SparseVector<double>, std::set<DegreeOfFreedom> > >::getCreator(smootherType)); if (smootherCreator && !smootherCreator->isNullCreator()) { smootherCreator->setName(name_ + "->smoother"); @@ -150,12 +150,12 @@ namespace AMDiS { int level; // Iterators for all operators of the system matrix. - ::std::vector<Operator*>::iterator it; - ::std::vector<Operator*>::iterator opBegin = systemMatrix_->getOperatorsBegin(); - ::std::vector<Operator*>::iterator opEnd = systemMatrix_->getOperatorsEnd(); + std::vector<Operator*>::iterator it; + std::vector<Operator*>::iterator opBegin = systemMatrix_->getOperatorsBegin(); + std::vector<Operator*>::iterator opEnd = systemMatrix_->getOperatorsEnd(); - ::std::vector<double*>::iterator factorIt; - ::std::vector<double*>::iterator factorBegin = systemMatrix_->getOperatorFactorBegin(); + std::vector<double*>::iterator factorIt; + std::vector<double*>::iterator factorBegin = systemMatrix_->getOperatorFactorBegin(); ElementMatrix *elementMatrix = NULL; const BoundaryType *bound; @@ -319,7 +319,7 @@ namespace AMDiS { DOFMatrix *fineMatrix = levels_[maxLevel_].matrix_; for (level = maxLevel_ - 1; level >= minLevel_; level--) { - ::std::map< ::std::pair<int, int>, bool> visited; + std::map< std::pair<int, int>, bool> visited; coarseMatrix = isMGLevel_[level] ? @@ -355,7 +355,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < dim + 1; j++) { - if(visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) + if(visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -366,7 +366,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < dim + 1; j++) { - if(visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) + if(visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -377,7 +377,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < 2; j++) { - if(visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[dim + 1])] == false) { + if(visited[std::pair<int, int>(fineDOFs[i], fineDOFs[dim + 1])] == false) { coarseMatrix->addSparseDOFEntry(0.5, parentDOFs[i], parentDOFs[j], @@ -393,7 +393,7 @@ namespace AMDiS { } } - if (visited[::std::pair<int, int>(fineDOFs[dim + 1], fineDOFs[dim + 1])] == false) { + if (visited[std::pair<int, int>(fineDOFs[dim + 1], fineDOFs[dim + 1])] == false) { for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { coarseMatrix->addSparseDOFEntry(0.25, @@ -407,8 +407,8 @@ namespace AMDiS { for (int i = 0; i < dim + 2; i++) { for (int j = 0; j < dim + 2; j++) { - visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] = true; - visited[::std::pair<int, int>(fineDOFs[j], fineDOFs[i])] = true; + visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] = true; + visited[std::pair<int, int>(fineDOFs[j], fineDOFs[i])] = true; } } } @@ -424,7 +424,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < dim + 1; j++) { - if (!visited[::std::pair<int, int>(parentDOFs[i], parentDOFs[j])]) { + if (!visited[std::pair<int, int>(parentDOFs[i], parentDOFs[j])]) { coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -545,8 +545,8 @@ namespace AMDiS { levels_[coarseLevel].oldSolution_->copy(*(levels_[level].solution_), levels_[level].nearestNeighbourDOFs_); - ::std::vector<Element*>::iterator elIt, elBegin, elEnd; - ::std::vector<int>::iterator typeIt; + std::vector<Element*>::iterator elIt, elBegin, elEnd; + std::vector<int>::iterator typeIt; for (int i = level; i > coarseLevel; i--) { elBegin = levels_[i-1].elements_.begin(); @@ -822,7 +822,7 @@ namespace AMDiS { // =============================================================================== // =============================================================================== - MultiGridSolverVec::MultiGridSolverVec(const ::std::string &name) + MultiGridSolverVec::MultiGridSolverVec(const std::string &name) : MultiGridSolverBase<Matrix<DOFMatrix*>, SystemVector>(name), sparseResidual_(NULL), denseResidual_(NULL), @@ -845,14 +845,14 @@ namespace AMDiS { GET_PARAMETER(0, name_ + "->use galerkin operator", "%d", &galerkin_); // Create smoother - ::std::string smootherType("gs"); + std::string smootherType("gs"); GET_PARAMETER(0, name_ + "->smoother", &smootherType); if(smootherType == "box") { boxSmoothing_ = true; } - SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< ::std::set<DegreeOfFreedom>*> > *smootherCreator = - dynamic_cast<SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< ::std::set<DegreeOfFreedom>*> >*>( - CreatorMap<SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< ::std::set<DegreeOfFreedom>*> > >::getCreator(smootherType) + SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< std::set<DegreeOfFreedom>*> > *smootherCreator = + dynamic_cast<SmootherCreator<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< std::set<DegreeOfFreedom>*> >*>( + CreatorMap<SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, Vector< std::set<DegreeOfFreedom>*> > >::getCreator(smootherType) ); if(smootherCreator && !smootherCreator->isNullCreator()) { smootherCreator->setName(name_ + "->smoother"); @@ -866,7 +866,7 @@ namespace AMDiS { void MultiGridSolverVec::initMaxLevel() { int comp, numComps = solution_->getNumVectors(); - ::std::set<Mesh*> meshes; + std::set<Mesh*> meshes; for(comp = 0; comp < numComps; comp++) { Mesh *mesh = solution_->getDOFVector(comp)->getFESpace()->getMesh(); if(find(meshes.begin(), meshes.end(), mesh) == meshes.end()) { @@ -899,7 +899,7 @@ namespace AMDiS { // Get fe spaces and create residual vectors sparseResidual_ = NEW Vector<SparseVector<double>*>(numComponents_); - ::std::vector<FiniteElemSpace*> feSpaces(numComponents_); + std::vector<FiniteElemSpace*> feSpaces(numComponents_); for (int i = 0; i < numComponents_; i++) { feSpaces[i] = const_cast<FiniteElemSpace*> (solution_->getDOFVector(i)->getFESpace()); @@ -953,7 +953,7 @@ namespace AMDiS { levels_[i].components_.resize(numComponents_); levels_[i].levelDOFs_.resize(numComponents_); - ::std::map<FiniteElemSpace*, FESpaceData*> feSpaceData; + std::map<FiniteElemSpace*, FESpaceData*> feSpaceData; MeshData *meshData = NEW MeshData; levels_[i].solution_ = NEW Vector<SparseVector<double>*>(numComponents_); @@ -1051,11 +1051,11 @@ namespace AMDiS { for (int col = 0; col < numComponents_; col++) { DOFMatrix *dofMatrix = (*systemMatrix_)[row][col]; if(dofMatrix) { - ::std::vector<Operator*>::iterator it; - ::std::vector<Operator*>::iterator opBegin = dofMatrix->getOperatorsBegin(); - ::std::vector<Operator*>::iterator opEnd = dofMatrix->getOperatorsEnd(); - ::std::vector<double*>::iterator factorIt; - ::std::vector<double*>::iterator factorBegin = dofMatrix->getOperatorFactorBegin(); + std::vector<Operator*>::iterator it; + std::vector<Operator*>::iterator opBegin = dofMatrix->getOperatorsBegin(); + std::vector<Operator*>::iterator opEnd = dofMatrix->getOperatorsEnd(); + std::vector<double*>::iterator factorIt; + std::vector<double*>::iterator factorBegin = dofMatrix->getOperatorFactorBegin(); ElementMatrix *elementMatrix = NULL; const BoundaryType *bound; @@ -1203,7 +1203,7 @@ namespace AMDiS { for (level = maxLevel_ - 1; level >= 0; level--) { if (level >= minLevel_) { - ::std::map< ::std::pair<int, int>, bool> visited; + std::map< std::pair<int, int>, bool> visited; coarseMatrix = isMGLevel_[level] ? (*(levels_[level].matrix_))[row][col] : @@ -1237,7 +1237,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for(int j = 0; j < dim + 1; j++) { - if (visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) { + if (visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) { coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -1249,7 +1249,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < dim + 1; j++) { - if (visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) { + if (visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] == false) { coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -1261,7 +1261,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < 2; j++) { - if (visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[dim + 1])] == false) { + if (visited[std::pair<int, int>(fineDOFs[i], fineDOFs[dim + 1])] == false) { coarseMatrix->addSparseDOFEntry(0.5, parentDOFs[i], parentDOFs[j], @@ -1277,7 +1277,7 @@ namespace AMDiS { } } - if (visited[::std::pair<int, int>(fineDOFs[dim + 1], fineDOFs[dim + 1])] == false) { + if (visited[std::pair<int, int>(fineDOFs[dim + 1], fineDOFs[dim + 1])] == false) { for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { coarseMatrix->addSparseDOFEntry(0.25, @@ -1291,8 +1291,8 @@ namespace AMDiS { for (int i = 0; i < dim + 2; i++) { for (int j = 0; j < dim + 2; j++) { - visited[::std::pair<int, int>(fineDOFs[i], fineDOFs[j])] = true; - visited[::std::pair<int, int>(fineDOFs[j], fineDOFs[i])] = true; + visited[std::pair<int, int>(fineDOFs[i], fineDOFs[j])] = true; + visited[std::pair<int, int>(fineDOFs[j], fineDOFs[i])] = true; } } } @@ -1309,7 +1309,7 @@ namespace AMDiS { for (int i = 0; i < dim + 1; i++) { for (int j = 0; j < dim + 1; j++) { - if (!visited[::std::pair<int, int>(parentDOFs[i], parentDOFs[j])]) { + if (!visited[std::pair<int, int>(parentDOFs[i], parentDOFs[j])]) { coarseMatrix->addSparseDOFEntry(1.0, parentDOFs[i], parentDOFs[j], @@ -1335,7 +1335,7 @@ namespace AMDiS { if (boxSmoothing_) { boxDOFs_.resize(numComponents_); for (int i = 0; i < numComponents_; i++) { - boxDOFs_[i] = new ::std::set<DegreeOfFreedom>; + boxDOFs_[i] = new std::set<DegreeOfFreedom>; } } @@ -1378,15 +1378,15 @@ namespace AMDiS { { int numLevels = maxLevel_ + 1; - ::std::set<FESpaceData*> deletedFESpaceData; - ::std::set<MeshData*> deletedMeshData; + std::set<FESpaceData*> deletedFESpaceData; + std::set<MeshData*> deletedMeshData; for (int i = 0; i < numLevels; i++) { if (isMGLevel_[i]) { for (int j = 0; j < numComponents_; j++) { if (levels_[i].components_[j].meshData_) { - ::std::set<MeshData*>::iterator it; - it = ::std::find(deletedMeshData.begin(), + std::set<MeshData*>::iterator it; + it = std::find(deletedMeshData.begin(), deletedMeshData.end(), levels_[i].components_[j].meshData_); if (it == deletedMeshData.end()) { @@ -1396,8 +1396,8 @@ namespace AMDiS { } } if (levels_[i].components_[j].feSpaceData_) { - ::std::set<FESpaceData*>::iterator it; - it = ::std::find(deletedFESpaceData.begin(), + std::set<FESpaceData*>::iterator it; + it = std::find(deletedFESpaceData.begin(), deletedFESpaceData.end(), levels_[i].components_[j].feSpaceData_); if (it == deletedFESpaceData.end()) { @@ -1447,7 +1447,7 @@ namespace AMDiS { { if (boxSmoothing_) { for (int iteration = 0; iteration < steps; iteration++) { - ::std::vector<Element*>::iterator elIt, elBegin, elEnd; + std::vector<Element*>::iterator elIt, elBegin, elEnd; elBegin = levels_[level].elements_.begin(); elEnd = levels_[level].elements_.end(); for (elIt = elBegin; elIt != elEnd; ++elIt) { @@ -1511,8 +1511,8 @@ namespace AMDiS { void MultiGridSolverVec::restrict(int level, int coarseLevel) { - ::std::vector<Element*>::iterator elIt, elBegin, elEnd; - ::std::vector<int>::iterator typeIt; + std::vector<Element*>::iterator elIt, elBegin, elEnd; + std::vector<int>::iterator typeIt; for (int comp = 0; comp < numComponents_; comp++) { (*(levels_[coarseLevel].oldSolution_))[comp]-> @@ -1561,7 +1561,7 @@ namespace AMDiS { { DOFMatrix *matrix; SparseVector<double> *res, *sol, *rhs; - ::std::set<DegreeOfFreedom> *dofSet; + std::set<DegreeOfFreedom> *dofSet; for (int i = 0; i < numComponents_; i++) { res = (*sparseResidual_)[i]; res->clear(); @@ -1583,7 +1583,7 @@ namespace AMDiS { { DOFMatrix *matrix; SparseVector<double> *oldSol, *rhs, *res; - ::std::set<DegreeOfFreedom> *dofSet; + std::set<DegreeOfFreedom> *dofSet; for (int i = 0; i < numComponents_; i++) { rhs = (*(levels_[coarseLevel].rhs_))[i]; rhs->clear(); @@ -1606,7 +1606,7 @@ namespace AMDiS { void MultiGridSolverVec::computeCorrection(int level, int coarseLevel) { SparseVector<double> *res, *sol, *oldSol; - ::std::set<DegreeOfFreedom> *dofSet; + std::set<DegreeOfFreedom> *dofSet; for (int comp = 0; comp < numComponents_; comp++) { dofSet = &(levels_[coarseLevel].components_[comp].feSpaceData_->fineDOFs_); sol = (*(levels_[coarseLevel].solution_))[comp]; @@ -1621,7 +1621,7 @@ namespace AMDiS { void MultiGridSolverVec::fixSolution(int level, int coarseLevel) { SparseVector<double> *fineSol, *coarseSol, *res; - ::std::set<DegreeOfFreedom> *dofSet; + std::set<DegreeOfFreedom> *dofSet; for (int comp = 0; comp < numComponents_; comp++) { fineSol = (*(levels_[level].solution_))[comp]; coarseSol = (*(levels_[coarseLevel].solution_))[comp]; @@ -1647,7 +1647,7 @@ namespace AMDiS { FUNCNAME("MultiGridSolverVec::toleranceReached()"); SparseVector<double> *sol; - ::std::set<DegreeOfFreedom> *dofSet; + std::set<DegreeOfFreedom> *dofSet; for (int level = minLevel_; level < maxLevel_ + 1; level++) { if (isMGLevel_[level]) { for (int i = 0; i < numComponents_; i++) { diff --git a/AMDiS/src/MultiGridSolver.h b/AMDiS/src/MultiGridSolver.h index 03b6c1d4cd8aecc7b97962f32e58d7fff37efd06..40f84def57b09c56b3511304234666d6cb94fbc0 100644 --- a/AMDiS/src/MultiGridSolver.h +++ b/AMDiS/src/MultiGridSolver.h @@ -84,42 +84,42 @@ namespace AMDiS { /** \brief * Set of DOFs of all elements of the level. */ - ::std::set<DegreeOfFreedom> levelDOFs_; + std::set<DegreeOfFreedom> levelDOFs_; /** \brief * Set of DOFs of all elements of the level, which are also * included in finer levels. */ - ::std::set<DegreeOfFreedom> fineDOFs_; + std::set<DegreeOfFreedom> fineDOFs_; /** \brief * Set of DOFs of all elements of the level, which are not * included in finer levels. */ - ::std::set<DegreeOfFreedom> coarseDOFs_; + std::set<DegreeOfFreedom> coarseDOFs_; /** \brief */ - ::std::set<DegreeOfFreedom> nearestNeighbourDOFs_; + std::set<DegreeOfFreedom> nearestNeighbourDOFs_; /** \brief * List of all elements in the mesh on the current level. */ - ::std::vector<Element*> elements_; + std::vector<Element*> elements_; /** \brief * This array is only used if the elements are of dim=3. Than there * are different element types possible. All different element types * of the mesh are stored here. */ - ::std::vector<int> elementTypes_; + std::vector<int> elementTypes_; }; public: /** \brief * Constructor of the scalar multigrid solver. */ - MultiGridSolverScal(const ::std::string &name); + MultiGridSolverScal(const std::string &name); /** \brief * Computes the residual and checks if its norm is less than the tolerance. @@ -233,7 +233,7 @@ namespace AMDiS { /** \brief * Data of all multigrid levels. */ - ::std::vector<LevelData> levels_; + std::vector<LevelData> levels_; /** \brief * Residual stored in sparse format. @@ -254,7 +254,7 @@ namespace AMDiS { * Defines for all mesh levels, if the level is a multigrid level. * isMGLevel[0] is the coarsest grid level. */ - ::std::vector<bool> isMGLevel_; + std::vector<bool> isMGLevel_; /** \brief * Counts the number of multigrid iterations. @@ -282,7 +282,7 @@ namespace AMDiS { */ SmootherBase<DOFMatrix, SparseVector<double>, - ::std::set<DegreeOfFreedom> > *smoother_; + std::set<DegreeOfFreedom> > *smoother_; /** \brief * Interpolation matrix for interpolating the residual between two meshes. @@ -325,23 +325,23 @@ namespace AMDiS { /** \brief * Set of DOFs of all elements of the level. */ - ::std::set<DegreeOfFreedom> levelDOFs_; + std::set<DegreeOfFreedom> levelDOFs_; /** \brief * Set of DOFs of all elements of the level, which are also * included in finer levels. */ - ::std::set<DegreeOfFreedom> fineDOFs_; + std::set<DegreeOfFreedom> fineDOFs_; /** \brief * Set of DOFs of all elements of the level, which are not * included in finer levels. */ - ::std::set<DegreeOfFreedom> coarseDOFs_; + std::set<DegreeOfFreedom> coarseDOFs_; /** \brief */ - ::std::set<DegreeOfFreedom> nearestNeighbourDOFs_; + std::set<DegreeOfFreedom> nearestNeighbourDOFs_; }; /** \brief @@ -412,31 +412,31 @@ namespace AMDiS { /** \brief * Mesh and FE space dependend data for each component. */ - ::std::vector<ComponentData> components_; + std::vector<ComponentData> components_; /** \brief * Stores for each component all DOFs at this level. */ - Vector< ::std::set<DegreeOfFreedom>*> levelDOFs_; + Vector< std::set<DegreeOfFreedom>*> levelDOFs_; /** \brief * List of all elements in the mesh on the current level. */ - ::std::vector<Element*> elements_; + std::vector<Element*> elements_; /** \brief * This array is only used if the elements are of dim=3. Than there * are different element types possible. All different element types * of the mesh are stored here. */ - ::std::vector<int> elementTypes_; + std::vector<int> elementTypes_; }; public: /** \brief * Constructor of the vector multigrid solver. */ - MultiGridSolverVec(const ::std::string &name); + MultiGridSolverVec(const std::string &name); /** \brief * Computes the residual and checks if its norm is less than the tolerance. @@ -542,12 +542,12 @@ namespace AMDiS { * Defines for all mesh levels, if the level is a multigrid level. * isMGLevel[0] is the coarsest grid level. */ - ::std::vector<bool> isMGLevel_; + std::vector<bool> isMGLevel_; /** \brief * Data of all multigrid levels. */ - ::std::vector<LevelData> levels_; + std::vector<LevelData> levels_; /** \brief * Sparse vectors containing the residuals. @@ -595,19 +595,19 @@ namespace AMDiS { */ SmootherBase<Matrix<DOFMatrix*>, Vector<SparseVector<double>*>, - Vector< ::std::set<DegreeOfFreedom>*> > *smoother_; + Vector< std::set<DegreeOfFreedom>*> > *smoother_; /** \brief * Vector of interpolation matrices for interpolating the residual between * two meshes. */ - ::std::vector<InterpolRestrictMatrix*> interpolMatrix_; + std::vector<InterpolRestrictMatrix*> interpolMatrix_; /** \brief * Vector of restriction matrices for restricting the residual between * two meshes. */ - ::std::vector<InterpolRestrictMatrix*> restrictMatrix_; + std::vector<InterpolRestrictMatrix*> restrictMatrix_; /** \brief * Diagonal entries in the system matrix. @@ -622,7 +622,7 @@ namespace AMDiS { /** \brief * */ - Vector< ::std::set<DegreeOfFreedom>*> boxDOFs_; + Vector< std::set<DegreeOfFreedom>*> boxDOFs_; /** \brief * diff --git a/AMDiS/src/MultiGridSolverBase.h b/AMDiS/src/MultiGridSolverBase.h index e66bc52d49f5f5af2c933cd708ba173b28110f27..4a79297f91eb94ff0a5fe0a2b79166a652074892 100755 --- a/AMDiS/src/MultiGridSolverBase.h +++ b/AMDiS/src/MultiGridSolverBase.h @@ -33,7 +33,7 @@ namespace AMDiS { /** \brief * Constructor, reads all multigrid parameters from the init file. */ - MultiGridSolverBase(const ::std::string &name) ; + MultiGridSolverBase(const std::string &name) ; /** \brief * Destructor @@ -105,7 +105,7 @@ namespace AMDiS { /** \brief * Name of the problem, corresponding to the name in the init file. */ - ::std::string name_; + std::string name_; /** \brief * Tolerance for the computation. The multigrid method finished, if the diff --git a/AMDiS/src/MultiGridSolverBase.hh b/AMDiS/src/MultiGridSolverBase.hh index c5f689c4f40c79767237fa3f6b17e5f19108b6c2..e5254920bbc8d50febd83eaf31ced1dfa5a3bfb9 100644 --- a/AMDiS/src/MultiGridSolverBase.hh +++ b/AMDiS/src/MultiGridSolverBase.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename MatrixType, typename VectorType> - MultiGridSolverBase<MatrixType, VectorType>::MultiGridSolverBase(const ::std::string &name) + MultiGridSolverBase<MatrixType, VectorType>::MultiGridSolverBase(const std::string &name) : name_(name), tolerance_(1e-8), maxIterations_(100), diff --git a/AMDiS/src/MultiGridWrapper.h b/AMDiS/src/MultiGridWrapper.h index 0ec90f4c7d2a738d91b21c64157e16feaf9900f1..841d52ac1b26790b769452816f85cd69fdf9a231 100644 --- a/AMDiS/src/MultiGridWrapper.h +++ b/AMDiS/src/MultiGridWrapper.h @@ -56,7 +56,7 @@ namespace AMDiS { }; }; - MultiGridWrapperScal(::std::string name) + MultiGridWrapperScal(std::string name) : OEMSolver<DOFVector<double> >(name) { mgSolver_ = @@ -111,7 +111,7 @@ namespace AMDiS { }; }; - MultiGridWrapperVec(::std::string name) + MultiGridWrapperVec(std::string name) : OEMSolver<SystemVector>(name) { mgSolver_ = diff --git a/AMDiS/src/Newton.h b/AMDiS/src/Newton.h index 4fa55eb674049396485d51d5e64997cf75d9e5a5..d1bcc75f4e368bf33fc99d2c74d6ef1dab9fe13e 100644 --- a/AMDiS/src/Newton.h +++ b/AMDiS/src/Newton.h @@ -70,7 +70,7 @@ namespace AMDiS { /** \brief * Calls constructor of base class NonLinSolver */ - Newton(const ::std::string& name_, + Newton(const std::string& name_, OEMSolver<VectorType> *linSolver_, NonLinUpdater<VectorType> *updater) : NonLinSolver<VectorType>(name_, linSolver_, updater) diff --git a/AMDiS/src/Newton.hh b/AMDiS/src/Newton.hh index b3aefe774388fc1f0be67411fe22eb80d5ec21b8..032bc97cc87e238553dc4116f81706064cdbad98 100644 --- a/AMDiS/src/Newton.hh +++ b/AMDiS/src/Newton.hh @@ -30,8 +30,8 @@ namespace AMDiS { *b = *d; // // copy operators from fh to b - // ::std::vector<Operator*>::iterator op; - // ::std::vector<double*>::iterator fac; + // std::vector<Operator*>::iterator op; + // std::vector<double*>::iterator fac; // for(op = d->getOperatorsBegin(), // fac = d->getOperatorFactorBegin(); // op != d->getOperatorsEnd(); diff --git a/AMDiS/src/NewtonS.h b/AMDiS/src/NewtonS.h index d372a07b0985f2886b42817868df7e57e2a0b441..db7661f520e8a732de3902c4ea00193041291333 100644 --- a/AMDiS/src/NewtonS.h +++ b/AMDiS/src/NewtonS.h @@ -65,7 +65,7 @@ namespace AMDiS { /** \brief * Calls constructor of base class NonLinSolver */ - NewtonS(const ::std::string& name_, + NewtonS(const std::string& name_, OEMSolver<VectorType> *linSolver_, NonLinUpdater<VectorType> *updater) : NonLinSolver<VectorType>(name_, linSolver_, updater), diff --git a/AMDiS/src/NewtonS.hh b/AMDiS/src/NewtonS.hh index f5a92fcfad872496db3155909290c5ea9cb396f1..84052c9f179f492aa8c25b42622949881c911a69 100644 --- a/AMDiS/src/NewtonS.hh +++ b/AMDiS/src/NewtonS.hh @@ -29,8 +29,8 @@ namespace AMDiS { *b = *rhs; // // copy operators from fh to b - // ::std::vector<Operator*>::iterator op; - // ::std::vector<double*>::iterator fac; + // std::vector<Operator*>::iterator op; + // std::vector<double*>::iterator fac; // for(op = rhs->getOperatorsBegin(), // fac = rhs->getOperatorFactorBegin(); // op != rhs->getOperatorsEnd(); @@ -67,7 +67,7 @@ namespace AMDiS { /*--- still initalization part ---------------------------------------------*/ - mmax = ::std::max(2,::std::min(restart,32)); + mmax = std::max(2,std::min(restart,32)); m = 0; tau = 1.0; halved = true; @@ -86,7 +86,7 @@ namespace AMDiS { /*--- look for step size ---------------------------------------------------*/ if (!halved) { - m = ::std::max(m-1,0); + m = std::max(m-1,0); tau = tau < 0.5 ? 2.0*tau : 1.0; } diff --git a/AMDiS/src/NonLinSolver.h b/AMDiS/src/NonLinSolver.h index 9067b3afd6b445026836bf0fa098b4fc16047830..ca729bd2b8342515b3975348d82508bbb7dc9e0f 100644 --- a/AMDiS/src/NonLinSolver.h +++ b/AMDiS/src/NonLinSolver.h @@ -52,7 +52,7 @@ namespace AMDiS { * constructor. * \param name name of this solver */ - NonLinSolver(const ::std::string &name_, + NonLinSolver(const std::string &name_, OEMSolver<VectorType> *linSolver_, NonLinUpdater<VectorType> *updater); @@ -128,7 +128,7 @@ namespace AMDiS { }; protected: - ::std::string name; /**< \brief name of the solver */ + std::string name; /**< \brief name of the solver */ OEMSolver<VectorType> *linSolver; /**< \brief linear solver*/ NonLinUpdater<VectorType> *nonLinUpdater; /**< \brief non linear updater */ double tolerance; /**< \brief solver tolerance */ @@ -154,7 +154,7 @@ namespace AMDiS { public: virtual ~NonLinSolverCreator() {}; - void setName(::std::string name_) { name = name_; }; + void setName(std::string name_) { name = name_; }; void setLinearSolver(OEMSolver<VectorType> *solver) { linearSolver = solver; }; @@ -163,7 +163,7 @@ namespace AMDiS { }; protected: - ::std::string name; + std::string name; OEMSolver<VectorType> *linearSolver; NonLinUpdater<VectorType> *nonLinUpdater; }; diff --git a/AMDiS/src/NonLinSolver.hh b/AMDiS/src/NonLinSolver.hh index 8de93480059e9d4d01f5028b71a449189d032665..6dfb84a9ad1613e0b5719af07671f14e50a7a440 100644 --- a/AMDiS/src/NonLinSolver.hh +++ b/AMDiS/src/NonLinSolver.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - NonLinSolver<VectorType>::NonLinSolver(const ::std::string& name_, + NonLinSolver<VectorType>::NonLinSolver(const std::string& name_, OEMSolver<VectorType> *solver, NonLinUpdater<VectorType> *updater) : name(name_), diff --git a/AMDiS/src/ODirSolver.h b/AMDiS/src/ODirSolver.h index 602e9b97f0a97829a38f8e456b7a618ffd46e358..9fab35ad277e96a89661f399f9c3fb22a920d24f 100644 --- a/AMDiS/src/ODirSolver.h +++ b/AMDiS/src/ODirSolver.h @@ -65,7 +65,7 @@ namespace AMDiS { /** \brief * constructor */ - ODirSolver(::std::string name); + ODirSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/ODirSolver.hh b/AMDiS/src/ODirSolver.hh index 044605058084963d2add50d24624d08e251dc962..a7142a31e41a57202d1035e9908a8af473e601f5 100644 --- a/AMDiS/src/ODirSolver.hh +++ b/AMDiS/src/ODirSolver.hh @@ -3,7 +3,7 @@ namespace AMDiS { template<typename VectorType> - ODirSolver<VectorType>::ODirSolver(::std::string name) + ODirSolver<VectorType>::ODirSolver(std::string name) : OEMSolver<VectorType>(name), Ad(NULL), d(NULL), d_old(NULL), r(NULL), h(NULL) { diff --git a/AMDiS/src/OEMSolver.h b/AMDiS/src/OEMSolver.h index 81d47fdef16b608ab658b53432c1f5937f93d6a0..f16053b7a42af7ddce05cbb816210c545b58ccce 100644 --- a/AMDiS/src/OEMSolver.h +++ b/AMDiS/src/OEMSolver.h @@ -81,7 +81,7 @@ namespace AMDiS { /** \brief * The constructor reads needed parameters and sets solvers \ref name. */ - OEMSolver(::std::string name); + OEMSolver(std::string name); /** \brief * Virtual destructor because OEMSolver is pure virtual. @@ -135,7 +135,7 @@ namespace AMDiS { /** \brief * Returns solvers \ref name. */ - inline const ::std::string& getName() { + inline const std::string& getName() { return name; }; @@ -245,7 +245,7 @@ namespace AMDiS { /** \brief * solvers name. */ - ::std::string name; + std::string name; /** \brief * solver tolerance. Set in OEMSolver's constructor. @@ -299,7 +299,7 @@ namespace AMDiS { /** \brief * Sets \ref problem */ - void setName(::std::string name_) { + void setName(std::string name_) { name = name_; }; @@ -308,7 +308,7 @@ namespace AMDiS { * Pointer to the problem the solver will belong to. Needed as parameter * when constructing an OEMSolver */ - ::std::string name; + std::string name; }; } diff --git a/AMDiS/src/OEMSolver.hh b/AMDiS/src/OEMSolver.hh index 0bb86e0214291aceabf69c6411a9c83211aad563..a0a57c26c89091086cb1e756f271c56289f69613 100644 --- a/AMDiS/src/OEMSolver.hh +++ b/AMDiS/src/OEMSolver.hh @@ -7,7 +7,7 @@ namespace AMDiS { template<typename VectorType> - OEMSolver<VectorType>::OEMSolver(::std::string name_) + OEMSolver<VectorType>::OEMSolver(std::string name_) : name(name_), tolerance(1.e-8), relative(false), diff --git a/AMDiS/src/OResSolver.h b/AMDiS/src/OResSolver.h index 64ef524b55c1b2b6b48bb7f415476662e1a523a6..ddeadce05f2bfd675bcb4d1e07b01eadc7faeefb 100644 --- a/AMDiS/src/OResSolver.h +++ b/AMDiS/src/OResSolver.h @@ -65,7 +65,7 @@ namespace AMDiS { /** \brief * constructor */ - OResSolver(::std::string name); + OResSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/OResSolver.hh b/AMDiS/src/OResSolver.hh index e2eb8f8f174e221db9a0c8301dcf8970da5de929..e3fca6d6cba6b41fa35a7f1f22282642c598c65e 100644 --- a/AMDiS/src/OResSolver.hh +++ b/AMDiS/src/OResSolver.hh @@ -3,7 +3,7 @@ namespace AMDiS { template<typename VectorType> - OResSolver<VectorType>::OResSolver(::std::string name) + OResSolver<VectorType>::OResSolver(std::string name) : OEMSolver<VectorType>(name), Ad(NULL), d(NULL), d_old(NULL), r(NULL), h(NULL), Ad_old(NULL), Ah(NULL) { diff --git a/AMDiS/src/Operator.cc b/AMDiS/src/Operator.cc index eecdbf4e1cd2b3e8b576f4ebe1dbb5f874a80e90..b21dd7551293218e6ef9b0d6c5f01cbea6695287 100644 --- a/AMDiS/src/Operator.cc +++ b/AMDiS/src/Operator.cc @@ -19,7 +19,7 @@ namespace AMDiS { int Operator::getQuadratureDegree(int order, FirstOrderType firstOrderType) { - ::std::vector<OperatorTerm*>* terms = NULL; + std::vector<OperatorTerm*>* terms = NULL; int myRank = omp_get_thread_num(); switch(order) { @@ -1459,7 +1459,7 @@ namespace AMDiS { void VecOfDOFVecsAtQP_ZOT::getC(const ElInfo *, int numPoints, double *C) const { int size = static_cast<int>(vecs.size()); - ::std::vector<double> arg(size); + std::vector<double> arg(size); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < size; i++) { @@ -1478,7 +1478,7 @@ namespace AMDiS { { int i ,size = static_cast<int>(vecs.size()); - ::std::vector<double> arg(size); + std::vector<double> arg(size); int iq; for(iq = 0; iq < numPoints; iq++) { @@ -1514,7 +1514,7 @@ namespace AMDiS { void VecOfGradientsAtQP_ZOT::getC(const ElInfo *, int numPoints, double *C) const { int size = static_cast<int>(vecs.size()); - ::std::vector<WorldVector<double>*> arg(size); + std::vector<WorldVector<double>*> arg(size); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < size; i++) { @@ -1532,7 +1532,7 @@ namespace AMDiS { double fac) const { int size = static_cast<int>(vecs.size()); - ::std::vector<WorldVector<double>*> arg(size); + std::vector<WorldVector<double>*> arg(size); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < size; i++) { @@ -1643,8 +1643,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); const DimVec<WorldVector<double> > &Lambda = elInfo->getGrdLambda(); @@ -1671,8 +1671,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { double resultQP = 0.0; @@ -1709,8 +1709,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); if (grdUhAtQP) { WorldMatrix<double> A; @@ -1751,8 +1751,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); const DimVec<WorldVector<double> > &Lambda = elInfo->getGrdLambda(); @@ -1779,8 +1779,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); if (grdUhAtQP) { for (int iq = 0; iq < numPoints; iq++) { @@ -1824,8 +1824,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < numVecs; i++) { @@ -1848,8 +1848,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < numVecs; i++) { @@ -1890,8 +1890,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); const DimVec<WorldVector<double> > &Lambda = elInfo->getGrdLambda(); @@ -1918,8 +1918,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { double resultQP = 0.0; @@ -1956,8 +1956,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); if (grdUhAtQP) { WorldMatrix<double> A; @@ -1999,8 +1999,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); const DimVec<WorldVector<double> > &Lambda = elInfo->getGrdLambda(); for (int iq = 0; iq < numPoints; iq++) { @@ -2025,8 +2025,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); if (grdUhAtQP) { for (int iq = 0; iq < numPoints; iq++) { @@ -2071,8 +2071,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < numVecs; i++) { @@ -2095,8 +2095,8 @@ namespace AMDiS { int numVecs = static_cast<int>(vecs_.size()); int numGrads = static_cast<int>(grads_.size()); - ::std::vector<double> vecsArg(numVecs); - ::std::vector<WorldVector<double> > gradsArg(numGrads); + std::vector<double> vecsArg(numVecs); + std::vector<WorldVector<double> > gradsArg(numGrads); for (int iq = 0; iq < numPoints; iq++) { for (int i = 0; i < numVecs; i++) { diff --git a/AMDiS/src/Operator.h b/AMDiS/src/Operator.h index de40e63af3ef8f2caa1c0ff63daff96410f1a4cd..55aefe30f9f6bedb0c6d4955686005b914b4884d 100644 --- a/AMDiS/src/Operator.h +++ b/AMDiS/src/Operator.h @@ -1225,12 +1225,12 @@ namespace AMDiS { class General_SOT : public SecondOrderTerm { public: - General_SOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + General_SOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, TertiaryAbstractFunction<WorldMatrix<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f, + std::vector<double>, + std::vector<WorldVector<double> > > *f, AbstractFunction<WorldVector<double>, WorldMatrix<double> > *divFct, bool symmetric) @@ -1275,23 +1275,23 @@ namespace AMDiS { WorldVector<double> *result) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; TertiaryAbstractFunction<WorldMatrix<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; AbstractFunction<WorldVector<double>, WorldMatrix<double> > *divFct_; WorldVector<double> *coordsAtQPs_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; bool symmetric_; }; @@ -1302,13 +1302,13 @@ namespace AMDiS { class GeneralParametric_SOT : public SecondOrderTerm { public: - GeneralParametric_SOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + GeneralParametric_SOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, QuartAbstractFunction<WorldMatrix<double>, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f, + std::vector<double>, + std::vector<WorldVector<double> > > *f, AbstractFunction<WorldVector<double>, WorldMatrix<double> > *divFct, bool symmetric) @@ -1353,15 +1353,15 @@ namespace AMDiS { WorldVector<double> *result) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; QuartAbstractFunction<WorldMatrix<double>, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; AbstractFunction<WorldVector<double>, WorldMatrix<double> > *divFct_; @@ -1369,9 +1369,9 @@ namespace AMDiS { WorldVector<double> *coordsAtQPs_; WorldVector<double> elementNormal_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; bool symmetric_; }; @@ -1975,12 +1975,12 @@ namespace AMDiS { /** /brief * Constructor */ - General_FOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + General_FOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, TertiaryAbstractFunction<WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f) + std::vector<double>, + std::vector<WorldVector<double> > > *f) : FirstOrderTerm(f->getDegree()), vecs_(vecs), grads_(grads), @@ -2014,20 +2014,20 @@ namespace AMDiS { double factor) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; TertiaryAbstractFunction<WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; WorldVector<double> *coordsAtQPs_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; }; @@ -2040,13 +2040,13 @@ namespace AMDiS { /** /brief * Constructor */ - GeneralParametric_FOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + GeneralParametric_FOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, QuartAbstractFunction<WorldVector<double>, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f) + std::vector<double>, + std::vector<WorldVector<double> > > *f) : FirstOrderTerm(f->getDegree()), vecs_(vecs), grads_(grads), @@ -2080,22 +2080,22 @@ namespace AMDiS { double factor) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; QuartAbstractFunction<WorldVector<double>, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; WorldVector<double> *coordsAtQPs_; WorldVector<double> elementNormal_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; }; @@ -3088,8 +3088,8 @@ namespace AMDiS { /** \brief * Constructor. */ - VecOfDOFVecsAtQP_ZOT(const ::std::vector<DOFVectorBase<double>*>& dv, - AbstractFunction<double, ::std::vector<double> > *f_) + VecOfDOFVecsAtQP_ZOT(const std::vector<DOFVectorBase<double>*>& dv, + AbstractFunction<double, std::vector<double> > *f_) : ZeroOrderTerm(f_->getDegree()), vecs(dv), f(f_) { vecsAtQPs.resize(vecs.size()); @@ -3120,17 +3120,17 @@ namespace AMDiS { /** \brief * Vector of DOFVectors to be evaluated at quadrature points. */ - ::std::vector<DOFVectorBase<double>*> vecs; + std::vector<DOFVectorBase<double>*> vecs; /** \brief * Vectors at quadrature points. */ - ::std::vector<double*> vecsAtQPs; + std::vector<double*> vecsAtQPs; /** \brief * Function for c. */ - AbstractFunction<double, ::std::vector<double> > *f; + AbstractFunction<double, std::vector<double> > *f; }; class VecOfGradientsAtQP_ZOT : public ZeroOrderTerm @@ -3139,8 +3139,8 @@ namespace AMDiS { /** \brief * Constructor. */ - VecOfGradientsAtQP_ZOT(const ::std::vector<DOFVectorBase<double>*>& dv, - AbstractFunction<double, ::std::vector<WorldVector<double>*> > *f_) + VecOfGradientsAtQP_ZOT(const std::vector<DOFVectorBase<double>*>& dv, + AbstractFunction<double, std::vector<WorldVector<double>*> > *f_) : ZeroOrderTerm(f_->getDegree()), vecs(dv), f(f_) { gradsAtQPs.resize(vecs.size()); @@ -3171,17 +3171,17 @@ namespace AMDiS { /** \brief * Vector of DOFVectors to be evaluated at quadrature points. */ - ::std::vector<DOFVectorBase<double>*> vecs; + std::vector<DOFVectorBase<double>*> vecs; /** \brief * Vectors at quadrature points. */ - ::std::vector<WorldVector<double>*> gradsAtQPs; + std::vector<WorldVector<double>*> gradsAtQPs; /** \brief * Function for c. */ - AbstractFunction<double, ::std::vector<WorldVector<double>*> > *f; + AbstractFunction<double, std::vector<WorldVector<double>*> > *f; }; @@ -3229,12 +3229,12 @@ namespace AMDiS { /** \brief * Vector of DOFVectors to be evaluated at quadrature points. */ - ::std::vector<DOFVectorBase<double>*> vecs; + std::vector<DOFVectorBase<double>*> vecs; /** \brief * Vectors at quadrature points. */ - ::std::vector<WorldVector<double>*> gradsAtQPs; + std::vector<WorldVector<double>*> gradsAtQPs; }; @@ -3311,12 +3311,12 @@ namespace AMDiS { /** \brief * Constructor. */ - General_ZOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + General_ZOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, TertiaryAbstractFunction<double, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f) + std::vector<double>, + std::vector<WorldVector<double> > > *f) : ZeroOrderTerm(f->getDegree()), vecs_(vecs), grads_(grads), @@ -3348,20 +3348,20 @@ namespace AMDiS { double fac) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; TertiaryAbstractFunction<double, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; WorldVector<double> *coordsAtQPs_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; }; @@ -3373,13 +3373,13 @@ namespace AMDiS { /** \brief * Constructor. */ - GeneralParametric_ZOT(::std::vector<DOFVectorBase<double>*> vecs, - ::std::vector<DOFVectorBase<double>*> grads, + GeneralParametric_ZOT(std::vector<DOFVectorBase<double>*> vecs, + std::vector<DOFVectorBase<double>*> grads, QuartAbstractFunction<double, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f) + std::vector<double>, + std::vector<WorldVector<double> > > *f) : ZeroOrderTerm(f->getDegree()), vecs_(vecs), grads_(grads), @@ -3411,23 +3411,23 @@ namespace AMDiS { double fac) const; protected: - ::std::vector<DOFVectorBase<double>*> vecs_; + std::vector<DOFVectorBase<double>*> vecs_; - ::std::vector<DOFVectorBase<double>*> grads_; + std::vector<DOFVectorBase<double>*> grads_; QuartAbstractFunction<double, WorldVector<double>, WorldVector<double>, - ::std::vector<double>, - ::std::vector<WorldVector<double> > > *f_; + std::vector<double>, + std::vector<WorldVector<double> > > *f_; WorldVector<double> *coordsAtQPs_; WorldVector<double> elementNormal_; - ::std::vector<double*> vecsAtQPs_; + std::vector<double*> vecsAtQPs_; - ::std::vector<WorldVector<double>*> gradsAtQPs_; + std::vector<WorldVector<double>*> gradsAtQPs_; }; @@ -3621,7 +3621,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = zeroOrder[myRank].begin(); termIt != zeroOrder[myRank].end(); ++termIt) { @@ -3642,7 +3642,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = firstOrderGrdPsi[myRank].begin(); termIt != firstOrderGrdPsi[myRank].end(); ++termIt) { @@ -3662,7 +3662,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = firstOrderGrdPhi[myRank].begin(); termIt != firstOrderGrdPhi[myRank].end(); ++termIt) { @@ -3683,7 +3683,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = secondOrder[myRank].begin(); termIt != secondOrder[myRank].end(); ++termIt) { @@ -3700,7 +3700,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = secondOrder[myRank].begin(); termIt != secondOrder[myRank].end(); ++termIt) { @@ -3716,7 +3716,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = secondOrder[myRank].begin(); termIt != secondOrder[myRank].end(); ++termIt) { @@ -3732,7 +3732,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = firstOrderGrdPsi[myRank].begin(); termIt != firstOrderGrdPsi[myRank].end(); ++termIt) { @@ -3748,7 +3748,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = firstOrderGrdPhi[myRank].begin(); termIt != firstOrderGrdPhi[myRank].end(); ++termIt) { @@ -3764,7 +3764,7 @@ namespace AMDiS { { int myRank = omp_get_thread_num(); - ::std::vector<OperatorTerm*>::const_iterator termIt; + std::vector<OperatorTerm*>::const_iterator termIt; for (termIt = zeroOrder[myRank].begin(); termIt != zeroOrder[myRank].end(); ++termIt) { @@ -3850,27 +3850,27 @@ namespace AMDiS { * created especially for this Operator, when \ref getElementMatrix() * or \ref getElementVector is called for the first time. */ - ::std::vector<Assembler*> assembler; + std::vector<Assembler*> assembler; /** \brief * List of all second order terms */ - ::std::vector< ::std::vector<OperatorTerm*> > secondOrder; + std::vector< std::vector<OperatorTerm*> > secondOrder; /** \brief * List of all first order terms derived to psi */ - ::std::vector< ::std::vector<OperatorTerm*> > firstOrderGrdPsi; + std::vector< std::vector<OperatorTerm*> > firstOrderGrdPsi; /** \brief * List of all first order terms derived to phi */ - ::std::vector< ::std::vector<OperatorTerm*> > firstOrderGrdPhi; + std::vector< std::vector<OperatorTerm*> > firstOrderGrdPhi; /** \brief * List of all zero order terms */ - ::std::vector< ::std::vector<OperatorTerm*> > zeroOrder; + std::vector< std::vector<OperatorTerm*> > zeroOrder; /** \brief * Pointer to the solution of the last timestep. Can be used if the diff --git a/AMDiS/src/ParallelProblem.cc b/AMDiS/src/ParallelProblem.cc index f08a834c36b12707aa7d24ffc31731e21ca67346..ba5a51bbf92a45acdf346b68542bd15fdbce4a22 100644 --- a/AMDiS/src/ParallelProblem.cc +++ b/AMDiS/src/ParallelProblem.cc @@ -1396,13 +1396,13 @@ namespace AMDiS { // modify file writers char number[10]; sprintf(number, "%d", mpiRank); - ::std::vector<FileWriterInterface*> fileWriters = problem->getFileWriterList(); - ::std::vector<FileWriterInterface*>::iterator fwIt, fwBegin, fwEnd; + std::vector<FileWriterInterface*> fileWriters = problem->getFileWriterList(); + std::vector<FileWriterInterface*>::iterator fwIt, fwBegin, fwEnd; fwBegin = fileWriters.begin(); fwEnd = fileWriters.end(); for (fwIt = fwBegin; fwIt != fwEnd; ++fwIt) { (*fwIt)->setFilename((*fwIt)->getFilename() + "_proc" + - ::std::string(number) + "_"); + std::string(number) + "_"); (*fwIt)->setTraverseProperties(-1, 0, elementInPartition); } } @@ -1572,13 +1572,13 @@ namespace AMDiS { // modify file writers char number[10]; sprintf(number, "%d", mpiComm.Get_rank()); - ::std::vector<FileWriterInterface*> fileWriters = problem->getFileWriterList(); - ::std::vector<FileWriterInterface*>::iterator fwIt, fwBegin, fwEnd; + std::vector<FileWriterInterface*> fileWriters = problem->getFileWriterList(); + std::vector<FileWriterInterface*>::iterator fwIt, fwBegin, fwEnd; fwBegin = fileWriters.begin(); fwEnd = fileWriters.end(); for (fwIt = fwBegin; fwIt != fwEnd; ++fwIt) { (*fwIt)->setFilename((*fwIt)->getFilename() + "_proc" + - ::std::string(number) + "_"); + std::string(number) + "_"); (*fwIt)->setTraverseProperties(-1, 0, elementInPartition); } } diff --git a/AMDiS/src/ParallelProblem.h b/AMDiS/src/ParallelProblem.h index b7ed0370f4493cf49af4802467dcf2e6724075ce..aaaa065c408e1ac1247a71e99749d219f6e77645 100644 --- a/AMDiS/src/ParallelProblem.h +++ b/AMDiS/src/ParallelProblem.h @@ -466,7 +466,7 @@ namespace AMDiS { usersMarker = marker; }; - inline virtual const ::std::string& getName() { + inline virtual const std::string& getName() { return name_; }; @@ -539,7 +539,7 @@ namespace AMDiS { usersMarker = marker; }; - inline virtual const ::std::string& getName() { + inline virtual const std::string& getName() { return name_; }; diff --git a/AMDiS/src/Parameters.cc b/AMDiS/src/Parameters.cc index 9688f23e2f442569aae7d48a9ab8f6276f03b7b6..4eeacde6a0351aa72987ce097cca2a9c2bdf76ef 100644 --- a/AMDiS/src/Parameters.cc +++ b/AMDiS/src/Parameters.cc @@ -17,16 +17,16 @@ namespace AMDiS { int Parameters::param_call_line = 0; - int Parameters::getGlobalParameter(int info, const ::std::string& key, + int Parameters::getGlobalParameter(int info, const std::string& key, const char *format, ...) { FUNCNAME("Parameters::getGlobalParameter()"); int count, *ival; - ::std::vector<struct Parameters::param>::iterator i; + std::vector<struct Parameters::param>::iterator i; char *sval, *cval; const char *word; - ::std::string s; + std::string s; const char *p; double *rval; unsigned char *Uval; @@ -54,7 +54,7 @@ namespace AMDiS { } } - i = ::std::find(Parameters::singlett->allParam.begin(),Parameters::singlett->allParam.end(),tParam); + i = std::find(Parameters::singlett->allParam.begin(),Parameters::singlett->allParam.end(),tParam); if (i == Parameters::singlett->allParam.end()) { if (funcName != funcName2) { @@ -161,7 +161,7 @@ namespace AMDiS { return(count); } - int Parameters::getGlobalParameter(int flag, const ::std::string& key, ::std::string* param) + int Parameters::getGlobalParameter(int flag, const std::string& key, std::string* param) { static char tempParam[255]; TEST_EXIT(param)("no parameter\n"); @@ -171,20 +171,20 @@ namespace AMDiS { return result; } - void Parameters::read(const ::std::string& aFilename, - const ::std::string& maxKey) + void Parameters::read(const std::string& aFilename, + const std::string& maxKey) { FUNCNAME("Parameters::read()"); char line[256]; int nLine = 0; - ::std::string key, parameter; - ::std::string actfile; + std::string key, parameter; + std::string actfile; if (aFilename.size() == 0) return; - singlett->inputFile.open(aFilename.c_str(), ::std::ios::in); + singlett->inputFile.open(aFilename.c_str(), std::ios::in); if (!inputFile.is_open()) { ERROR("init-file can't be opened\n"); return; @@ -215,22 +215,22 @@ namespace AMDiS { return; } - const ::std::string& Parameters::getActFile(const ::std::string& aFilename) + const std::string& Parameters::getActFile(const std::string& aFilename) { FUNCNAME("Parameters::getActFile()"); - ::std::list< ::std::string >::iterator i; - ::std::string actfile; + std::list< std::string >::iterator i; + std::string actfile; for (i = filenames.begin(); i != filenames.end(); i++) if (aFilename==*i) break; if (i != filenames.end()) { - return(const_cast<const ::std::string&>(*i)); + return(const_cast<const std::string&>(*i)); } else { filenames.push_back(aFilename); - return(const_cast<const ::std::string&>(aFilename)); + return(const_cast<const std::string&>(aFilename)); } } @@ -261,15 +261,15 @@ namespace AMDiS { } - const ::std::string Parameters::getKey(const ::std::string& s, int nLine, - const ::std::string& aFilename) + const std::string Parameters::getKey(const std::string& s, int nLine, + const std::string& aFilename) { FUNCNAME("Parameters::getKey()"); - ::std::string fn, key=""; + std::string fn, key=""; char c; int i, epos; - ::std::string h= " \t\r\f"; + std::string h= " \t\r\f"; int pos = 0; pos = s.find_first_not_of(" \t\f\r"); //skip Blank @@ -346,15 +346,15 @@ namespace AMDiS { return(key); } - const ::std::string Parameters::getPar(const ::std::string& key, - const ::std::string& si, int *nl, - const ::std::string& fn) + const std::string Parameters::getPar(const std::string& key, + const std::string& si, int *nl, + const std::string& fn) { FUNCNAME("Parameters::getPar"); int i, pos,ol = *nl; - ::std::string inp; - ::std::string s=si; - ::std::string parameter=""; + std::string inp; + std::string s=si; + std::string parameter=""; pos=s.find(':'); pos=s.find_first_not_of(" \r\f\t",pos+1); @@ -382,7 +382,7 @@ namespace AMDiS { { parameter+= ' '; i=pos=s.find_first_not_of(" \r\t\f", i); - if(i == static_cast<int>(::std::string::npos)) { + if(i == static_cast<int>(std::string::npos)) { i = parameter.length()-1; break; } @@ -409,11 +409,11 @@ namespace AMDiS { return(parameter); } - void Parameters::addParam(const ::std::string& key, - const ::std::string& parameter, - const ::std::string& actfile, + void Parameters::addParam(const std::string& key, + const std::string& parameter, + const std::string& actfile, int nLine, - const ::std::string& fname) + const std::string& fname) { FUNCNAME("Parameters::addParam()"); unsigned size_k, size_p; @@ -423,7 +423,7 @@ namespace AMDiS { size_k = key.size()+1; size_p = parameter.size()+1; - ::std::vector<param>::iterator it; + std::vector<param>::iterator it; for (it = allParam.begin(); it != allParam.end(); it++) { if ((scmp = key.compare((*it).key)) >=0 ) break; @@ -467,9 +467,9 @@ namespace AMDiS { initIntern(); - ::std::cout << "SIZE: " << singlett->allParam.size() << ::std::endl; + std::cout << "SIZE: " << singlett->allParam.size() << std::endl; - ::std::vector<param>::iterator it; + std::vector<param>::iterator it; for (it = singlett->allParam.begin(); it != singlett->allParam.end(); it++) { MSG("%s: %s\n", (*it).key.data(), (*it).parameters.data()); if (0 < (*it).funcName.size()) { @@ -485,20 +485,20 @@ namespace AMDiS { } - void Parameters::init(int p, ::std::string fn, const char *flags) + void Parameters::init(int p, std::string fn, const char *flags) { FUNCNAME("Parameters::init()"); int val; - ::std::ostringstream tmp_file; - ::std::ofstream cpp_flags; - ::std::ofstream call_cpp; - ::std::string file; - ::std::ofstream outFile; - ::std::string lfn = fn; - ::std::string::size_type fpos= lfn.find('/'); - - if (fpos == ::std::string::npos) { + std::ostringstream tmp_file; + std::ofstream cpp_flags; + std::ofstream call_cpp; + std::string file; + std::ofstream outFile; + std::string lfn = fn; + std::string::size_type fpos= lfn.find('/'); + + if (fpos == std::string::npos) { fpos = 0; } else { ++fpos; @@ -523,7 +523,7 @@ namespace AMDiS { if (NULL == flags) { singlett->read(fn); } else { - singlett->inputFile.open(fn.data(), ::std::ios::in); + singlett->inputFile.open(fn.data(), std::ios::in); if (!(singlett->inputFile.rdstate())) { ERROR("can not read from file %s\n", fn.data()); return; @@ -653,7 +653,7 @@ namespace AMDiS { return(1); } - int Parameters::binSearch(const ::std::string& key, int n_keys) + int Parameters::binSearch(const std::string& key, int n_keys) { int cond, left, right, mid; @@ -677,8 +677,8 @@ namespace AMDiS { - void Parameters::addGlobalParameter(int p, const ::std::string key, - const ::std::string par, const char *fname, + void Parameters::addGlobalParameter(int p, const std::string key, + const std::string par, const char *fname, const char *file, int line) { FUNCNAME("Parameters::addGlobalParameter()"); @@ -690,7 +690,7 @@ namespace AMDiS { if ((0 == key.size()) || (0 == par.size())) return; - singlett->addParam(key, par, ::std::string(file), line, fname); + singlett->addParam(key, par, std::string(file), line, fname); val = 10; // defualt for level of information getGlobalParameter(0, "level of information", "%d", &val); @@ -713,18 +713,18 @@ namespace AMDiS { - const char *Parameters::getNextWord(::std::string *s) const + const char *Parameters::getNextWord(std::string *s) const { static char Val[512]; int wb1,wb2; wb1 = s->find_first_not_of(" "); - if (wb1 == static_cast<int>(::std::string::npos)) { + if (wb1 == static_cast<int>(std::string::npos)) { return NULL; } wb2 = s->find_first_of(" "); - if (wb2 == static_cast<int>(::std::string::npos)) { + if (wb2 == static_cast<int>(std::string::npos)) { wb2 = s->length(); } @@ -735,27 +735,27 @@ namespace AMDiS { return(Val); } - void Parameters::save(const ::std::string file, int info) + void Parameters::save(const std::string file, int info) { - ::std::ofstream fp; - ::std::vector<param>::iterator it; + std::ofstream fp; + std::vector<param>::iterator it; initIntern(); - fp.open(file.data(), ::std::ios::out); + fp.open(file.data(), std::ios::out); if (0 != fp.rdstate()) return; for (it = singlett->allParam.begin(); it !=singlett->allParam.end(); it++) { - fp << (*it).key << ": " << (*it).parameters << ::std::endl; + fp << (*it).key << ": " << (*it).parameters << std::endl; if (info) { if (((*it).funcName.size()) > 0) { fp << "%initialized by " << (*it).funcName << "() on line " << - (*it).lineNo << " of file \"" << (*it).filename << "\"" << ::std::endl; + (*it).lineNo << " of file \"" << (*it).filename << "\"" << std::endl; } else if ((*it).filename.size() > 0) { fp << "%initialized on line "<< (*it).lineNo << - " of file \""<< (*it).filename << "\""<< ::std::endl; + " of file \""<< (*it).filename << "\""<< std::endl; } } } diff --git a/AMDiS/src/Parameters.h b/AMDiS/src/Parameters.h index b8b3fc777813f2b4603fe3fef7b609ba3d2e4814..7e7c354f1af346533de2af10bf352929ebbe74ef 100644 --- a/AMDiS/src/Parameters.h +++ b/AMDiS/src/Parameters.h @@ -75,7 +75,7 @@ namespace AMDiS { * file and including files specified by \#include"...". */ static void init(int print, - ::std::string filename, + std::string filename, const char *flags=NULL); /** \brief @@ -100,8 +100,8 @@ namespace AMDiS { * If p is non zero, the parameter list is printed. */ static void addGlobalParameter(int p, - const ::std::string key, - const ::std::string par, + const std::string key, + const std::string par, const char *fname = NULL, const char *file = NULL, int line = 0); @@ -181,7 +181,7 @@ namespace AMDiS { * \see GET_PARAMETER */ static int getGlobalParameter(int flag, - const ::std::string& key, + const std::string& key, const char *format, ...); @@ -189,8 +189,8 @@ namespace AMDiS { * Like getGlobalParameter(flag, key, "%s", param->c_str()). */ static int getGlobalParameter(int flag, - const ::std::string& key, - ::std::string *param); + const std::string& key, + std::string *param); /** \brief * Prints all defined parameters to the message stream @@ -221,7 +221,7 @@ namespace AMDiS { * location of the initialization is supplied for each parameter as a * comment; no original comment is written, since these are not stored. */ - static void save(const ::std::string file, int info); + static void save(const std::string file, int info); /** \brief * Checks whether parameters are initialized. if not, call init() @@ -236,7 +236,7 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out) { + void serialize(std::ostream &out) { out.write(reinterpret_cast<const char*>(¶mInfo), sizeof(int)); out.write(reinterpret_cast<const char*>(&msgInfo), sizeof(int)); out.write(reinterpret_cast<const char*>(&msgWait), sizeof(int)); @@ -247,7 +247,7 @@ namespace AMDiS { } }; - void deserialize(::std::istream &in) { + void deserialize(std::istream &in) { in.read(reinterpret_cast<char*>(¶mInfo), sizeof(int)); in.read(reinterpret_cast<char*>(&msgInfo), sizeof(int)); in.read(reinterpret_cast<char*>(&msgWait), sizeof(int)); @@ -279,10 +279,10 @@ namespace AMDiS { virtual ~param() {}; - param(const ::std::string& nkey, - const ::std::string& nparameters, - const ::std::string& nfilename, - const ::std::string& nfuncName, + param(const std::string& nkey, + const std::string& nparameters, + const std::string& nfilename, + const std::string& nfuncName, int line) : key(nkey), parameters(nparameters), @@ -291,7 +291,7 @@ namespace AMDiS { lineNo(line) {}; - param(const ::std::string& k): key(k) {}; + param(const std::string& k): key(k) {}; int operator==(const class param& aParam) const; @@ -301,15 +301,15 @@ namespace AMDiS { // ===== Serializable implementation ===== - void serialize(::std::ostream &out) { - out << key << ::std::endl; - out << parameters << ::std::endl; - out << filename << ::std::endl; - out << funcName << ::std::endl; + void serialize(std::ostream &out) { + out << key << std::endl; + out << parameters << std::endl; + out << filename << std::endl; + out << funcName << std::endl; out.write(reinterpret_cast<const char*>(&lineNo), sizeof(int)); }; - void deserialize(::std::istream &in) { + void deserialize(std::istream &in) { in >> key; in.get(); in >> parameters; in.get(); in >> filename; in.get(); @@ -318,38 +318,38 @@ namespace AMDiS { }; public: - ::std::string key; - ::std::string parameters; - ::std::string filename; - ::std::string funcName; + std::string key; + std::string parameters; + std::string filename; + std::string funcName; int lineNo; }; static const char comment; - ::std::string buffer; + std::string buffer; inline bool isBlankChar(const char s) {return (s==' '||s=='\t'||s =='\f'||s=='\r'); }; - const char *getNextWord(::std::string *s) const; + const char *getNextWord(std::string *s) const; - void read(const ::std::string& filename,const ::std::string& maxKey=""); + void read(const std::string& filename,const std::string& maxKey=""); - const ::std::string& getActFile(const ::std::string& filename); + const std::string& getActFile(const std::string& filename); - const ::std::string getKey(const ::std::string& s, + const std::string getKey(const std::string& s, int nLine, - const ::std::string& filename); + const std::string& filename); - const ::std::string getPar(const ::std::string& key, - const ::std::string& s, + const std::string getPar(const std::string& key, + const std::string& s, int *nl, - const ::std::string& fn); + const std::string& fn); - void addParam(const ::std::string& key, - const ::std::string& parameter, - const ::std::string& actfile, + void addParam(const std::string& key, + const std::string& parameter, + const std::string& actfile, int nLine, - const ::std::string& fname); + const std::string& fname); Parameters() : paramInfo(1), @@ -361,22 +361,22 @@ namespace AMDiS { static void initIntern(); - int binSearch(const ::std::string& key, int n_keys); + int binSearch(const std::string& key, int n_keys); void swap(int i, int j); void qsort(int left, int right); private: - ::std::string cppFlags; - ::std::ifstream inputFile; - ::std::list< ::std::string> filenames; + std::string cppFlags; + std::ifstream inputFile; + std::list< std::string> filenames; size_t maxFiles; - ::std::string filename; + std::string filename; int paramInfo; int msgInfo; int msgWait; - ::std::vector<param> allParam; + std::vector<param> allParam; }; diff --git a/AMDiS/src/PardisoSolver.cc b/AMDiS/src/PardisoSolver.cc index 907294ef3b2d72489fe97643c5081d5cce4b94f7..f4ee3a8ffd916cb7b5192299cdb40eb993c15129 100644 --- a/AMDiS/src/PardisoSolver.cc +++ b/AMDiS/src/PardisoSolver.cc @@ -29,7 +29,7 @@ namespace AMDiS { // The new matrix has to be stored in compressed row format, therefore // the rows are collected. - ::std::vector< ::std::vector< MatEntry > > rows(newMatrixSize, ::std::vector<MatEntry>(0)); + std::vector< std::vector< MatEntry > > rows(newMatrixSize, std::vector<MatEntry>(0)); // Counter for the number of non-zero elements in the new matrix. int nElements = 0; @@ -71,7 +71,7 @@ namespace AMDiS { int rowCounter = 0; ia[0] = 1; - for (::std::vector< ::std::vector< MatEntry > >::iterator rowsIt = rows.begin(); + for (std::vector< std::vector< MatEntry > >::iterator rowsIt = rows.begin(); rowsIt != rows.end(); ++rowsIt) { @@ -79,7 +79,7 @@ namespace AMDiS { ia[rowCounter + 1] = ia[rowCounter] + (*rowsIt).size(); - for (::std::vector<MatEntry>::iterator rowIt = (*rowsIt).begin(); + for (std::vector<MatEntry>::iterator rowIt = (*rowsIt).begin(); rowIt != (*rowsIt).end(); rowIt++) { a[elCounter] = (*rowIt).entry; diff --git a/AMDiS/src/PardisoSolver.h b/AMDiS/src/PardisoSolver.h index 96593bcaaa0b11a3dc0e38092d24845b6d872e18..11af655dbc67bd97fc4cb6cbd9fc51b58c5d55d6 100644 --- a/AMDiS/src/PardisoSolver.h +++ b/AMDiS/src/PardisoSolver.h @@ -76,7 +76,7 @@ namespace AMDiS { /** \brief * constructor */ - PardisoSolver(::std::string name); + PardisoSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/PardisoSolver.hh b/AMDiS/src/PardisoSolver.hh index 3baad421852e73f3d5d46473e204fe5a89810aea..15bf194febe9af172df2b00ba28298248527f6f7 100644 --- a/AMDiS/src/PardisoSolver.hh +++ b/AMDiS/src/PardisoSolver.hh @@ -3,7 +3,7 @@ namespace AMDiS { template<typename VectorType> - PardisoSolver<VectorType>::PardisoSolver(::std::string name) + PardisoSolver<VectorType>::PardisoSolver(std::string name) : OEMSolver<VectorType>(name) {} diff --git a/AMDiS/src/PeriodicBC.cc b/AMDiS/src/PeriodicBC.cc index 33b2f7536e8cc852fab26b543e21cd3f17754069..1c70953db9a5b5be35103f915170e435a157638c 100644 --- a/AMDiS/src/PeriodicBC.cc +++ b/AMDiS/src/PeriodicBC.cc @@ -9,13 +9,13 @@ namespace AMDiS { - ::std::vector<PeriodicDOFMapping*> PeriodicDOFMapping::mappings_; + std::vector<PeriodicDOFMapping*> PeriodicDOFMapping::mappings_; PeriodicDOFMapping* PeriodicDOFMapping::providePeriodicDOFMapping(const BasisFunction *basFcts) { - ::std::vector<PeriodicDOFMapping*>::iterator it; - ::std::vector<PeriodicDOFMapping*>::iterator end = mappings_.end(); + std::vector<PeriodicDOFMapping*>::iterator it; + std::vector<PeriodicDOFMapping*>::iterator end = mappings_.end(); for (it = mappings_.begin(); it != end; ++it) { if ((*it)->basFcts_ == basFcts) { return *it; @@ -42,7 +42,7 @@ namespace AMDiS { PeriodicDOFMapping::~PeriodicDOFMapping() { - ::std::map<DimVec<int>, DegreeOfFreedom*, DimVecLess<int> >::iterator it; + std::map<DimVec<int>, DegreeOfFreedom*, DimVecLess<int> >::iterator it; for (it = dofPermutation_.begin(); it != dofPermutation_.end(); ++it) { if (it->second) { FREE_MEMORY(it->second, DegreeOfFreedom, basFcts_->getNumber()); @@ -202,8 +202,8 @@ namespace AMDiS { masterMatrix_ = NULL; } - ::std::vector< ::std::vector<MatEntry> >::iterator rowIt; - ::std::vector< ::std::vector<MatEntry> >::iterator rowEnd = matrix->end(); + std::vector< std::vector<MatEntry> >::iterator rowIt; + std::vector< std::vector<MatEntry> >::iterator rowEnd = matrix->end(); int colIndex, rowSize; int row, col, newRow, newCol; double entry, *newEntryPtr; diff --git a/AMDiS/src/PeriodicBC.h b/AMDiS/src/PeriodicBC.h index 46a6f57ec597adc4f607abcbda9a1cc8c0ca8b82..bdbbe1437459171aa4bb185af31cf962d2ec616b 100644 --- a/AMDiS/src/PeriodicBC.h +++ b/AMDiS/src/PeriodicBC.h @@ -68,10 +68,10 @@ namespace AMDiS { protected: const BasisFunction *basFcts_; - ::std::map<DimVec<int>, DegreeOfFreedom*, DimVecLess<int> > dofPermutation_; - ::std::map<DimVec<double>, int, DimVecLess<double> > indexOfCoords_; + std::map<DimVec<int>, DegreeOfFreedom*, DimVecLess<int> > dofPermutation_; + std::map<DimVec<double>, int, DimVecLess<double> > indexOfCoords_; - static ::std::vector<PeriodicDOFMapping*> mappings_; + static std::vector<PeriodicDOFMapping*> mappings_; }; // ============================================================================ diff --git a/AMDiS/src/PeriodicInfo.h b/AMDiS/src/PeriodicInfo.h index d0cf030e92f440a5d97adef279dbc9c6747a55f8..3c7bae6d3df0f21eb68729b9fec65fad48c23222 100644 --- a/AMDiS/src/PeriodicInfo.h +++ b/AMDiS/src/PeriodicInfo.h @@ -37,7 +37,7 @@ namespace AMDiS { int neighIndex; - ::std::map<int, int> vertexMap; + std::map<int, int> vertexMap; }; } diff --git a/AMDiS/src/PeriodicMap.h b/AMDiS/src/PeriodicMap.h index f77e00474c44efebcd68a6d149a45a5f6d48d4f8..4b85ff94e33afa8d40f8a6fcd9e4d2a2b235224c 100644 --- a/AMDiS/src/PeriodicMap.h +++ b/AMDiS/src/PeriodicMap.h @@ -47,7 +47,7 @@ namespace AMDiS { } // replace entries equal to key - ::std::map<DegreeOfFreedom, DegreeOfFreedom>::iterator it; + std::map<DegreeOfFreedom, DegreeOfFreedom>::iterator it; for (it = periodicMap.begin(); it != periodicMap.end(); ++it) { if (it->second == key) { it->second = entry; @@ -65,7 +65,7 @@ namespace AMDiS { }; DegreeOfFreedom getEntry(DegreeOfFreedom key) { - ::std::map<DegreeOfFreedom, DegreeOfFreedom>::iterator it; + std::map<DegreeOfFreedom, DegreeOfFreedom>::iterator it; it = periodicMap.find(key); if (it != periodicMap.end()) { return it->second; @@ -77,7 +77,7 @@ namespace AMDiS { protected: - ::std::map<DegreeOfFreedom, DegreeOfFreedom> periodicMap; + std::map<DegreeOfFreedom, DegreeOfFreedom> periodicMap; }; } diff --git a/AMDiS/src/Preconditioner.h b/AMDiS/src/Preconditioner.h index 88a341ec6bd3e1f58b25b8712bf8673e346b8739..651fea5d70225408fa0fb78bfe5738e705d9a2f4 100644 --- a/AMDiS/src/Preconditioner.h +++ b/AMDiS/src/Preconditioner.h @@ -135,7 +135,7 @@ namespace AMDiS { * * Base class for DOFVector preconditioners. */ - class PreconditionerScalStd : public Preconditioner< ::std::vector<double> > + class PreconditionerScalStd : public Preconditioner< std::vector<double> > { public: /** \brife @@ -147,7 +147,7 @@ namespace AMDiS { /** \brief * Sets \ref matrix. */ - inline void setMatrix(::std::vector< ::std::vector<MatEntry> > *m) { + inline void setMatrix(std::vector< std::vector<MatEntry> > *m) { matrix = m; }; @@ -156,7 +156,7 @@ namespace AMDiS { * Matrix used for preconditioning. */ - ::std::vector< ::std::vector<MatEntry> > *matrix; + std::vector< std::vector<MatEntry> > *matrix; }; @@ -191,7 +191,7 @@ namespace AMDiS { /** \brief * Sets \ref problem */ - void setName(::std::string name) { + void setName(std::string name) { name_ = name; }; @@ -199,7 +199,7 @@ namespace AMDiS { int size; int row; - ::std::string name_; + std::string name_; }; diff --git a/AMDiS/src/ProblemInstat.h b/AMDiS/src/ProblemInstat.h index 5661fbf98a690044f659548708734393f73a82d0..351dc864ae030d27432fb9c529345372bd28cc29 100644 --- a/AMDiS/src/ProblemInstat.h +++ b/AMDiS/src/ProblemInstat.h @@ -47,7 +47,7 @@ namespace AMDiS { /** \brief * Constructor. */ - ProblemInstat(::std::string name_, + ProblemInstat(std::string name_, ProblemStatBase *initialProb) : name(name_), initialProblem(initialProb ? initialProb : this) @@ -112,7 +112,7 @@ namespace AMDiS { /** \brief * Returns \ref name. */ - inline const ::std::string& getName() { + inline const std::string& getName() { return name; }; @@ -130,7 +130,7 @@ namespace AMDiS { /** \brief * Name of the problem. */ - ::std::string name; + std::string name; ProblemStatBase *initialProblem; }; @@ -208,10 +208,10 @@ namespace AMDiS { virtual bool existsDelayedCalculation(); - virtual void serialize(::std::ostream &out) {}; + virtual void serialize(std::ostream &out) {}; - virtual void deserialize(::std::istream &in) {}; + virtual void deserialize(std::istream &in) {}; protected: /** \brief @@ -299,9 +299,9 @@ namespace AMDiS { virtual bool existsDelayedCalculation(); - virtual void serialize(::std::ostream &out) {}; + virtual void serialize(std::ostream &out) {}; - virtual void deserialize(::std::istream &in) {}; + virtual void deserialize(std::istream &in) {}; protected: /** \brief diff --git a/AMDiS/src/ProblemInterpolVec.cc b/AMDiS/src/ProblemInterpolVec.cc index a4bc0c66aa9d8483418f32609e0231ca16942a08..52225b95a4b93d6630d1e2cfec745011c7fd0106 100644 --- a/AMDiS/src/ProblemInterpolVec.cc +++ b/AMDiS/src/ProblemInterpolVec.cc @@ -8,8 +8,8 @@ namespace AMDiS { ProblemInterpolVec::ProblemInterpolVec(const char *name_, ProblemVec *spaceProblem, - ::std::vector<AbstractFunction<double, WorldVector<double> >*> *fct, - ::std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdFct) + std::vector<AbstractFunction<double, WorldVector<double> >*> *fct, + std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdFct) : ProblemVec(name_), interpolFct_(fct), grdInterpolFct_(grdFct) diff --git a/AMDiS/src/ProblemInterpolVec.h b/AMDiS/src/ProblemInterpolVec.h index 6b29853c99a17c0cb1e310261126ba02ad94419f..a4e6dec83116cb072266c461833be460702200ee 100644 --- a/AMDiS/src/ProblemInterpolVec.h +++ b/AMDiS/src/ProblemInterpolVec.h @@ -43,8 +43,8 @@ namespace AMDiS { */ ProblemInterpolVec(const char *name_, ProblemVec *spaceProblem, - ::std::vector<AbstractFunction<double, WorldVector<double> >*> *fct, - ::std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdFct); + std::vector<AbstractFunction<double, WorldVector<double> >*> *fct, + std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdFct); /** \brief * no system assemblage. @@ -75,12 +75,12 @@ namespace AMDiS { /** \brief * function to interpolate. */ - ::std::vector<AbstractFunction<double, WorldVector<double> >*> *interpolFct_; + std::vector<AbstractFunction<double, WorldVector<double> >*> *interpolFct_; /** \brief * gradient of \ref interpolFct_. Used for H1 error in estimate(). */ - ::std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdInterpolFct_; + std::vector<AbstractFunction<WorldVector<double>, WorldVector<double> >*> *grdInterpolFct_; }; } diff --git a/AMDiS/src/ProblemIterationInterface.h b/AMDiS/src/ProblemIterationInterface.h index d8d6c266230223724708acaf49cf2bc1606ca59c..d2f6e7e316cdaccb0404373a692ca89dda10b54a 100644 --- a/AMDiS/src/ProblemIterationInterface.h +++ b/AMDiS/src/ProblemIterationInterface.h @@ -84,22 +84,22 @@ namespace AMDiS { /** \brief * Returns the problem with the given name. */ - virtual ProblemStatBase *getProblem(const ::std::string& name) { return NULL; }; + virtual ProblemStatBase *getProblem(const std::string& name) { return NULL; }; /** \brief * Returns the name of the problem. */ - virtual const ::std::string& getName() = 0; + virtual const std::string& getName() = 0; /** \brief * Function that serializes the problem plus information about the iteration. */ - virtual void serialize(::std::ostream &out) = 0; + virtual void serialize(std::ostream &out) = 0; /** \brief * Function that deserializes the problem plus information about the iteration. */ - virtual void deserialize(::std::istream &in) = 0; + virtual void deserialize(std::istream &in) = 0; }; } diff --git a/AMDiS/src/ProblemNonLin.cc b/AMDiS/src/ProblemNonLin.cc index e8e14545778c0527154dfb9ecc1335ca5e3dcd53..5f4bb9722bdd38d57341d9e06bd330acc219ed75 100644 --- a/AMDiS/src/ProblemNonLin.cc +++ b/AMDiS/src/ProblemNonLin.cc @@ -56,7 +56,7 @@ namespace AMDiS { void ProblemNonLinScal::createNonLinSolver() { // create non-linear solver - ::std::string nonLinSolverType("no"); + std::string nonLinSolverType("no"); GET_PARAMETER(0, name_ + "->nonlin solver", &nonLinSolverType); @@ -146,7 +146,7 @@ namespace AMDiS { void ProblemNonLinVec::createNonLinSolver() { // create non-linear solver - ::std::string nonLinSolverType("no"); + std::string nonLinSolverType("no"); GET_PARAMETER(0, name_ + "->nonlin solver", &nonLinSolverType); @@ -158,7 +158,7 @@ namespace AMDiS { nonLinSolverCreator->setNonLinUpdater(updater_); nonLinSolver_ = nonLinSolverCreator->create(); nonLinSolver_->setVectorCreator(NEW SystemVector::Creator("temp", - componentSpaces_, + componentSpaces, nComponents)); } @@ -179,8 +179,8 @@ namespace AMDiS { for (int i = 0; i < nComponents; i++) { MSG("%d DOFs for %s\n", - componentSpaces_[i]->getAdmin()->getUsedSize(), - componentSpaces_[i]->getName().c_str()); + componentSpaces[i]->getAdmin()->getUsedSize(), + componentSpaces[i]->getName().c_str()); } TraverseStack stack; diff --git a/AMDiS/src/ProblemNonLin.h b/AMDiS/src/ProblemNonLin.h index 56918a6c8f1d7f258cc82c42c2742bbea2882066..19e7538775582a36fa281fea3624c3b520615a44 100644 --- a/AMDiS/src/ProblemNonLin.h +++ b/AMDiS/src/ProblemNonLin.h @@ -50,7 +50,7 @@ namespace AMDiS { /** \brief * Constructs a ProblemNonLin with given name. */ - ProblemNonLinScal(const ::std::string& name_) + ProblemNonLinScal(const std::string& name_) : ProblemScal(name_.c_str()), u0_(NULL), nonLinSolver_(NULL), @@ -162,7 +162,7 @@ namespace AMDiS { /** \brief * Constructs a ProblemNonLin with given name. */ - ProblemNonLinVec(const ::std::string& name_) + ProblemNonLinVec(const std::string& name_) : ProblemVec(name_.c_str()), nonLinSolver_(NULL), updater_(NULL) diff --git a/AMDiS/src/ProblemScal.cc b/AMDiS/src/ProblemScal.cc index d632c7ad78058e5d461a6f3fb4c6648eed303b77..8a46a287da050187c0e54b9a73e891f5c5b6eaf1 100644 --- a/AMDiS/src/ProblemScal.cc +++ b/AMDiS/src/ProblemScal.cc @@ -145,13 +145,12 @@ namespace AMDiS { GET_PARAMETER(0, name_ + "->info", "%d", &info_); GET_PARAMETER(0, name_ + "->mesh", &meshName); - TEST_EXIT(meshName != "") - ("no mesh name spezified\n"); + TEST_EXIT(meshName != "")("no mesh name specified\n"); // get problem dimension int dim = 0; GET_PARAMETER(0, name_ + "->dim", "%d", &dim); - TEST_EXIT(dim)("no problem dimension spezified!\n"); + TEST_EXIT(dim)("no problem dimension specified!\n"); // create the mesh mesh_ = NEW Mesh(meshName, dim); diff --git a/AMDiS/src/ProblemStatBase.h b/AMDiS/src/ProblemStatBase.h index f068671ff295b213b1c454c4ae375855a548ccf6..264de49fe4f8e392f48f7f77da64c04f948061a9 100644 --- a/AMDiS/src/ProblemStatBase.h +++ b/AMDiS/src/ProblemStatBase.h @@ -130,17 +130,17 @@ namespace AMDiS { /** \brief * Returns the name of the problem. */ - virtual const ::std::string& getName() = 0; + virtual const std::string& getName() = 0; /** \brief * Function that serializes the problem plus information about the iteration. */ - virtual void serialize(::std::ostream &out) = 0; + virtual void serialize(std::ostream &out) = 0; /** \brief * Function that deserializes the problem plus information about the iteration. */ - virtual void deserialize(::std::istream &in) = 0; + virtual void deserialize(std::istream &in) = 0; }; } diff --git a/AMDiS/src/ProblemTimeInterface.h b/AMDiS/src/ProblemTimeInterface.h index 707394398f14c3ee1ad2e2c154a484296949b873..ca71227cbad1051a8116e08c1375b31a5934da67 100644 --- a/AMDiS/src/ProblemTimeInterface.h +++ b/AMDiS/src/ProblemTimeInterface.h @@ -83,12 +83,12 @@ namespace AMDiS { /** \brief * Function that serializes the problem plus information about the iteration. */ - virtual void serialize(::std::ostream &out) = 0; + virtual void serialize(std::ostream &out) = 0; /** \brief * Function that deserializes the problem plus information about the iteration. */ - virtual void deserialize(::std::istream &in) = 0; + virtual void deserialize(std::istream &in) = 0; }; } diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index f8ebc89a9291f3ba2ae874e94a0d39d640a647c8..398f78bfcccf5ac027c646dbe73ecdc0f51b64a5 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -55,7 +55,7 @@ namespace AMDiS { WARNING("no mesh created\n"); // === create fespace === - if (feSpaces_.size() != 0) { + if (feSpaces.size() != 0) { WARNING("feSpaces already created\n"); } else { if (initFlag.isSet(INIT_FE_SPACE) || @@ -64,12 +64,12 @@ namespace AMDiS { } if (adoptProblem && (adoptFlag.isSet(INIT_FE_SPACE) || adoptFlag.isSet(INIT_SYSTEM))) { - feSpaces_ = adoptProblem->getFESpaces(); - componentSpaces_ = adoptProblem->componentSpaces_; + feSpaces = adoptProblem->getFESpaces(); + componentSpaces = adoptProblem->componentSpaces; } } - if (feSpaces_.size() == 0) + if (feSpaces.size() == 0) WARNING("no feSpace created\n"); // === create system === @@ -186,10 +186,10 @@ namespace AMDiS { std::string meshName(""); GET_PARAMETER(0, name_ + "->mesh", &meshName); - TEST_EXIT(meshName != "")("no mesh name spezified\n"); + TEST_EXIT(meshName != "")("no mesh name specified\n"); int dim = 0; GET_PARAMETER(0, name_ + "->dim", "%d", &dim); - TEST_EXIT(dim)("no problem dimension spezified!\n"); + TEST_EXIT(dim)("no problem dimension specified!\n"); for (int i = 0; i < nComponents; i++) { sprintf(number, "%d", i); @@ -233,15 +233,15 @@ namespace AMDiS { std::map< std::pair<Mesh*, int>, FiniteElemSpace*> feSpaceMap; int dim = -1; GET_PARAMETER(0, name_ + "->dim", "%d", &dim); - TEST_EXIT(dim != -1)("no problem dimension spezified!\n"); + TEST_EXIT(dim != -1)("no problem dimension specified!\n"); - componentSpaces_.resize(nComponents, NULL); + componentSpaces.resize(nComponents, NULL); for (int i = 0; i < nComponents; i++) { sprintf(number, "%d", i); GET_PARAMETER(0, name_ + "->polynomial degree[" + number + "]","%d", °ree); - TEST_EXIT(componentSpaces_[i] == NULL)("feSpace already created\n"); + TEST_EXIT(componentSpaces[i] == NULL)("feSpace already created\n"); if (feSpaceMap[std::pair<Mesh*, int>(componentMeshes_[i], degree)] == NULL) { FiniteElemSpace *newFESpace = @@ -250,9 +250,9 @@ namespace AMDiS { componentMeshes_[i], name_ + "->feSpace"); feSpaceMap[std::pair<Mesh*, int>(componentMeshes_[i], degree)] = newFESpace; - feSpaces_.push_back(newFESpace); + feSpaces.push_back(newFESpace); } - componentSpaces_[i] = + componentSpaces[i] = feSpaceMap[std::pair<Mesh*, int>(componentMeshes_[i], degree)]; } @@ -276,20 +276,20 @@ namespace AMDiS { systemMatrix_ = NEW Matrix<DOFMatrix*>(nComponents, nComponents); systemMatrix_->set(NULL); - rhs_ = NEW SystemVector("rhs", componentSpaces_, nComponents); - solution_ = NEW SystemVector("solution", componentSpaces_, nComponents); + rhs_ = NEW SystemVector("rhs", componentSpaces, nComponents); + solution_ = NEW SystemVector("solution", componentSpaces, nComponents); char number[10]; std::string numberedName; for (i = 0; i < nComponents; i++) { - (*systemMatrix_)[i][i] = NEW DOFMatrix(componentSpaces_[i], - componentSpaces_[i], "A_ii"); + (*systemMatrix_)[i][i] = NEW DOFMatrix(componentSpaces[i], + componentSpaces[i], "A_ii"); (*systemMatrix_)[i][i]->setCoupleMatrix(false); sprintf(number, "[%d]", i); numberedName = "rhs" + std::string(number); - rhs_->setDOFVector(i, NEW DOFVector<double>(componentSpaces_[i], numberedName)); + rhs_->setDOFVector(i, NEW DOFVector<double>(componentSpaces[i], numberedName)); numberedName = name_ + std::string(number); - solution_->setDOFVector(i, NEW DOFVector<double>(componentSpaces_[i], + solution_->setDOFVector(i, NEW DOFVector<double>(componentSpaces[i], numberedName)); solution_->getDOFVector(i)->refineInterpol(true); solution_->getDOFVector(i)->setCoarsenOperation(COARSE_INTERPOL); @@ -374,7 +374,7 @@ namespace AMDiS { // === create vector creator === solver_->setVectorCreator(NEW SystemVector::Creator("temp", - componentSpaces_, + componentSpaces, nComponents)); } @@ -548,17 +548,28 @@ namespace AMDiS { double wtime = omp_get_wtime(); #endif - for (int i = 0; i < nComponents; i++) { - Estimator *scalEstimator = estimator_[i]; - - if (scalEstimator) { - scalEstimator->estimate(adaptInfo->getTimestep()); - adaptInfo->setEstSum(scalEstimator->getErrorSum(), i); - adaptInfo->setEstMax(scalEstimator->getErrorMax(), i); - adaptInfo->setTimeEstSum(scalEstimator->getTimeEst(), i); - adaptInfo->setTimeEstMax(scalEstimator->getTimeEstMax(), i); - } else { - WARNING("no estimator for component %d\n" , i); + if (computeExactError) { + for (int i = 0; i < nComponents; i++) { + DOFVector<double> *tmp = NEW DOFVector<double>(componentSpaces[i], "tmp"); + tmp->interpol(exactSolutionFcts[i]); + *tmp -= *(solution_->getDOFVector(i)); + double l2Error = tmp->L2Norm(); + MSG("L2 error = %.8e\n", l2Error); + DELETE tmp; + } + } else { + for (int i = 0; i < nComponents; i++) { + Estimator *scalEstimator = estimator_[i]; + + if (scalEstimator) { + scalEstimator->estimate(adaptInfo->getTimestep()); + adaptInfo->setEstSum(scalEstimator->getErrorSum(), i); + adaptInfo->setEstMax(scalEstimator->getErrorMax(), i); + adaptInfo->setTimeEstSum(scalEstimator->getTimeEst(), i); + adaptInfo->setTimeEstMax(scalEstimator->getTimeEstMax(), i); + } else { + WARNING("no estimator for component %d\n" , i); + } } } @@ -675,8 +686,8 @@ namespace AMDiS { for (int i = 0; i < nComponents; i++) { MSG("%d DOFs for %s\n", - componentSpaces_[i]->getAdmin()->getUsedSize(), - componentSpaces_[i]->getName().c_str()); + componentSpaces[i]->getAdmin()->getUsedSize(), + componentSpaces[i]->getName().c_str()); rhs_->getDOFVector(i)->set(0.0); for (int j = 0; j < nComponents; j++) { @@ -695,7 +706,7 @@ namespace AMDiS { #pragma omp parallel for #endif for (i = 0; i < nComponents; i++) { - const BasisFunction *basisFcts = componentSpaces_[i]->getBasisFcts(); + const BasisFunction *basisFcts = componentSpaces[i]->getBasisFcts(); for (int j = 0; j < nComponents; j++) { // Only if this variable is true, the current matrix will be assembled. @@ -862,8 +873,8 @@ namespace AMDiS { if (!(*systemMatrix_)[i][j]) { TEST_EXIT(i != j)("should have been created already\n"); - (*systemMatrix_)[i][j] = NEW DOFMatrix(componentSpaces_[i], - componentSpaces_[j], + (*systemMatrix_)[i][j] = NEW DOFMatrix(componentSpaces[i], + componentSpaces[j], ""); (*systemMatrix_)[i][j]->setCoupleMatrix(true); @@ -890,7 +901,7 @@ namespace AMDiS { DirichletBC *dirichlet = new DirichletBC(type, b, - componentSpaces_[system]); + componentSpaces[system]); for (int i = 0; i < nComponents; i++) { if (systemMatrix_ && (*systemMatrix_)[system][i]) { (*systemMatrix_)[system][i]->getBoundaryManager()->addBoundaryCondition(dirichlet); @@ -911,8 +922,8 @@ namespace AMDiS { NeumannBC *neumann = new NeumannBC(type, n, - componentSpaces_[row], - componentSpaces_[col]); + componentSpaces[row], + componentSpaces[col]); if (rhs_) rhs_->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(neumann); } @@ -925,8 +936,8 @@ namespace AMDiS { RobinBC *robin = new RobinBC(type, n, r, - componentSpaces_[row], - componentSpaces_[col]); + componentSpaces[row], + componentSpaces[col]); if (rhs_) rhs_->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(robin); @@ -939,7 +950,7 @@ namespace AMDiS { { FUNCNAME("ProblemVec::addPeriodicBC()"); - FiniteElemSpace *feSpace = componentSpaces_[row]; + FiniteElemSpace *feSpace = componentSpaces[row]; PeriodicBC *periodic = new PeriodicBC(type, feSpace); diff --git a/AMDiS/src/ProblemVec.h b/AMDiS/src/ProblemVec.h index aa3bada1ed33d1de47db5c74cef2b855c22c7156..39a27af898a478ac5218852adaf6de0e190c7dc0 100644 --- a/AMDiS/src/ProblemVec.h +++ b/AMDiS/src/ProblemVec.h @@ -71,7 +71,8 @@ namespace AMDiS { rightPrecon_(NULL), useGetBound_(true), info_(10), - allowFirstRef_(false) + allowFirstRef_(false), + computeExactError(false) { GET_PARAMETER(0, name_ + "->components", "%d", &nComponents); TEST_EXIT(nComponents > 0)("components not set!\n"); @@ -89,6 +90,8 @@ namespace AMDiS { assembledMatrix_[i][j] = false; } } + + exactSolutionFcts.resize(nComponents); }; /** \brief @@ -336,23 +339,23 @@ namespace AMDiS { */ inline FiniteElemSpace* getFESpace(int comp) { FUNCNAME("ProblemVec::getFESpace()"); - TEST_EXIT(comp < static_cast<int>(componentSpaces_.size()) && comp >= 0) + TEST_EXIT(comp < static_cast<int>(componentSpaces.size()) && comp >= 0) ("invalid component number\n"); - return componentSpaces_[comp]; + return componentSpaces[comp]; }; /** \brief - * Returns \ref feSpaces_. + * Returns \ref feSpaces. */ inline std::vector<FiniteElemSpace*> getFESpaces() { - return feSpaces_; + return feSpaces; }; /** \brief - * Returns \ref componentSpaces_; + * Returns \ref componentSpaces; */ inline std::vector<FiniteElemSpace*> getComponentFESpaces() { - return componentSpaces_; + return componentSpaces; } /** \brief @@ -448,7 +451,7 @@ namespace AMDiS { }; inline void setFESpace(FiniteElemSpace *feSpace, int comp) { - feSpaces_[comp] = feSpace; + feSpaces[comp] = feSpace; }; /** \brief @@ -487,6 +490,19 @@ namespace AMDiS { assembleMatrixOnlyOnce_[i][j] = value; } + void setExactSolutionFct(AbstractFunction<double, WorldVector<double> > *fct, + int component) { + exactSolutionFcts[component] = fct; + } + + AbstractFunction<double, WorldVector<double> > *getExactSolutionFct(int component) { + return exactSolutionFcts[component]; + } + + void setComputeExactError(bool v) { + computeExactError = v; + } + /** \} */ void writeResidualMesh(AdaptInfo *adaptInfo, const std::string name); @@ -521,7 +537,7 @@ namespace AMDiS { /** \brief * fe spaces of this problem. */ - std::vector<FiniteElemSpace*> feSpaces_; + std::vector<FiniteElemSpace*> feSpaces; /** \brief * meshes of this problem. @@ -531,7 +547,7 @@ namespace AMDiS { /** \brief * Pointer to the fe spaces for the different problem components */ - std::vector<FiniteElemSpace*> componentSpaces_; + std::vector<FiniteElemSpace*> componentSpaces; /** \brief * Pointer to the meshes for the different problem components @@ -640,6 +656,19 @@ namespace AMDiS { * Used for mesh traversal. */ static ProblemVec *traversePtr_; + + /** \brief + * This vectors stores pointers to functions defining the exact solution of + * the problem. This may be used to compute the real error of the computed + * solution. + */ + std::vector<AbstractFunction<double, WorldVector<double> >*> exactSolutionFcts; + + /** \brief + * If true, the error is not estimated but computed from the exact solution + * defined by \ref exactSolutionFcts. + */ + bool computeExactError; }; } diff --git a/AMDiS/src/Projection.cc b/AMDiS/src/Projection.cc index 1acec969c25476133cadb70039b5c275ca8d4331..ff761f192feb41103f5d44cc6f59727408522b33 100644 --- a/AMDiS/src/Projection.cc +++ b/AMDiS/src/Projection.cc @@ -2,6 +2,6 @@ namespace AMDiS { - ::std::map<int, Projection*> Projection::projectionMap_; + std::map<int, Projection*> Projection::projectionMap_; } diff --git a/AMDiS/src/Projection.h b/AMDiS/src/Projection.h index 7bd0f4662ecadf4a6bb6f9f9490a444e2d13f390..19e0d3cdec4625ba13f0443fa4e42b4ab5e6fff0 100644 --- a/AMDiS/src/Projection.h +++ b/AMDiS/src/Projection.h @@ -102,7 +102,7 @@ namespace AMDiS { /** \brief * Static mapping from ids to projection objects. Used in \ref getProjection(). */ - static ::std::map<int, Projection*> projectionMap_; + static std::map<int, Projection*> projectionMap_; }; } diff --git a/AMDiS/src/QPInfo.cc b/AMDiS/src/QPInfo.cc index 16016bad560d1b6603ad2900eb2cd1b12387f1e5..f7b0d1e9d6c910735255fc67073c85453fafc47f 100644 --- a/AMDiS/src/QPInfo.cc +++ b/AMDiS/src/QPInfo.cc @@ -4,7 +4,7 @@ namespace AMDiS { - ::std::map<const Quadrature*, QPInfo*> QPInfo::qpInfos_; + std::map<const Quadrature*, QPInfo*> QPInfo::qpInfos_; QPInfo::QPInfo(const Quadrature *quad) : quadrature_(quad), @@ -57,7 +57,7 @@ namespace AMDiS { numPoints_); } - ::std::map<const DOFVector<double>*, VecQPInfo*>::iterator + std::map<const DOFVector<double>*, VecQPInfo*>::iterator it, itEnd = vecQPInfos_.end(); for(it = vecQPInfos_.begin(); it != itEnd; ++it) { @@ -81,7 +81,7 @@ namespace AMDiS { grdLambdaNumPointsValid_ = 0; - ::std::map<const DOFVector<double>*, VecQPInfo*>::iterator + std::map<const DOFVector<double>*, VecQPInfo*>::iterator it, itEnd = vecQPInfos_.end(); for(it = vecQPInfos_.begin(); it != itEnd; ++it) { @@ -340,7 +340,7 @@ namespace AMDiS { void QPInfo::clearAllQPInfos() { - ::std::map<const Quadrature*, QPInfo*>::iterator + std::map<const Quadrature*, QPInfo*>::iterator it, itEnd = qpInfos_.end(); for(it = qpInfos_.begin(); it != itEnd; ++it) { diff --git a/AMDiS/src/QPInfo.h b/AMDiS/src/QPInfo.h index 2b3c94cfb81e9d47134e2558441a045299c2222c..9f0a5b82f02e4649fe931de10490f7073937a0bc 100644 --- a/AMDiS/src/QPInfo.h +++ b/AMDiS/src/QPInfo.h @@ -198,7 +198,7 @@ namespace AMDiS { /** \brief * Map of all vector infos */ - ::std::map<const DOFVector<double>*, VecQPInfo*> vecQPInfos_; + std::map<const DOFVector<double>*, VecQPInfo*> vecQPInfos_; /** \brief * element normal at quadrature points (array of pointers) @@ -233,7 +233,7 @@ namespace AMDiS { /** \brief * Static map of all QPInfos. Used by \ref provideQPInfo(). */ - static ::std::map<const Quadrature*, QPInfo*> qpInfos_; + static std::map<const Quadrature*, QPInfo*> qpInfos_; }; } diff --git a/AMDiS/src/QPsiPhi.cc b/AMDiS/src/QPsiPhi.cc index 800de1f96d013cf1d30bc9db5a1133068ca718e0..cb54ab5db381242d0b4b9e1d55357b20408ede40 100644 --- a/AMDiS/src/QPsiPhi.cc +++ b/AMDiS/src/QPsiPhi.cc @@ -15,13 +15,13 @@ namespace AMDiS { const double TOO_SMALL = 1.e-15; - ::std::list<Q11PsiPhi*> Q11PsiPhi::preList; - ::std::list<Q01PsiPhi*> Q01PsiPhi::preList; - ::std::list<Q00PsiPhi*> Q00PsiPhi::preList; - ::std::list<Q10PsiPhi*> Q10PsiPhi::preList; + std::list<Q11PsiPhi*> Q11PsiPhi::preList; + std::list<Q01PsiPhi*> Q01PsiPhi::preList; + std::list<Q00PsiPhi*> Q00PsiPhi::preList; + std::list<Q10PsiPhi*> Q10PsiPhi::preList; - ::std::list<Q0Psi*> Q0Psi::preList; - ::std::list<Q1Psi*> Q1Psi::preList; + std::list<Q0Psi*> Q0Psi::preList; + std::list<Q1Psi*> Q1Psi::preList; /****************************************************************************/ /* information about precomputed integrals of basis functions on the */ @@ -173,7 +173,7 @@ namespace AMDiS { const Quadrature *quadrat) { FUNCNAME("Q11PsiPhi::provideQ11PsiPhi"); - ::std::list<Q11PsiPhi*>::iterator list; + std::list<Q11PsiPhi*>::iterator list; if (!ps && !ph) return NULL; @@ -334,7 +334,7 @@ namespace AMDiS { const Quadrature *quadrat) { FUNCNAME("Q10PsiPhi::provideQ10PsiPhi"); - ::std::list<Q10PsiPhi*>::iterator list; + std::list<Q10PsiPhi*>::iterator list; if (!ps && !ph) return NULL; @@ -495,7 +495,7 @@ namespace AMDiS { const Quadrature *quadrat) { FUNCNAME("Q01PsiPhi::provideQ01PsiPhi"); - ::std::list<Q01PsiPhi*>::iterator list; + std::list<Q01PsiPhi*>::iterator list; if (!ps && !ph) return NULL; @@ -616,7 +616,7 @@ namespace AMDiS { const Quadrature *quadrat) { FUNCNAME("Q00PsiPhi::provideQ00PsiPhi"); - ::std::list<Q00PsiPhi*>::iterator list; + std::list<Q00PsiPhi*>::iterator list; if (!ps && !ph) return NULL; @@ -697,7 +697,7 @@ namespace AMDiS { Q0Psi* Q0Psi::provideQ0Psi(const BasisFunction *ps, const Quadrature *quadrat) { FUNCNAME("Q0Psi::provideQ0Psi"); - ::std::list<Q0Psi*>::iterator list; + std::list<Q0Psi*>::iterator list; if (!ps) return NULL; if (!quadrat) quadrat = Quadrature::provideQuadrature(ps->getDim(), @@ -823,7 +823,7 @@ namespace AMDiS { const Quadrature *quadrat) { FUNCNAME("Q1Psi::provideQ1Psi"); - ::std::list<Q1Psi*>::iterator list; + std::list<Q1Psi*>::iterator list; if (!ps) return NULL; diff --git a/AMDiS/src/QPsiPhi.h b/AMDiS/src/QPsiPhi.h index acfa4cb5e7042d8406be5fdcdbd4da014c0d5145..c41fb408e4a1087470017efcb511b74fdf731370 100644 --- a/AMDiS/src/QPsiPhi.h +++ b/AMDiS/src/QPsiPhi.h @@ -46,7 +46,7 @@ namespace AMDiS { * Used for the comparison of two QPsiPhi objects in find_if. */ template<typename T> - class compareQPsiPhi : public ::std::unary_function<bool, T*> + class compareQPsiPhi : public std::unary_function<bool, T*> { public: /** \brief @@ -86,7 +86,7 @@ namespace AMDiS { * Used for the comparison of two QPsi objects in find_if. */ template<typename T> - class compareQPsi : public ::std::unary_function<bool, T*> + class compareQPsi : public std::unary_function<bool, T*> { public: /** \brief @@ -241,7 +241,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q11PsiPhi objects */ - static ::std::list<Q11PsiPhi*> preList; + static std::list<Q11PsiPhi*> preList; /** \brief * Pointer to the first set of basis functions @@ -415,7 +415,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q11PsiPhi objects */ - static ::std::list<Q10PsiPhi*> preList; + static std::list<Q10PsiPhi*> preList; /** \brief * Pointer to the first set of basis functions @@ -585,7 +585,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q11PsiPhi objects */ - static ::std::list<Q01PsiPhi*> preList; + static std::list<Q01PsiPhi*> preList; /** \brief * Pointer to the first set of basis functions @@ -658,7 +658,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q11PsiPhi objects */ - static ::std::list<Q00PsiPhi*> preList; + static std::list<Q00PsiPhi*> preList; /** \brief * Pointer to the first set of basis functions @@ -749,7 +749,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q0Psi objects */ - static ::std::list<Q0Psi*> preList; + static std::list<Q0Psi*> preList; /** \brief * Pointer to the first set of basis functions @@ -914,7 +914,7 @@ namespace AMDiS { /** \brief * List of pointers to all Q1Psi objects */ - static ::std::list<Q1Psi*> preList; + static std::list<Q1Psi*> preList; /** \brief * Pointer to the first set of basis functions diff --git a/AMDiS/src/Quadrature.hh b/AMDiS/src/Quadrature.hh index 80a50a2e832608f364550053b40d33e84c45a161..50adc2c898a04a3003aa1d6a7019ac7fe9210945 100644 --- a/AMDiS/src/Quadrature.hh +++ b/AMDiS/src/Quadrature.hh @@ -26,7 +26,7 @@ namespace AMDiS { val = vec; } else { if (size < nPoints) { - int newSize = ::std::max(Quadrature::maxNQuadPoints[dim], nPoints); + int newSize = std::max(Quadrature::maxNQuadPoints[dim], nPoints); if(quadVec) DELETE [] quadVec; quadVec = NEW T[size](vecSize); size = newSize; @@ -73,7 +73,7 @@ namespace AMDiS { val = vec; } else { if(size < nPoints) { - int newSize = ::std::max(Quadrature::maxNQuadPoints[dim], nPoints); + int newSize = std::max(Quadrature::maxNQuadPoints[dim], nPoints); if(quadVec) DELETE [] quadVec; quadVec = NEW GrdT[newSize](vecSize); size = newSize; @@ -130,7 +130,7 @@ namespace AMDiS { val = vec; } else { if(size < nPoints) { - int newSize = ::std::max(Quadrature::maxNQuadPoints[dim], nPoints); + int newSize = std::max(Quadrature::maxNQuadPoints[dim], nPoints); if(quadVec) DELETE [] quadVec; quadVec = NEW D2T[newSize](vecSize); size = newSize; diff --git a/AMDiS/src/RCNeighbourList.cc b/AMDiS/src/RCNeighbourList.cc index dc2f83c5d807386c2c3c6d4bd808bb316df37aac..07ed1cfcb08c19201650303a6cdfa233282e1a43 100644 --- a/AMDiS/src/RCNeighbourList.cc +++ b/AMDiS/src/RCNeighbourList.cc @@ -83,7 +83,7 @@ namespace AMDiS { /****************************************************************************/ if (rclist[i]->flag == 0) { - ::std::deque<MacroElement*>::const_iterator mel; + std::deque<MacroElement*>::const_iterator mel; Mesh* coarse_mesh = coarseningManager->getMesh(); // set in Mesh::coarsen() @@ -364,8 +364,8 @@ namespace AMDiS { nextEdge[0] = NULL; nextEdge[1] = NULL; - ::std::vector<RCListElement*>::iterator it = rclist.begin(); - ::std::vector<RCListElement*>::iterator insertIt; + std::vector<RCListElement*>::iterator it = rclist.begin(); + std::vector<RCListElement*>::iterator insertIt; while(count < n_neigh_old) { DegreeOfFreedom *dof0 = const_cast<DegreeOfFreedom*>((*it)->el->getDOF(0)); diff --git a/AMDiS/src/RCNeighbourList.h b/AMDiS/src/RCNeighbourList.h index 8646c9ae58222bf1334780e4b6b9dd0e46e39e56..03ea728eba602511da59e19280ec9dd6df1be70e 100644 --- a/AMDiS/src/RCNeighbourList.h +++ b/AMDiS/src/RCNeighbourList.h @@ -253,7 +253,7 @@ namespace AMDiS { /** \brief * Refinement/coarsening patch */ - ::std::vector<RCListElement*> rclist; + std::vector<RCListElement*> rclist; /** \brief * Pointer to the CoarseningManager diff --git a/AMDiS/src/Recovery.cc b/AMDiS/src/Recovery.cc index 5b2a5428249506bcbe31d4cc811379054c4368b5..cdadc23da60b191344e6cb3579272fffe865ea15 100644 --- a/AMDiS/src/Recovery.cc +++ b/AMDiS/src/Recovery.cc @@ -53,7 +53,7 @@ RecoveryStructure& RecoveryStructure::operator=(const RecoveryStructure& rhs) { if (rhs.neighbors) { if (!neighbors) - neighbors = NEW ::std::set<DegreeOfFreedom>; + neighbors = NEW std::set<DegreeOfFreedom>; *neighbors=*rhs.neighbors ; } else { @@ -74,10 +74,10 @@ void RecoveryStructure::print() int i, j; - ::std::cout << ::std::endl; + std::cout << std::endl; MSG("Coordinates of the node: "); - ::std::cout << *coords << ::std::endl; + std::cout << *coords << std::endl; if (A) { @@ -90,10 +90,10 @@ void RecoveryStructure::print() { MSG("( "); for (j=0; j<i; j++) - ::std::cout << "* "; + std::cout << "* "; for (j=i; j<n; j++) - ::std::cout << (*A)[i][j] << " "; - ::std::cout << ")" << ::std::endl; + std::cout << (*A)[i][j] << " "; + std::cout << ")" << std::endl; } MSG("Right hand side:\n"); @@ -101,10 +101,10 @@ void RecoveryStructure::print() { MSG("( "); if (rec_grdUh) - ::std::cout << (*rec_grdUh)[i]; + std::cout << (*rec_grdUh)[i]; else - ::std::cout << (*rec_uh)[i]; - ::std::cout << " )" << ::std::endl; + std::cout << (*rec_uh)[i]; + std::cout << " )" << std::endl; } if (neighbors) @@ -112,17 +112,17 @@ void RecoveryStructure::print() MSG("Printing neighbors vertices\n\n"); MSG("Number of neighbors: "); - ::std::cout << neighbors->size() << ::std::endl << ::std::endl; + std::cout << neighbors->size() << std::endl << std::endl; MSG("List of neighbors: "); - ::std::set<DegreeOfFreedom>::const_iterator setIterator; + std::set<DegreeOfFreedom>::const_iterator setIterator; for (setIterator = neighbors->begin(); setIterator != neighbors->end(); ++setIterator) - ::std::cout << " " << *setIterator; + std::cout << " " << *setIterator; - ::std::cout << ::std::endl << ::std::endl; + std::cout << std::endl << std::endl; } } else @@ -130,17 +130,17 @@ void RecoveryStructure::print() MSG("Boundary vertex or not a vertex node: printing interior neighbors\n\n"); MSG("Number of neighbors: "); - ::std::cout << neighbors->size() << ::std::endl << ::std::endl; + std::cout << neighbors->size() << std::endl << std::endl; MSG("List of neighbors: "); - ::std::set<DegreeOfFreedom>::const_iterator setIterator; + std::set<DegreeOfFreedom>::const_iterator setIterator; for (setIterator = neighbors->begin(); setIterator != neighbors->end(); ++setIterator) - ::std::cout << " " << *setIterator; + std::cout << " " << *setIterator; - ::std::cout << ::std::endl << ::std::endl; + std::cout << std::endl << std::endl; } WAIT; @@ -652,7 +652,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh, else { if (!(*struct_vec)[k].neighbors) - (*struct_vec)[k].neighbors = NEW ::std::set<DegreeOfFreedom>; + (*struct_vec)[k].neighbors = NEW std::set<DegreeOfFreedom>; if (degree==2 && dim>1) compute_sums_linear(uh, el_info, &(*struct_vec)[k], @@ -665,7 +665,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh, else // Setting list of adjacent interior vertices. { if (!(*struct_vec)[k].neighbors) - (*struct_vec)[k].neighbors = NEW ::std::set<DegreeOfFreedom>; + (*struct_vec)[k].neighbors = NEW std::set<DegreeOfFreedom>; for (j=0; j<n_neighbors; j++) (*struct_vec)[k].neighbors->insert(interior_vertices[j]); @@ -689,7 +689,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh, *(*struct_vec)[k].coords = coordinates; // Setting list of adjacent interior vertices. - (*struct_vec)[k].neighbors = NEW ::std::set<DegreeOfFreedom>; + (*struct_vec)[k].neighbors = NEW std::set<DegreeOfFreedom>; if (el_info->getBoundary(EDGE, i) == INTERIOR) for (m=0; m<2; m++) @@ -721,7 +721,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh, *(*struct_vec)[k].coords = coordinates; // Setting list of adjacent interior vertices. - (*struct_vec)[k].neighbors = NEW ::std::set<DegreeOfFreedom>; + (*struct_vec)[k].neighbors = NEW std::set<DegreeOfFreedom>; if (el_info->getBoundary(FACE, i) == INTERIOR) for (m=0; m<3; m++) @@ -750,7 +750,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh, *(*struct_vec)[k].coords = coordinates; // Setting list of adjacent interior vertices. - (*struct_vec)[k].neighbors = NEW ::std::set<DegreeOfFreedom>; + (*struct_vec)[k].neighbors = NEW std::set<DegreeOfFreedom>; for (m=0; m<n_neighbors; m++) (*struct_vec)[k].neighbors->insert(interior_vertices[m]); @@ -795,7 +795,7 @@ void Recovery::recoveryUh(DOFVector<double> *uh, DOFVector<double> &rec_vec) result->set(0.0); DOFVector<double>::Iterator result_it(result, USED_DOFS); - ::std::set<DegreeOfFreedom>::const_iterator setIterator; + std::set<DegreeOfFreedom>::const_iterator setIterator; int i; for (SV_it.reset(), result_it.reset(); !result_it.end(); @@ -867,7 +867,7 @@ Recovery::recoveryUh(DOFVector<double> *uh, const FiniteElemSpace *fe_space) result->set(0.0); DOFVector<double>::Iterator result_it(result, USED_DOFS); - ::std::set<DegreeOfFreedom>::const_iterator setIterator; + std::set<DegreeOfFreedom>::const_iterator setIterator; int i; for (SV_it.reset(), result_it.reset(); !result_it.end(); @@ -944,7 +944,7 @@ Recovery::recovery(DOFVector<double> *uh, const FiniteElemSpace *fe_space, result->set(WorldVector<double>(DEFAULT_VALUE, 0.0)); DOFVector<WorldVector<double> >::Iterator grdIt(result, USED_DOFS); - ::std::set<DegreeOfFreedom>::const_iterator setIterator; + std::set<DegreeOfFreedom>::const_iterator setIterator; int i; for (SV_it.reset(), grdIt.reset(); !grdIt.end(); ++SV_it, ++grdIt) @@ -1082,7 +1082,7 @@ void Recovery::test(DOFVector<double> *uh, const FiniteElemSpace *fe_space) { position = LM_iterator.getDOFIndex(); MSG("Node: "); - ::std::cout << position << ::std::endl; + std::cout << position << std::endl; (*struct_vec)[position].print(); } diff --git a/AMDiS/src/Recovery.h b/AMDiS/src/Recovery.h index 919beb9582307027d5e3085cbd5fde93c269450d..c34df0a3501078077bc62104e2619a332897b4e7 100644 --- a/AMDiS/src/Recovery.h +++ b/AMDiS/src/Recovery.h @@ -150,7 +150,7 @@ private: // members // For boundary, edge, face, of center nodes: interior neighbors nodes. // For interior vertices in uh-recovery: neighbors nodes. - ::std::set<DegreeOfFreedom> *neighbors; + std::set<DegreeOfFreedom> *neighbors; friend class Recovery; }; diff --git a/AMDiS/src/RecoveryEstimator.cc b/AMDiS/src/RecoveryEstimator.cc index 1ccc1d3a2751bd8860ffe0e2dc9b914c4a2af1f4..81d5b535704041875a849fc18b299a8a04ff3dad 100644 --- a/AMDiS/src/RecoveryEstimator.cc +++ b/AMDiS/src/RecoveryEstimator.cc @@ -1,7 +1,7 @@ #include "RecoveryEstimator.h" #include "Parameters.h" -RecoveryEstimator::RecoveryEstimator(::std::string name, DOFVector<double> *uh, int r) +RecoveryEstimator::RecoveryEstimator(std::string name, DOFVector<double> *uh, int r) : Estimator(name, r), uh_(uh), relative_(0), @@ -87,7 +87,7 @@ double RecoveryEstimator::estimate(double timestep) rec_basFcts = rec_uh->getFESpace()->getBasisFcts(); } - int deg = 2 * ::std::max(basFcts->getDegree(), + int deg = 2 * std::max(basFcts->getDegree(), rec_basFcts->getDegree()); Quadrature *quad = Quadrature::provideQuadrature(dim, deg); int numPoints = quad->getNumPoints(); @@ -169,7 +169,7 @@ double RecoveryEstimator::estimate(double timestep) estEl = C * det * errEl; el->setEstimation(estEl, row); est_sum += estEl; - est_max = ::std::max(est_max, estEl); + est_max = std::max(est_max, estEl); if (relative_) { diff --git a/AMDiS/src/RecoveryEstimator.h b/AMDiS/src/RecoveryEstimator.h index e662602ec9754ac00d903a85f8d3785567ae9baa..ad9dc35ea58c2d070f75799745c559f4ebb28351 100644 --- a/AMDiS/src/RecoveryEstimator.h +++ b/AMDiS/src/RecoveryEstimator.h @@ -71,7 +71,7 @@ namespace AMDiS { /** \brief * constructor */ - RecoveryEstimator(::std::string name, DOFVector<double> *uh, int r = -1); + RecoveryEstimator(std::string name, DOFVector<double> *uh, int r = -1); /** \brief * destructor. diff --git a/AMDiS/src/RefinementManager1d.cc b/AMDiS/src/RefinementManager1d.cc index 867764384ddb7a9175977cd94a58d08d8874194d..eecc3f667d8e01bfeb8af4940cfcc0511ac25095 100644 --- a/AMDiS/src/RefinementManager1d.cc +++ b/AMDiS/src/RefinementManager1d.cc @@ -83,9 +83,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; it++) (*it)->refineInterpol(ref_list, 1); } diff --git a/AMDiS/src/RefinementManager2d.cc b/AMDiS/src/RefinementManager2d.cc index 7ac4d19c3564996299c67bf6e66bdd15a4fdfec8..49b06226556337ee5fde67e78feb38aa32b86bd7 100644 --- a/AMDiS/src/RefinementManager2d.cc +++ b/AMDiS/src/RefinementManager2d.cc @@ -74,8 +74,8 @@ namespace AMDiS { DegreeOfFreedom firstNewDOF = -1; RCNeighbourList *periodicList; - ::std::map<int, VertexVector*>::iterator it; - ::std::map<int, VertexVector*>::iterator end = mesh->getPeriodicAssociations().end(); + std::map<int, VertexVector*>::iterator it; + std::map<int, VertexVector*>::iterator end = mesh->getPeriodicAssociations().end(); while (edge[0] != NULL) { periodicList = refineList->periodicSplit(edge, @@ -229,9 +229,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; it++) { (*it)->refineInterpol(*refineList, n_neigh); } diff --git a/AMDiS/src/RefinementManager3d.cc b/AMDiS/src/RefinementManager3d.cc index 1a8c94e1ce85fee24f9d0a5119f36c16ce93aa80..d47efcdb431220b9e7e1cd98ca98a754ba352497 100644 --- a/AMDiS/src/RefinementManager3d.cc +++ b/AMDiS/src/RefinementManager3d.cc @@ -364,9 +364,9 @@ namespace AMDiS { int iadmin; int nrAdmin = mesh->getNumberOfDOFAdmin(); for(iadmin = 0; iadmin < nrAdmin; iadmin++) { - ::std::list<DOFIndexedBase*>::iterator it; + std::list<DOFIndexedBase*>::iterator it; DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); - ::std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); + std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); for(it = admin->beginDOFIndexed(); it != end; it++) (*it)->refineInterpol(*refineList, n_neigh); } @@ -474,8 +474,8 @@ namespace AMDiS { // dynamic_cast<LeafDataPeriodic*>(el->getElementData(PERIODIC)); // if(pd) { - // ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; - // ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = + // std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; + // std::list<LeafDataPeriodic::PeriodicInfo>::iterator end = // pd->getInfoList().end(); // for(it = pd->getInfoList().begin(); it != end; ++it) { @@ -685,8 +685,8 @@ namespace AMDiS { DegreeOfFreedom firstNewDOF = -1; RCNeighbourList *periodicList; - ::std::map<int, VertexVector*>::iterator it; - ::std::map<int, VertexVector*>::iterator end = mesh->getPeriodicAssociations().end(); + std::map<int, VertexVector*>::iterator it; + std::map<int, VertexVector*>::iterator end = mesh->getPeriodicAssociations().end(); // for(int i = 0; i < n_neigh; i++) { // MSG("%d ", ref_list->getElement(i)->getIndex()); diff --git a/AMDiS/src/ResidualEstimator.cc b/AMDiS/src/ResidualEstimator.cc index 62dde37ad0e5697e102ed5de2145406b9fa12a2d..423f4a844c547ef8f1ee5435c29d4343802ac433 100644 --- a/AMDiS/src/ResidualEstimator.cc +++ b/AMDiS/src/ResidualEstimator.cc @@ -8,7 +8,7 @@ namespace AMDiS { - ResidualEstimator::ResidualEstimator(::std::string name, int r) + ResidualEstimator::ResidualEstimator(std::string name, int r) : Estimator(name, r), C0(1.0), C1(1.0), @@ -44,7 +44,7 @@ namespace AMDiS { degree = 0; for (int system = 0; system < numSystems; system++) { basFcts[system] = uh[system]->getFESpace()->getBasisFcts(); - degree = ::std::max(degree, basFcts[system]->getDegree()); + degree = std::max(degree, basFcts[system]->getDegree()); } degree *= 2; @@ -183,11 +183,10 @@ namespace AMDiS { double est_el = 0.0; double val = 0.0; Element *el, *neigh; - int iq; TEST_EXIT_DBG(numSystems > 0)("no system set\n"); - ::std::vector<Operator*>::iterator it; + std::vector<Operator*>::iterator it; el = elInfo->getElement(); @@ -198,7 +197,7 @@ namespace AMDiS { double h2 = h2_from_det(det, dim); - for (iq = 0; iq < numPoints; iq++) { + for (int iq = 0; iq < numPoints; iq++) { riq[iq] = 0.0; } @@ -208,7 +207,7 @@ namespace AMDiS { continue; // init assemblers - ::std::vector<Operator*>::iterator it; + std::vector<Operator*>::iterator it; for (it = const_cast<DOFMatrix*>(matrix[system])->getOperatorsBegin(); it != const_cast<DOFMatrix*>(matrix[system])->getOperatorsEnd(); @@ -231,8 +230,9 @@ namespace AMDiS { uh[system]->getVecAtQPs(elInfo, NULL, quadFast[system], uhQP); uhOld[system]->getVecAtQPs(elInfo, NULL, quadFast[system], uhOldQP); - if (C3 && uhOldQP && system == ::std::max(row, 0)) { - for (val = iq = 0; iq < numPoints; iq++) { + if (C3 && uhOldQP && system == std::max(row, 0)) { + val = 0.0; + for (int iq = 0; iq < numPoints; iq++) { double tiq = (uhQP[iq] - uhOldQP[iq]); val += quad->getWeight(iq) * tiq * tiq; } @@ -242,8 +242,7 @@ namespace AMDiS { } } } - - + if (C0) { for (it = const_cast<DOFMatrix*>(matrix[system])->getOperatorsBegin(); it != const_cast<DOFMatrix*>(matrix[system])->getOperatorsEnd(); @@ -278,14 +277,16 @@ namespace AMDiS { } // add integral over r square - for (val = iq = 0; iq < numPoints; iq++) { + val = 0.0; + for (int iq = 0; iq < numPoints; iq++) { val += quad->getWeight(iq) * riq[iq] * riq[iq]; } - - if (timestep != 0.0 || norm == NO_NORM || norm == L2_NORM) + + if (timestep != 0.0 || norm == NO_NORM || norm == L2_NORM) { val = C0 * h2 * h2 * det * val; - else + } else { val = C0 * h2 * det * val; + } est_el += val; @@ -315,8 +316,8 @@ namespace AMDiS { bool periodicCoords = false; if (ldp) { - ::std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; - ::std::list<LeafDataPeriodic::PeriodicInfo>& infoList = + std::list<LeafDataPeriodic::PeriodicInfo>::iterator it; + std::list<LeafDataPeriodic::PeriodicInfo>& infoList = dynamic_cast<LeafDataPeriodic*>(ldp)->getInfoList(); for (it = infoList.begin(); it != infoList.end(); ++it) { @@ -360,7 +361,7 @@ namespace AMDiS { double detNeigh = abs(neighInfo->calcGrdLambda(*lambdaNeigh_)); - for (iq = 0; iq < nPointsSurface_; iq++) { + for (int iq = 0; iq < nPointsSurface_; iq++) { jump_[iq].set(0.0); } @@ -372,7 +373,7 @@ namespace AMDiS { uh[system]->getLocalVector(el, uhEl[system]); uh[system]->getLocalVector(neigh, uhNeigh[system]); - for (iq = 0; iq < nPointsSurface_; iq++) { + for (int iq = 0; iq < nPointsSurface_; iq++) { (*lambda_)[face] = 0.0; for (int i = 0; i < dim; i++) { (*lambda_)[faceIndEl_[i]] = surfaceQuad_->getLambda(iq, i); @@ -396,13 +397,13 @@ namespace AMDiS { grdUhEl_[iq] -= grdUhNeigh_[iq]; } - ::std::vector<double*>::iterator fac; + std::vector<double*>::iterator fac; for (it = const_cast<DOFMatrix*>(matrix[system])->getOperatorsBegin(), fac = const_cast<DOFMatrix*>(matrix[system])->getOperatorEstFactorBegin(); it != const_cast<DOFMatrix*>(matrix[system])->getOperatorsEnd(); ++it, ++fac) { - for (iq = 0; iq < nPointsSurface_; iq++) { + for (int iq = 0; iq < nPointsSurface_; iq++) { localJump_[iq].set(0.0); } @@ -423,7 +424,7 @@ namespace AMDiS { } val = 0.0; - for (iq = 0; iq < nPointsSurface_; iq++) { + for (int iq = 0; iq < nPointsSurface_; iq++) { val += surfaceQuad_->getWeight(iq) * (jump_[iq] * jump_[iq]); } @@ -439,15 +440,13 @@ namespace AMDiS { } neigh->setEstimation(neigh->getEstimation(row) + val, row); - est_el += val; - } } - val = fh[::std::max(row, 0)]-> + val = fh[std::max(row, 0)]-> getBoundaryManager()-> - boundResidual(elInfo, matrix[::std::max(row, 0)], uh[::std::max(row, 0)]); + boundResidual(elInfo, matrix[std::max(row, 0)], uh[std::max(row, 0)]); if (norm == NO_NORM || norm == L2_NORM) val *= C1 * h2; else @@ -465,12 +464,12 @@ namespace AMDiS { elInfo->getElement()->setMark(0); } - void r(const ElInfo *elInfo, - int numPoints, - const double *uhIq, + void r(const ElInfo *elInfo, + int numPoints, + const double *uhIq, const WorldVector<double> *grdUhIq, const WorldMatrix<double> *D2UhIq, - const double *uhOldIq, + const double *uhOldIq, const WorldVector<double> *grdUhOldIq, const WorldMatrix<double> *D2UhOldIq, DOFMatrix *A, @@ -478,17 +477,17 @@ namespace AMDiS { Quadrature *quad, double *result) { - ::std::vector<Operator*>::iterator it; - ::std::vector<double*>::iterator fac; - double factor; + std::vector<Operator*>::iterator it; + std::vector<double*>::iterator fac; // lhs for (it = const_cast<DOFMatrix*>(A)->getOperatorsBegin(), fac = const_cast<DOFMatrix*>(A)->getOperatorEstFactorBegin(); it != const_cast<DOFMatrix*>(A)->getOperatorsEnd(); ++it, ++fac) { - - factor = *fac ? **fac : 1.0; + + double factor = *fac ? **fac : 1.0; + if (factor) { if (D2UhIq) { (*it)->evalSecondOrder(numPoints, uhIq, grdUhIq, D2UhIq, result, -factor); @@ -511,7 +510,8 @@ namespace AMDiS { it != const_cast<DOFVector<double>*>(fh)->getOperatorsEnd(); ++it, ++fac) { - factor = *fac ? **fac : 1.0; + double factor = *fac ? **fac : 1.0; + if (factor) { if ((*it)->getUhOld()) { if (D2UhOldIq) { diff --git a/AMDiS/src/ResidualEstimator.h b/AMDiS/src/ResidualEstimator.h index 71b4b47dfdce55587204c894dc99c8d8f3467d47..dd160eea9765626114cb957aafffb2912efec212 100644 --- a/AMDiS/src/ResidualEstimator.h +++ b/AMDiS/src/ResidualEstimator.h @@ -95,7 +95,7 @@ namespace AMDiS { /** \brief * Constructor. */ - ResidualEstimator(::std::string name, int r); + ResidualEstimator(std::string name, int r); virtual void init(double timestep); diff --git a/AMDiS/src/ResidualParallelEstimator.cc b/AMDiS/src/ResidualParallelEstimator.cc index a49ab75f0316185b756e0286ff12de790076ac1e..a6b285d899ae435976b2489804495faf194fee91 100644 --- a/AMDiS/src/ResidualParallelEstimator.cc +++ b/AMDiS/src/ResidualParallelEstimator.cc @@ -7,7 +7,7 @@ #ifdef _OPENMP namespace AMDiS { - ResidualParallelEstimator::ResidualParallelEstimator(::std::string name, int r) + ResidualParallelEstimator::ResidualParallelEstimator(std::string name, int r) : Estimator(name, r), C3(1.0) { diff --git a/AMDiS/src/ResidualParallelEstimator.h b/AMDiS/src/ResidualParallelEstimator.h index 7e819c659018881b2a2a95179f616bff9898fe9a..78c51c55214a609cf6b5980ebe64ec1bf502d8a0 100644 --- a/AMDiS/src/ResidualParallelEstimator.h +++ b/AMDiS/src/ResidualParallelEstimator.h @@ -71,7 +71,7 @@ namespace AMDiS { /** \brief * Constructor. */ - ResidualParallelEstimator(::std::string name, int r); + ResidualParallelEstimator(std::string name, int r); /** \brief * Destructor. @@ -97,7 +97,7 @@ namespace AMDiS { virtual double estimate(double timestep); private: - ::std::vector<ResidualEstimator*> seqEstimators_; + std::vector<ResidualEstimator*> seqEstimators_; /** \brief diff --git a/AMDiS/src/RobinBC.cc b/AMDiS/src/RobinBC.cc index ed19d79258255bac58ec94e3a5d91cc72a1d2632..0cd8759ba275fc64ea3c54f49f22b1c1606b7ead 100644 --- a/AMDiS/src/RobinBC.cc +++ b/AMDiS/src/RobinBC.cc @@ -266,7 +266,7 @@ namespace AMDiS { int face; - ::std::vector<Operator*>::iterator op; + std::vector<Operator*>::iterator op; for(op=matrix->getOperatorsBegin(); op != matrix->getOperatorsEnd(); ++op) { (*op)->getAssembler(omp_get_thread_num())->initElement(elInfo); } diff --git a/AMDiS/src/SMIAdapter.cc b/AMDiS/src/SMIAdapter.cc index 512b2c7f2365457ddc17b0c74fdf046418a0de66..b1b15817843ffe47afa55bdd4921dc5e26267631 100644 --- a/AMDiS/src/SMIAdapter.cc +++ b/AMDiS/src/SMIAdapter.cc @@ -426,8 +426,8 @@ namespace AMDiS { //double *values = GET_MEMORY(double, numNodes); if(quantityID == -1) { - ::std::map<int, ::std::vector<DOFVector<double>*> >::iterator quantityIt; - ::std::map<int, ::std::vector<DOFVector<double>*> >::iterator quantityEnd = + std::map<int, std::vector<DOFVector<double>*> >::iterator quantityIt; + std::map<int, std::vector<DOFVector<double>*> >::iterator quantityEnd = dofVectors_.end(); for(quantityIt = dofVectors_.begin(); quantityIt != quantityEnd; ++quantityIt) { @@ -526,8 +526,8 @@ namespace AMDiS { //double *values = GET_MEMORY(double, numNodes); if(quantityID == -1) { - ::std::map<int, ::std::vector<DOFVector<double>*> >::iterator quantityIt; - ::std::map<int, ::std::vector<DOFVector<double>*> >::iterator quantityEnd = + std::map<int, std::vector<DOFVector<double>*> >::iterator quantityIt; + std::map<int, std::vector<DOFVector<double>*> >::iterator quantityEnd = dofVectors_.end(); for(quantityIt = dofVectors_.begin(); quantityIt != quantityEnd; ++quantityIt) { int quantityDim = static_cast<int>(quantityIt->second.size()); diff --git a/AMDiS/src/SMIAdapter.h b/AMDiS/src/SMIAdapter.h index ea2f1ed3fe466b99d9370a5146e6dbd703663f35..54c49e69451f98ff74814475db49693fc518eb15 100644 --- a/AMDiS/src/SMIAdapter.h +++ b/AMDiS/src/SMIAdapter.h @@ -108,10 +108,10 @@ namespace AMDiS { */ void getQuantitiesFromSMI(int quantityID = -1); - void setIndexMappings(::std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, - ::std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, - ::std::map<int, int> *newElementIndex, - ::std::map<int, int> *oldElementIndex) + void setIndexMappings(std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex, + std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex, + std::map<int, int> *newElementIndex, + std::map<int, int> *oldElementIndex) { newNodeIndex_ = newNodeIndex; oldNodeIndex_ = oldNodeIndex; @@ -143,7 +143,7 @@ namespace AMDiS { /** \brief * mapping from quantity ids to DOFVector pointers */ - ::std::map<int, ::std::vector<DOFVector<double>*> > dofVectors_; + std::map<int, std::vector<DOFVector<double>*> > dofVectors_; /** \brief * element region the adapter is defined on @@ -160,10 +160,10 @@ namespace AMDiS { */ bool addNeighbourInfo_; - ::std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex_; - ::std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex_; - ::std::map<int, int> *newElementIndex_; - ::std::map<int, int> *oldElementIndex_; + std::map<DegreeOfFreedom, DegreeOfFreedom> *newNodeIndex_; + std::map<DegreeOfFreedom, DegreeOfFreedom> *oldNodeIndex_; + std::map<int, int> *newElementIndex_; + std::map<int, int> *oldElementIndex_; bool (*elementFct_)(ElInfo*); bool (*surfaceFct_)(ElInfo*, int); diff --git a/AMDiS/src/Serializable.h b/AMDiS/src/Serializable.h index 56be90d32d3a43dc1ef958c14b459c80feec29bb..ef8250e93861d2004428f338f59be2c36917876a 100644 --- a/AMDiS/src/Serializable.h +++ b/AMDiS/src/Serializable.h @@ -42,17 +42,17 @@ namespace AMDiS { /** \brief * Streams the object to output stream out. */ - virtual void serialize(::std::ostream &out) = 0; + virtual void serialize(std::ostream &out) = 0; /** \brief * Reads the object from input stream in. */ - virtual void deserialize(::std::istream &in) = 0; + virtual void deserialize(std::istream &in) = 0; /** \brief * Returns the type name for this serializable object. */ - virtual ::std::string getTypeName() const { return ""; }; + virtual std::string getTypeName() const { return ""; }; virtual ~Serializable() {}; }; diff --git a/AMDiS/src/Serializer.h b/AMDiS/src/Serializer.h index ba4f607925f1db29412df9e5555ac21f24f07c6d..0ccdb08fdbb7b4a6263de7bc91d92e4c34276035 100644 --- a/AMDiS/src/Serializer.h +++ b/AMDiS/src/Serializer.h @@ -67,7 +67,7 @@ namespace AMDiS { TEST_EXIT(adaptInfo)("No AdaptInfo\n"); - ::std::ofstream out(name_.c_str()); + std::ofstream out(name_.c_str()); problem_->serialize(out); adaptInfo->serialize(out); out.close(); @@ -85,7 +85,7 @@ namespace AMDiS { /** \brief * Name of file to which the problem is serialized. */ - ::std::string name_; + std::string name_; /** \brief * Pointer to the problem. @@ -106,28 +106,28 @@ namespace AMDiS { class SerializerUtil { public: - static void serializeInt(::std::ostream &out, int* ptrInt) { + static void serializeInt(std::ostream &out, int* ptrInt) { out.write(reinterpret_cast<const char*>(ptrInt), sizeof(int)); }; - static void serializeDouble(::std::ostream &out, double* ptrInt) { + static void serializeDouble(std::ostream &out, double* ptrInt) { out.write(reinterpret_cast<const char*>(ptrInt), sizeof(double)); }; - static void serializeBool(::std::ostream &out, bool* ptrBool) { + static void serializeBool(std::ostream &out, bool* ptrBool) { out.write(reinterpret_cast<const char*>(ptrBool), sizeof(bool)); } - static void deserializeInt(::std::istream &in, int* ptrInt) { + static void deserializeInt(std::istream &in, int* ptrInt) { in.read(reinterpret_cast<char*>(ptrInt), sizeof(int)); }; - static void deserializeDouble(::std::istream &in, double* ptrInt) { + static void deserializeDouble(std::istream &in, double* ptrInt) { in.read(reinterpret_cast<char*>(ptrInt), sizeof(double)); }; - static void deserializeBool(::std::istream &in, bool* ptrBool) { + static void deserializeBool(std::istream &in, bool* ptrBool) { in.read(reinterpret_cast<char*>(ptrBool), sizeof(bool)); }; diff --git a/AMDiS/src/SmootherBase.h b/AMDiS/src/SmootherBase.h index cefa87c313b82de2dfdcb6bc1b4349249b4e1b6d..ecd89481161c42ab87044b0e9751060534cf8683 100644 --- a/AMDiS/src/SmootherBase.h +++ b/AMDiS/src/SmootherBase.h @@ -33,7 +33,7 @@ namespace AMDiS { class SmootherBase { public: - SmootherBase(::std::string name) : name_(name) {}; + SmootherBase(std::string name) : name_(name) {}; virtual ~SmootherBase() {}; @@ -44,7 +44,7 @@ namespace AMDiS { const DOFSetType &dofSet) = 0; protected: - const ::std::string name_; + const std::string name_; }; @@ -56,10 +56,10 @@ namespace AMDiS { public: virtual ~SmootherCreator() {}; - void setName(::std::string name_) { name = name_; }; + void setName(std::string name_) { name = name_; }; protected: - ::std::string name; + std::string name; }; } diff --git a/AMDiS/src/SparseVector.cc b/AMDiS/src/SparseVector.cc index 5ec91c2b43bb1d6cda26890a2ab18ac423eb6562..0435130b4b7315b8fb9673020468c95d608c3ee1 100644 --- a/AMDiS/src/SparseVector.cc +++ b/AMDiS/src/SparseVector.cc @@ -28,9 +28,9 @@ namespace AMDiS { template<> void axpy<double>(double a, SparseVector<double>& x, SparseVector<double>& y, - ::std::set<DegreeOfFreedom> &dofSet) + std::set<DegreeOfFreedom> &dofSet) { - ::std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); + std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); for(dofIt = dofSet.begin(); dofIt != dofEnd; ++dofIt) { y[*dofIt] += a * x[*dofIt]; } @@ -40,18 +40,18 @@ namespace AMDiS { void mv<double>(DOFMatrix &a, SparseVector<double> &x, SparseVector<double> &result, - ::std::set<DegreeOfFreedom> &dofSet, + std::set<DegreeOfFreedom> &dofSet, bool add) { //DOFMatrix::Iterator matIt(const_cast<DOFMatrix*>(&a), USED_DOFS); - ::std::vector<MatEntry>::iterator rowIt, rowEnd; + std::vector<MatEntry>::iterator rowIt, rowEnd; DegreeOfFreedom row, col; if(!add) result.clear(); // for(matIt.reset(); !matIt.end(); ++matIt) { - ::std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); + std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); for(dofIt = dofSet.begin(); dofIt != dofEnd; ++dofIt) { row = *dofIt; rowEnd = a[row].end(); @@ -68,7 +68,7 @@ namespace AMDiS { double SparseVector<double>::norm() { double norm = 0.0; - ::std::vector<double>::iterator it, end = vec_.end(); + std::vector<double>::iterator it, end = vec_.end(); for(it = vec_.begin(); it != end; ++it) { norm += *it * *it; } diff --git a/AMDiS/src/SparseVector.h b/AMDiS/src/SparseVector.h index f61c0f5326849b1a5d3fcfb406c8390390cce581..d560030c1f705837df3932d5c2af0005e27b4526 100644 --- a/AMDiS/src/SparseVector.h +++ b/AMDiS/src/SparseVector.h @@ -35,13 +35,13 @@ namespace AMDiS template<typename T> void axpy(double a, SparseVector<T>& x, SparseVector<T>& y, - ::std::set<DegreeOfFreedom> &dofSet); + std::set<DegreeOfFreedom> &dofSet); template<typename T> void mv(DOFMatrix &a, SparseVector<T> &x, SparseVector<T> &result, - ::std::set<DegreeOfFreedom> &dofSet, + std::set<DegreeOfFreedom> &dofSet, bool add = false); class FiniteElemSpace; @@ -54,18 +54,14 @@ namespace AMDiS SparseVector(const FiniteElemSpace *feSpace, const char *name) : DOFVectorBase<T>(feSpace, name), - // feSpace_(feSpace), - // name_(name), master_(NULL) { - logToPhys_ = new ::std::map<DegreeOfFreedom, int>; - physToLog_ = new ::std::vector<DegreeOfFreedom>; + logToPhys_ = new std::map<DegreeOfFreedom, int>; + physToLog_ = new std::vector<DegreeOfFreedom>; }; SparseVector(const char *name, SparseVector *master) : DOFVectorBase<T>(master->getFESpace(), name), - // feSpace_(master->feSpace_), - // name_(name), logToPhys_(master->logToPhys_), physToLog_(master->physToLog_), master_(master) @@ -76,7 +72,7 @@ namespace AMDiS virtual ~SparseVector() { if(master_) { - typename ::std::vector<SparseVector<T>*>::iterator clientIt, clientEnd = master_->clients_.end(); + typename std::vector<SparseVector<T>*>::iterator clientIt, clientEnd = master_->clients_.end(); for(clientIt = master_->clients_.begin(); clientIt != clientEnd; ++clientIt) { if(*clientIt == this) { master_->clients_.erase(clientIt); @@ -90,23 +86,23 @@ namespace AMDiS } }; - //void createSparseIndices(::std::set<DegreeOfFreedom> &dofs); + //void createSparseIndices(std::set<DegreeOfFreedom> &dofs); void copyToDOFVector(DOFVector<T> &dofVec); void copyToDOFVector(DOFVector<T> &dofVec, - ::std::set<DegreeOfFreedom> &dofs); + std::set<DegreeOfFreedom> &dofs); void copyFromDOFVector(DOFVector<T> &dofVec, - ::std::set<DegreeOfFreedom> &dofs); + std::set<DegreeOfFreedom> &dofs); void clear(bool eraseEntries = true); T norm(); - void copy(SparseVector &x, const ::std::set<DegreeOfFreedom> &dofSet); + void copy(SparseVector &x, const std::set<DegreeOfFreedom> &dofSet); - void copy(SparseVector &x, const ::std::vector<DegreeOfFreedom> &dofSet); + void copy(SparseVector &x, const std::vector<DegreeOfFreedom> &dofSet); void print(); @@ -121,7 +117,7 @@ namespace AMDiS virtual void resize(int size) {}; virtual void compressDOFIndexed(int first, int last, - ::std::vector<DegreeOfFreedom> &newDOF) + std::vector<DegreeOfFreedom> &newDOF) { ERROR_EXIT("compress called\n"); }; @@ -132,13 +128,13 @@ namespace AMDiS virtual void coarseRestrict(RCNeighbourList&, int); - virtual typename ::std::vector<T>::iterator begin() { - static typename ::std::vector<T>::iterator dummy; + virtual typename std::vector<T>::iterator begin() { + static typename std::vector<T>::iterator dummy; return dummy; }; - virtual typename ::std::vector<T>::iterator end() { - static typename ::std::vector<T>::iterator dummy; + virtual typename std::vector<T>::iterator end() { + static typename std::vector<T>::iterator dummy; return dummy; }; @@ -151,27 +147,23 @@ namespace AMDiS }; protected: - /* const FiniteElemSpace *feSpace_; */ + std::map<DegreeOfFreedom, int> *logToPhys_; - /* ::std::string name_; */ + std::vector<DegreeOfFreedom> *physToLog_; - ::std::map<DegreeOfFreedom, int> *logToPhys_; - - ::std::vector<DegreeOfFreedom> *physToLog_; - - ::std::vector<T> vec_; + std::vector<T> vec_; SparseVector *master_; - ::std::vector<SparseVector*> clients_; + std::vector<SparseVector*> clients_; friend void axpy<>(double a, SparseVector<T>& x, SparseVector<T>& y, - ::std::set<DegreeOfFreedom> &dofSet); + std::set<DegreeOfFreedom> &dofSet); friend void mv<>(DOFMatrix &a, SparseVector<T> &x, SparseVector<T> &result, - ::std::set<DegreeOfFreedom> &dofSet, + std::set<DegreeOfFreedom> &dofSet, bool add); }; diff --git a/AMDiS/src/SparseVector.hh b/AMDiS/src/SparseVector.hh index 0add7cb2c5b3ef14a3da3260ffcbb7057fb46d75..e9489f9be7bbae98cea19cc5d650fbf2c5ca23da 100644 --- a/AMDiS/src/SparseVector.hh +++ b/AMDiS/src/SparseVector.hh @@ -13,10 +13,10 @@ void SparseVector<T>::coarseRestrict(RCNeighbourList& list, int n) template<typename T> void SparseVector<T>::copyToDOFVector(DOFVector<T> &dofVec, - ::std::set<DegreeOfFreedom> &dofs) + std::set<DegreeOfFreedom> &dofs) { - ::std::set<DegreeOfFreedom>::iterator dofsIt; - ::std::set<DegreeOfFreedom>::iterator dofsEnd = dofs.end(); + std::set<DegreeOfFreedom>::iterator dofsIt; + std::set<DegreeOfFreedom>::iterator dofsEnd = dofs.end(); for(dofsIt = dofs.begin(); dofsIt != dofsEnd; ++dofsIt) { dofVec[*dofsIt] = operator[](*dofsIt); @@ -37,10 +37,10 @@ void SparseVector<T>::copyToDOFVector(DOFVector<T> &dofVec) template<typename T> void SparseVector<T>::copyFromDOFVector(DOFVector<T> &dofVec, - ::std::set<DegreeOfFreedom> &dofs) + std::set<DegreeOfFreedom> &dofs) { - ::std::set<DegreeOfFreedom>::iterator dofsIt; - ::std::set<DegreeOfFreedom>::iterator dofsEnd = dofs.end(); + std::set<DegreeOfFreedom>::iterator dofsIt; + std::set<DegreeOfFreedom>::iterator dofsEnd = dofs.end(); for(dofsIt = dofs.begin(); dofsIt != dofsEnd; ++dofsIt) { operator[](*dofsIt) = dofVec[*dofsIt]; @@ -59,7 +59,7 @@ T& SparseVector<T>::operator[](DegreeOfFreedom i) (*physToLog_).push_back(i); physIndex = (*logToPhys_)[i] = static_cast<int>(vec_.size()); - typename ::std::vector<SparseVector<T>*>::iterator clientIt, clientEnd; + typename std::vector<SparseVector<T>*>::iterator clientIt, clientEnd; if(master_) { clientEnd = master_->clients_.end(); master_->vec_.resize(physToLog_->size(), 0.0); @@ -92,7 +92,7 @@ void SparseVector<T>::clear(bool eraseEntries) // vec_.resize(0); // } else { // vec_.resize(physToLog_->size(), 0.0); - typename ::std::vector<T>::iterator vecIt, vecEnd = vec_.end(); + typename std::vector<T>::iterator vecIt, vecEnd = vec_.end(); for(vecIt = vec_.begin(); vecIt != vecEnd; ++vecIt) { *vecIt = 0; } @@ -101,9 +101,9 @@ void SparseVector<T>::clear(bool eraseEntries) template<typename T> void SparseVector<T>::copy(SparseVector<T> &x, - const ::std::set<DegreeOfFreedom> &dofSet) + const std::set<DegreeOfFreedom> &dofSet) { - ::std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); + std::set<DegreeOfFreedom>::iterator dofIt, dofEnd = dofSet.end(); for(dofIt = dofSet.begin(); dofIt != dofEnd; ++dofIt) { operator[](*dofIt) = x[*dofIt]; } @@ -111,11 +111,11 @@ void SparseVector<T>::copy(SparseVector<T> &x, template<typename T> void SparseVector<T>::copy(SparseVector<T> &x, - const ::std::vector<DegreeOfFreedom> &dofSet) + const std::vector<DegreeOfFreedom> &dofSet) { - ::std::vector<DegreeOfFreedom>::iterator dofIt, - dofEnd = const_cast< ::std::vector<DegreeOfFreedom>&>(dofSet).end(); - for(dofIt = const_cast< ::std::vector<DegreeOfFreedom>&>(dofSet).begin(); + std::vector<DegreeOfFreedom>::iterator dofIt, + dofEnd = const_cast< std::vector<DegreeOfFreedom>&>(dofSet).end(); + for(dofIt = const_cast< std::vector<DegreeOfFreedom>&>(dofSet).begin(); dofIt != dofEnd; ++dofIt) { diff --git a/AMDiS/src/StandardProblemIteration.cc b/AMDiS/src/StandardProblemIteration.cc index 7488454ac680daf83ae2d7b4e97c8aff133cb37e..706b4beabdc4801f65a8e95531ecaed53c7b4d6d 100644 --- a/AMDiS/src/StandardProblemIteration.cc +++ b/AMDiS/src/StandardProblemIteration.cc @@ -78,17 +78,17 @@ namespace AMDiS { return flag; } - const ::std::string& StandardProblemIteration::getName() + const std::string& StandardProblemIteration::getName() { return problem_->getName(); } - void StandardProblemIteration::serialize(::std::ostream &out) + void StandardProblemIteration::serialize(std::ostream &out) { problem_->serialize(out); } - void StandardProblemIteration::deserialize(::std::istream &in) + void StandardProblemIteration::deserialize(std::istream &in) { problem_->deserialize(in); } diff --git a/AMDiS/src/StandardProblemIteration.h b/AMDiS/src/StandardProblemIteration.h index a506caafee3a28ae5ecbecae17e468e2d66f5689..bb9e8d58c2be4e5641a8eab3697f34b3bff45f36 100644 --- a/AMDiS/src/StandardProblemIteration.h +++ b/AMDiS/src/StandardProblemIteration.h @@ -83,17 +83,17 @@ namespace AMDiS { /** \brief * Returns the name of the problem. */ - virtual const ::std::string& getName(); + virtual const std::string& getName(); /** \brief * Function that serializes the problem plus information about the iteration. */ - virtual void serialize(::std::ostream &out); + virtual void serialize(std::ostream &out); /** \brief * Function that deserializes the problem plus information about the iteration. */ - virtual void deserialize(::std::istream &in); + virtual void deserialize(std::istream &in); protected: diff --git a/AMDiS/src/StlVector.cc b/AMDiS/src/StlVector.cc index adaeb3e3cda3781fba3b90635a8ff8aeac5bbcda..4230e4dd3bab3d9c1dc169e60401a8ebe92280e3 100644 --- a/AMDiS/src/StlVector.cc +++ b/AMDiS/src/StlVector.cc @@ -4,7 +4,7 @@ namespace AMDiS { - double norm(::std::vector<double> *vec) { + double norm(std::vector<double> *vec) { double v = 0; for (int i = 0; i < static_cast<int>(vec->size()); i++) { v += (*vec)[i] * (*vec)[i]; @@ -12,13 +12,13 @@ namespace AMDiS { return sqrt(v); }; - void setValue(::std::vector<double>& x, double value) { + void setValue(std::vector<double>& x, double value) { for (int i = 0; i < static_cast<int>(x.size()); i++) { x[i] = value; } }; - const ::std::vector<double>& operator*=(::std::vector<double>& x, double scal) { + const std::vector<double>& operator*=(std::vector<double>& x, double scal) { for (int i = 0; i < static_cast<int>(x.size()); i++) { x[i] *= scal; } @@ -26,8 +26,8 @@ namespace AMDiS { return x; }; - const ::std::vector<double>& operator+=(::std::vector<double>& x1, - const ::std::vector<double>& x2) { + const std::vector<double>& operator+=(std::vector<double>& x1, + const std::vector<double>& x2) { for (int i = 0; i < static_cast<int>(x1.size()); i++) { x1[i] += x2[i]; } @@ -35,7 +35,7 @@ namespace AMDiS { return x1; }; - double operator*(::std::vector<double>& x1, ::std::vector<double>& x2) { + double operator*(std::vector<double>& x1, std::vector<double>& x2) { double result = 0.0; for (int i = 0; i < static_cast<int>(x1.size()); i++) { @@ -45,19 +45,19 @@ namespace AMDiS { return result; }; - void axpy(double alpha, const ::std::vector<double>& x, ::std::vector<double>& y) { + void axpy(double alpha, const std::vector<double>& x, std::vector<double>& y) { for (int i = 0; i < static_cast<int>(y.size()); i++) { y[i] += alpha * x[i]; } } - void xpay(double alpha, const ::std::vector<double>& x, ::std::vector<double>& y) { + void xpay(double alpha, const std::vector<double>& x, std::vector<double>& y) { for (int i = 0; i < static_cast<int>(y.size()); i++) { y[i] = alpha * y[i] + x[i]; } } - int logToPhysIndex(::std::vector< ::std::vector<MatEntry> > *matrix, int a, int b) + int logToPhysIndex(std::vector< std::vector<MatEntry> > *matrix, int a, int b) { int j; @@ -68,14 +68,14 @@ namespace AMDiS { return (j == static_cast<int>((*matrix)[a].size())) ? -1 : j; } - void print(::std::vector<double> *vec) + void print(std::vector<double> *vec) { - ::std::cout << "["; + std::cout << "["; for (int i = 0; i < static_cast<int>(vec->size()); i++) { - ::std::cout << (*vec)[i] << " , "; + std::cout << (*vec)[i] << " , "; } - ::std::cout << "]" << ::std::endl; + std::cout << "]" << std::endl; } } diff --git a/AMDiS/src/StlVector.h b/AMDiS/src/StlVector.h index e3c6ec2f1b6b8e0377b772c0d35a69d42dc14ded..7dde8302278eff4b8e5444d945b213dec7f4dbba 100644 --- a/AMDiS/src/StlVector.h +++ b/AMDiS/src/StlVector.h @@ -8,7 +8,7 @@ namespace AMDiS { - class StlVectorCreator : public CreatorInterface< ::std::vector<double> > { + class StlVectorCreator : public CreatorInterface< std::vector<double> > { public: MEMORY_MANAGED(StlVectorCreator); @@ -18,13 +18,13 @@ namespace AMDiS { virtual ~StlVectorCreator() {}; - ::std::vector<double> *create() { - ::std::vector<double> *vec = new ::std::vector<double>(size_, 0.0); + std::vector<double> *create() { + std::vector<double> *vec = new std::vector<double>(size_, 0.0); return vec; }; - void free(::std::vector<double> *vec) { + void free(std::vector<double> *vec) { delete vec; }; @@ -32,29 +32,29 @@ namespace AMDiS { int size_; }; - double norm(::std::vector<double> *vec); + double norm(std::vector<double> *vec); - inline int size(::std::vector<double> *vec) + inline int size(std::vector<double> *vec) { return vec->size(); } - void setValue(::std::vector<double>& x, double value); + void setValue(std::vector<double>& x, double value); - const ::std::vector<double>& operator*=(::std::vector<double>& x, double scal); + const std::vector<double>& operator*=(std::vector<double>& x, double scal); - const ::std::vector<double>& operator+=(::std::vector<double>& x1, - const ::std::vector<double>& x2); + const std::vector<double>& operator+=(std::vector<double>& x1, + const std::vector<double>& x2); - double operator*(::std::vector<double>& x1, ::std::vector<double>& x2); + double operator*(std::vector<double>& x1, std::vector<double>& x2); - void axpy(double alpha, const ::std::vector<double>& x, ::std::vector<double>& y); + void axpy(double alpha, const std::vector<double>& x, std::vector<double>& y); - void xpay(double alpha, const ::std::vector<double>& x, ::std::vector<double>& y); + void xpay(double alpha, const std::vector<double>& x, std::vector<double>& y); - int logToPhysIndex(::std::vector< ::std::vector<MatEntry> > *m, int a, int b); + int logToPhysIndex(std::vector< std::vector<MatEntry> > *m, int a, int b); - void print(::std::vector<double> *vec); + void print(std::vector<double> *vec); } #endif diff --git a/AMDiS/src/SurfaceQuadrature.cc b/AMDiS/src/SurfaceQuadrature.cc index 56168ac28a3a9bacd218eb408c061b32e81b1f45..e4f214e501388a2abaa08c98364003a45a21b5b0 100644 --- a/AMDiS/src/SurfaceQuadrature.cc +++ b/AMDiS/src/SurfaceQuadrature.cc @@ -5,7 +5,7 @@ namespace AMDiS { - //::std::list<SurfaceQuadrature*> SurfaceQuadrature::surfaceQuadratureList; + //std::list<SurfaceQuadrature*> SurfaceQuadrature::surfaceQuadratureList; SurfaceQuadrature::SurfaceQuadrature(Quadrature *quad, VectorOfFixVecs<DimVec<double> > &coords) diff --git a/AMDiS/src/SurfaceQuadrature.h b/AMDiS/src/SurfaceQuadrature.h index 134680308f760b0238ce563d4ae1f401b25f9d0a..0e0ef67692f27bf80ad6aadaf310738ba8390a7c 100644 --- a/AMDiS/src/SurfaceQuadrature.h +++ b/AMDiS/src/SurfaceQuadrature.h @@ -86,7 +86,7 @@ namespace AMDiS { * \ref provideSurfaceQuadrature(). If the needed quadrature is not in the * list, a new list entry is created. */ - //static ::std::list<SurfaceQuadrature*> surfaceQuadratureList; + //static std::list<SurfaceQuadrature*> surfaceQuadratureList; }; } diff --git a/AMDiS/src/SurfaceRegion_ED.h b/AMDiS/src/SurfaceRegion_ED.h index 02c0653db52329cd4666d229c52a3f9bb8c1737e..9bf532a56b48928b23615226a94072b0ca107be8 100644 --- a/AMDiS/src/SurfaceRegion_ED.h +++ b/AMDiS/src/SurfaceRegion_ED.h @@ -89,18 +89,18 @@ namespace AMDiS { return newObj; }; - inline ::std::string getTypeName() const { return "SurfaceRegion_ED"; }; + inline std::string getTypeName() const { return "SurfaceRegion_ED"; }; inline const int getTypeID() const { return SURFACE_REGION; }; - void serialize(::std::ostream& out) + void serialize(std::ostream& out) { ElementData::serialize(out); out.write(reinterpret_cast<const char*>(&side_), sizeof(int)); out.write(reinterpret_cast<const char*>(®ion_), sizeof(int)); }; - void deserialize(::std::istream& in) + void deserialize(std::istream& in) { ElementData::deserialize(in); in.read(reinterpret_cast<char*>(&side_), sizeof(int)); diff --git a/AMDiS/src/SystemVector.h b/AMDiS/src/SystemVector.h index 4454f973867c684ee9b2f3a959703e358fb83c3e..9c372e5eb54d4a7272d1d3a7ee04db8c19000929 100644 --- a/AMDiS/src/SystemVector.h +++ b/AMDiS/src/SystemVector.h @@ -55,8 +55,8 @@ namespace AMDiS { /** \brief * Creators constructor. */ - Creator(const ::std::string &name_, - ::std::vector<FiniteElemSpace*> feSpace_, + Creator(const std::string &name_, + std::vector<FiniteElemSpace*> feSpace_, int size_) : name(name_), feSpace(feSpace_), @@ -73,11 +73,11 @@ namespace AMDiS { */ SystemVector *create() { char number[10]; - ::std::string numberedName; + std::string numberedName; SystemVector *result = NEW SystemVector(name, feSpace, size); for (int i = 0; i < size; i++) { sprintf(number, "[%d]", i); - numberedName = name + ::std::string(number); + numberedName = name + std::string(number); result->setDOFVector(i, NEW DOFVector<double>(feSpace[i], numberedName)); } return result; @@ -98,12 +98,12 @@ namespace AMDiS { /** \brief * Name of the system vector */ - ::std::string name; + std::string name; /** \brief * Finite element space used for creation. */ - ::std::vector<FiniteElemSpace*> feSpace; + std::vector<FiniteElemSpace*> feSpace; /** \brief * Number of component vectors to be created @@ -115,8 +115,8 @@ namespace AMDiS { /** \brief * Constructor. */ - SystemVector(const ::std::string& name_, - ::std::vector<FiniteElemSpace*> feSpace_, + SystemVector(const std::string& name_, + std::vector<FiniteElemSpace*> feSpace_, int size) : name(name_), feSpace(feSpace_), @@ -260,7 +260,7 @@ namespace AMDiS { return *this; }; - void serialize(::std::ostream &out) { + void serialize(std::ostream &out) { int size = vectors.getSize(); out.write(reinterpret_cast<const char*>(&size), sizeof(int)); for (int i = 0; i < size; i++) { @@ -268,7 +268,7 @@ namespace AMDiS { } }; - void deserialize(::std::istream &in) { + void deserialize(std::istream &in) { int size, oldSize = vectors.getSize(); in.read(reinterpret_cast<char*>(&size), sizeof(int)); vectors.resize(size); @@ -288,7 +288,7 @@ namespace AMDiS { } }; - void interpol(::std::vector<AbstractFunction<double, WorldVector<double> >*> *f) { + void interpol(std::vector<AbstractFunction<double, WorldVector<double> >*> *f) { int size = vectors.getSize(); for (int i = 0; i < size; i++) { vectors[i]->interpol((*f)[i]); @@ -308,12 +308,12 @@ namespace AMDiS { /** \brief * Name of the system vector */ - ::std::string name; + std::string name; /** \brief * Finite element space. */ - ::std::vector<FiniteElemSpace*> feSpace; + std::vector<FiniteElemSpace*> feSpace; /** \brief * Local dof vectors. diff --git a/AMDiS/src/TFQMR.h b/AMDiS/src/TFQMR.h index 66c1933cf13f26e53b160161c257508e7451e28c..67087e1d874cb8f1dc09a6e71bba6c93ce09f437 100644 --- a/AMDiS/src/TFQMR.h +++ b/AMDiS/src/TFQMR.h @@ -61,7 +61,7 @@ namespace AMDiS { /** \brief * constructor */ - TFQMR(::std::string name); + TFQMR(std::string name); /** \brief * destructor diff --git a/AMDiS/src/TFQMR.hh b/AMDiS/src/TFQMR.hh index ae8ea1f23e825c60661805bb0d8c72724015d7b6..a3773e7514d3909198b803f37a8e4b057237b8fa 100644 --- a/AMDiS/src/TFQMR.hh +++ b/AMDiS/src/TFQMR.hh @@ -4,7 +4,7 @@ namespace AMDiS { template<typename VectorType> - TFQMR<VectorType>::TFQMR(::std::string name) + TFQMR<VectorType>::TFQMR(std::string name) : OEMSolver<VectorType>(name), TOL_(1.e-25) { @@ -51,7 +51,7 @@ namespace AMDiS { matVec->matVec(NoTranspose, *x, *r0_); xpay(-1.0, *b, *r0_); double tau = norm(r0_); - ::std::cout << "NORM: " << tau << ::std::endl; + std::cout << "NORM: " << tau << std::endl; for (int iter = 0; iter < 1000; iter++) { for (int i = 0; i < x->getSize(); i++) { @@ -74,7 +74,7 @@ namespace AMDiS { matVec->matVec(NoTranspose, *x, *r0_); xpay(-1.0, *b, *r0_); tau = norm(r0_); - ::std::cout << "NORM: " << tau << ::std::endl; + std::cout << "NORM: " << tau << std::endl; return 1000; } diff --git a/AMDiS/src/TecPlotWriter.cc b/AMDiS/src/TecPlotWriter.cc index cbaa0a32e3e587e8d5085910bc9d0cf6a4bb281d..8e2d6e13f6d19866c452fab95436cb786d63c7c1 100644 --- a/AMDiS/src/TecPlotWriter.cc +++ b/AMDiS/src/TecPlotWriter.cc @@ -37,7 +37,7 @@ namespace AMDiS { } // write value - (*outFile) << (*values)[dof[i][n0]] << ::std::endl; + (*outFile) << (*values)[dof[i][n0]] << std::endl; } } @@ -80,7 +80,7 @@ namespace AMDiS { for(int j=0; j < values->getNumVectors(); j++) { (*outFile) << (*(values->getDOFVector(i)))[dof[i][n0]] << " "; } - (*outFile) << ::std::endl; + (*outFile) << std::endl; } } return 0; @@ -102,7 +102,7 @@ namespace AMDiS { default: ERROR_EXIT("invalid dim of world\n"); } - (*outFile) << ",\"" << values->getName() << "\"" << ::std::endl; + (*outFile) << ",\"" << values->getName() << "\"" << std::endl; } template<> @@ -126,7 +126,7 @@ namespace AMDiS { for(i = 0; i < number; i++) { (*outFile) << ",\"" << values->getDOFVector(i)->getName() << "\""; } - (*outFile) << ::std::endl; + (*outFile) << std::endl; } } diff --git a/AMDiS/src/TecPlotWriter.h b/AMDiS/src/TecPlotWriter.h index 0d0afad9ce31935a8605998255e66d383d306a54..37e271db7a65d1072a97c4aa82183e5e1634c550 100644 --- a/AMDiS/src/TecPlotWriter.h +++ b/AMDiS/src/TecPlotWriter.h @@ -75,13 +75,13 @@ namespace AMDiS { }; }; - typedef ::std::vector<VertexInfo> DOFCoords; + typedef std::vector<VertexInfo> DOFCoords; static T* values; static int nv; - static ::std::ofstream* outFile; + static std::ofstream* outFile; static bool writeCoords; - static ::std::vector<DOFCoords> dofCoords; + static std::vector<DOFCoords> dofCoords; }; } diff --git a/AMDiS/src/TecPlotWriter.hh b/AMDiS/src/TecPlotWriter.hh index 0105a1051a245ba09e98a31a7363e4898a1b42ce..f507af49f5d11d322ac4640b5814db3d63bda02c 100644 --- a/AMDiS/src/TecPlotWriter.hh +++ b/AMDiS/src/TecPlotWriter.hh @@ -11,11 +11,11 @@ namespace AMDiS { template<typename T> int TecPlotWriter<T>::nv = 1; - template<typename T> ::std::ofstream* TecPlotWriter<T>::outFile = NULL; + template<typename T> std::ofstream* TecPlotWriter<T>::outFile = NULL; template<typename T> bool TecPlotWriter<T>::writeCoords = false; - template<typename T> ::std::vector<typename TecPlotWriter<T>::DOFCoords> + template<typename T> std::vector<typename TecPlotWriter<T>::DOFCoords> TecPlotWriter<T>::dofCoords; template<typename T> @@ -38,7 +38,7 @@ namespace AMDiS { (*outFile) << coords->vertex_index; } } - (*outFile) << ::std::endl; + (*outFile) << std::endl; return 0; } @@ -58,13 +58,13 @@ namespace AMDiS { TEST_EXIT(values->getFESpace()->getMesh())("no mesh\n"); if(!additional) - outFile = new ::std::ofstream(filename); + outFile = new std::ofstream(filename); else - outFile = new ::std::ofstream(filename, ::std::ios::app); + outFile = new std::ofstream(filename, std::ios::app); TEST_EXIT(outFile)("can't open file %s\n", filename); - outFile->setf(::std::ios::scientific,::std::ios::floatfield); + outFile->setf(std::ios::scientific,std::ios::floatfield); const DOFAdmin* admin = values->getFESpace()->getAdmin(); Mesh* mesh = values->getFESpace()->getMesh(); @@ -79,7 +79,7 @@ namespace AMDiS { if(dim == 1 && dow == 1) { // use ordered plot if(!additional) { - (*outFile) << "TITLE = \"" << plotTitle << "\"" << ::std::endl; + (*outFile) << "TITLE = \"" << plotTitle << "\"" << std::endl; } // write file header @@ -92,7 +92,7 @@ namespace AMDiS { if(additional) { (*outFile) << ", D=(1)"; } - (*outFile) << ::std::endl << ::std::endl; + (*outFile) << std::endl << std::endl; // write data @@ -101,19 +101,19 @@ namespace AMDiS { } else { // dow !=1 => use FE-plot for(int i=0; i < 150; i++) (*outFile) << " "; - (*outFile) << ::std::endl; + (*outFile) << std::endl; // write data nv = 1; mesh->traverse(-1, Mesh::CALL_LEAF_EL|Mesh::FILL_COORDS, writeValuesFct); - (*outFile) << ::std::endl; + (*outFile) << std::endl; mesh->traverse(-1, Mesh::CALL_LEAF_EL|Mesh::FILL_COORDS, writeIndicesFct); // write file header outFile->seekp(0); if(!additional) { - (*outFile) << "TITLE = \"" << plotTitle << "\"" << ::std::endl; + (*outFile) << "TITLE = \"" << plotTitle << "\"" << std::endl; writeVarName(dim); } @@ -126,7 +126,7 @@ namespace AMDiS { (*outFile) << ((dim==3) ? "1,2,3" : "1,2"); (*outFile) << ",FECONNECT)"; } - (*outFile) << ::std::endl; + (*outFile) << std::endl; } diff --git a/AMDiS/src/Tetrahedron.h b/AMDiS/src/Tetrahedron.h index ceb031f37a4bc01fad85d4750f4b551b7cba4b81..8a2c4de5b0affe6f5dd9283929f1a73f2c39a731 100644 --- a/AMDiS/src/Tetrahedron.h +++ b/AMDiS/src/Tetrahedron.h @@ -142,7 +142,7 @@ namespace AMDiS { // ===== Serializable implementation ===== - ::std::string getTypeName() const { + std::string getTypeName() const { return "Tetrahedron"; }; diff --git a/AMDiS/src/Traverse.h b/AMDiS/src/Traverse.h index ba099231a865cbf393cdd539e357b84e4850b4da..ba18bf0f6ca881101664e01146ca76c58ec49a3d 100644 --- a/AMDiS/src/Traverse.h +++ b/AMDiS/src/Traverse.h @@ -199,7 +199,7 @@ namespace AMDiS { /** \brief * Iterator to the current MacroElement */ - ::std::deque<MacroElement*>::const_iterator currentMacro; + std::deque<MacroElement*>::const_iterator currentMacro; /** \brief * Mesh which is currently traversed @@ -236,12 +236,12 @@ namespace AMDiS { /** \brief * */ - ::std::vector<ElInfo*> elinfo_stack; + std::vector<ElInfo*> elinfo_stack; /** \brief * */ - ::std::vector<unsigned char> info_stack; + std::vector<unsigned char> info_stack; /** \brief * @@ -251,12 +251,12 @@ namespace AMDiS { /** \brief * */ - ::std::vector<ElInfo*> save_elinfo_stack; + std::vector<ElInfo*> save_elinfo_stack; /** \brief * */ - ::std::vector<unsigned char> save_info_stack; + std::vector<unsigned char> save_info_stack; /** \brief * diff --git a/AMDiS/src/TraverseParallel.cc b/AMDiS/src/TraverseParallel.cc index d6b99c7a4b85913d969efa1362950cda6903546d..bd770b466e413200f853097df11959b7b109c492 100644 --- a/AMDiS/src/TraverseParallel.cc +++ b/AMDiS/src/TraverseParallel.cc @@ -16,7 +16,7 @@ namespace AMDiS { stacks_.resize(nThreads_); int i = 0; - for (::std::vector<TraverseStack*>::iterator it = stacks_.begin(); + for (std::vector<TraverseStack*>::iterator it = stacks_.begin(); it != stacks_.end(); ++it) { @@ -29,7 +29,7 @@ namespace AMDiS { TraverseParallelStack::~TraverseParallelStack() { - for (::std::vector<TraverseStack*>::iterator it = stacks_.begin(); + for (std::vector<TraverseStack*>::iterator it = stacks_.begin(); it != stacks_.end(); ++it) { diff --git a/AMDiS/src/TraverseParallel.h b/AMDiS/src/TraverseParallel.h index 83f5072b1945228375a4431978b7c7c8f98d4c3e..2b71d1092b692200cc1185433114be985ac425e2 100644 --- a/AMDiS/src/TraverseParallel.h +++ b/AMDiS/src/TraverseParallel.h @@ -58,7 +58,7 @@ namespace AMDiS { */ int nThreads_; - ::std::vector<TraverseStack*> stacks_; + std::vector<TraverseStack*> stacks_; }; } diff --git a/AMDiS/src/Triangle.h b/AMDiS/src/Triangle.h index 9ca6fbf7448efb51352b83deac37642173de8aa6..5ab11e52ac5e9733b759d313dd5355b507b4395b 100644 --- a/AMDiS/src/Triangle.h +++ b/AMDiS/src/Triangle.h @@ -165,7 +165,7 @@ namespace AMDiS { // ===== Serializable implementation ===== - ::std::string getTypeName() const { + std::string getTypeName() const { return "Triangle"; }; diff --git a/AMDiS/src/UmfPackSolver.h b/AMDiS/src/UmfPackSolver.h index 7b1bd476c4dc1f90feb047649135a022663419e7..fcbc07c274bd057c78657d40e332c49c659be8f3 100644 --- a/AMDiS/src/UmfPackSolver.h +++ b/AMDiS/src/UmfPackSolver.h @@ -69,7 +69,7 @@ namespace AMDiS { /** \brief * constructor */ - UmfPackSolver(::std::string name); + UmfPackSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/UmfPackSolver.hh b/AMDiS/src/UmfPackSolver.hh index a9daebddb13c9f44383e02ad6e65a74a10e60be8..42e47c8b651a5560968748b9661496a7287a7f02 100644 --- a/AMDiS/src/UmfPackSolver.hh +++ b/AMDiS/src/UmfPackSolver.hh @@ -10,7 +10,7 @@ namespace AMDiS { template<typename VectorType> - UmfPackSolver<VectorType>::UmfPackSolver(::std::string name) + UmfPackSolver<VectorType>::UmfPackSolver(std::string name) : OEMSolver<VectorType>(name), symbolic_(NULL), storeSymbolic_(0) @@ -46,7 +46,7 @@ namespace AMDiS { // The new matrix has to be stored in compressed col format, therefore // the cols are collected. - ::std::vector< ::std::vector< MatEntry > > cols(newMatrixSize, ::std::vector<MatEntry>(0)); + std::vector< std::vector< MatEntry > > cols(newMatrixSize, std::vector<MatEntry>(0)); // Counter for the number of non-zero elements in the new matrix. int nElements = 0; diff --git a/AMDiS/src/V3Vector.cc b/AMDiS/src/V3Vector.cc index d4f01014dfd34a9cfe70cd2b824d96ccf35f218e..5f67a62b894903383f792417e5449d1e26af8786 100644 --- a/AMDiS/src/V3Vector.cc +++ b/AMDiS/src/V3Vector.cc @@ -21,19 +21,19 @@ namespace AMDiS { void M33::print() { - ::std::cout << "["; + std::cout << "["; for (int i = 0; i < 9; i++) { - ::std::cout << data[i] << ","; + std::cout << data[i] << ","; } - ::std::cout << "]" << ::std::endl; + std::cout << "]" << std::endl; }; -/* double norm(::std::vector<V3> *v) { +/* double norm(std::vector<V3> *v) { double result = 0.0; - ::std::vector<V3>::iterator it; + std::vector<V3>::iterator it; for (it = v->begin(); it < v->end(); ++it) { result += (*it)[0] * (*it)[0] + (*it)[1] * (*it)[1] + (*it)[2] * (*it)[2]; @@ -42,9 +42,9 @@ namespace AMDiS { return(sqrt(result)); }; - void setValue(::std::vector<V3>& v, double value) + void setValue(std::vector<V3>& v, double value) { - ::std::vector<V3>::iterator it; + std::vector<V3>::iterator it; for (it = v.begin(); it < v.end(); ++it) { (*it)[0] = value; @@ -62,9 +62,9 @@ namespace AMDiS { return(x1); } - const ::std::vector<V3>& operator*=(::std::vector<V3>& x, double scal) + const std::vector<V3>& operator*=(std::vector<V3>& x, double scal) { - ::std::vector<V3>::iterator it; + std::vector<V3>::iterator it; for (it = x.begin(); it < x.end(); ++it) { (*it)[0] *= scal; @@ -75,11 +75,11 @@ namespace AMDiS { return(x); }; - const ::std::vector<V3>& operator+=(::std::vector<V3>& x1, - const ::std::vector<V3>& x2) + const std::vector<V3>& operator+=(std::vector<V3>& x1, + const std::vector<V3>& x2) { - ::std::vector<V3>::iterator it1; - ::std::vector<V3>::const_iterator it2; + std::vector<V3>::iterator it1; + std::vector<V3>::const_iterator it2; for (it1 = x1.begin(), it2 = x2.begin(); it1 < x1.end(); @@ -92,11 +92,11 @@ namespace AMDiS { return(x1); }; - double operator*(::std::vector<V3>& x1, ::std::vector<V3>& x2) + double operator*(std::vector<V3>& x1, std::vector<V3>& x2) { double result = 0.0; - ::std::vector<V3>::iterator it1, it2; + std::vector<V3>::iterator it1, it2; for (it1 = x1.begin(), it2 = x2.begin(); it1 < x1.end(); @@ -110,10 +110,10 @@ namespace AMDiS { }; - void axpy(double alpha, const ::std::vector<V3>& x, ::std::vector<V3>& y) + void axpy(double alpha, const std::vector<V3>& x, std::vector<V3>& y) { - ::std::vector<V3>::const_iterator it1; - ::std::vector<V3>::iterator it2; + std::vector<V3>::const_iterator it1; + std::vector<V3>::iterator it2; for (it1 = x.begin(), it2 = y.begin(); it1 < x.end(); @@ -124,10 +124,10 @@ namespace AMDiS { } }; - void xpay(double alpha, const ::std::vector<V3>& x, ::std::vector<V3>& y) + void xpay(double alpha, const std::vector<V3>& x, std::vector<V3>& y) { - ::std::vector<V3>::const_iterator it1; - ::std::vector<V3>::iterator it2; + std::vector<V3>::const_iterator it1; + std::vector<V3>::iterator it2; for (it1 = x.begin(), it2 = y.begin(); it1 < x.end(); @@ -146,28 +146,28 @@ namespace AMDiS { result[1] = mat[3] * vec[0] + mat[4] * vec[1] + mat[5] * vec[2]; result[2] = mat[6] * vec[0] + mat[7] * vec[1] + mat[8] * vec[2]; -// ::std::cout << "------------------------" << ::std::endl; -// ::std::cout << "M = "; +// std::cout << "------------------------" << std::endl; +// std::cout << "M = "; // mat.print(); -// ::std::cout << "v = "; +// std::cout << "v = "; // print(&vec); -// ::std::cout << "r = "; +// std::cout << "r = "; // print(&result); return(result); }; - void print(::std::vector<V3> *v) + void print(std::vector<V3> *v) { - ::std::vector<V3>::const_iterator it; + std::vector<V3>::const_iterator it; - ::std::cout << "["; + std::cout << "["; for (it = v->begin(); it < v->end(); ++it) { - ::std::cout << "(" << (*it)[0] << "," << (*it)[1] << "," << (*it)[2] << ") "; + std::cout << "(" << (*it)[0] << "," << (*it)[1] << "," << (*it)[2] << ") "; } - ::std::cout << "]" << ::std::endl; + std::cout << "]" << std::endl; }; */ } diff --git a/AMDiS/src/V3Vector.h b/AMDiS/src/V3Vector.h index 4543740eb98670865bb0e8e91dceecb06d83e654..601eab4ae78e92e449a4a4041ea32b94c163220f 100644 --- a/AMDiS/src/V3Vector.h +++ b/AMDiS/src/V3Vector.h @@ -45,7 +45,7 @@ namespace AMDiS { return data != a.getData(); }; - ::std::vector<double> getData() const { + std::vector<double> getData() const { return data; }; @@ -56,7 +56,7 @@ namespace AMDiS { void print(); private: - ::std::vector<double> data; + std::vector<double> data; }; struct MatEntry33 @@ -66,9 +66,9 @@ namespace AMDiS { M33 entry; }; /* - typedef ::std::vector<double> V3; + typedef std::vector<double> V3; - class V3Creator : public CreatorInterface< ::std::vector<V3> > { + class V3Creator : public CreatorInterface< std::vector<V3> > { public: MEMORY_MANAGED(V3Creator); @@ -78,13 +78,13 @@ namespace AMDiS { virtual ~V3Creator() {}; - ::std::vector<V3> *create() { - ::std::vector<V3> *vec = new ::std::vector<V3>(size_, V3(3)); + std::vector<V3> *create() { + std::vector<V3> *vec = new std::vector<V3>(size_, V3(3)); return vec; }; - void free(::std::vector<V3> *vec) { + void free(std::vector<V3> *vec) { delete vec; }; @@ -92,26 +92,26 @@ namespace AMDiS { int size_; }; - double norm(::std::vector<V3> *v); + double norm(std::vector<V3> *v); - void setValue(::std::vector<V3>& v, double value); + void setValue(std::vector<V3>& v, double value); const V3& operator += (V3& x1, const V3 x2); - const ::std::vector<V3>& operator*=(::std::vector<V3>& x, double scal); + const std::vector<V3>& operator*=(std::vector<V3>& x, double scal); - const ::std::vector<V3>& operator+=(::std::vector<V3>& x1, - const ::std::vector<V3>& x2); + const std::vector<V3>& operator+=(std::vector<V3>& x1, + const std::vector<V3>& x2); - double operator*(::std::vector<V3>& x1, ::std::vector<V3>& x2); + double operator*(std::vector<V3>& x1, std::vector<V3>& x2); - void axpy(double alpha, const ::std::vector<V3>& x, ::std::vector<V3>& y); + void axpy(double alpha, const std::vector<V3>& x, std::vector<V3>& y); - void xpay(double alpha, const ::std::vector<V3>& x, ::std::vector<V3>& y); + void xpay(double alpha, const std::vector<V3>& x, std::vector<V3>& y); V3 mult(M33 mat, V3 vec); - void print(::std::vector<V3> *v);*/ + void print(std::vector<V3> *v);*/ } #endif diff --git a/AMDiS/src/ValueReader.cc b/AMDiS/src/ValueReader.cc index 78b4cf55a51a3a70609df562c6b679995b30330f..4da980968c2ad6f7105efb2d5fcb837c93e1c48d 100644 --- a/AMDiS/src/ValueReader.cc +++ b/AMDiS/src/ValueReader.cc @@ -25,21 +25,21 @@ namespace AMDiS { TEST_EXIT(dofVector)("no DOF vector specified\n"); TEST_EXIT(macroFileInfo)("no MacroInfo specified\n"); - ::std::string line; + std::string line; // open the file and read the data to the vector values. - ::std::ifstream file(filename, ::std::ifstream::in); + std::ifstream file(filename, std::ifstream::in); while (!file.eof()) { getline(file, line); - if (line.find("vertex values:") != ::std::string::npos) + if (line.find("vertex values:") != std::string::npos) break; } // A vertex value cannot be the last line of the file, if the file is correct. TEST_EXIT(!file.eof())("Value file does not contain vertex values\n"); double value; - ::std::vector<double> values; + std::vector<double> values; values.clear(); while (!file.eof()) { diff --git a/AMDiS/src/ValueWriter.cc b/AMDiS/src/ValueWriter.cc index 4d60278427a4ad704befbb6fff7ac54db650d59e..0d168f42c1450915ab6a7e0b8fff48189080f156 100644 --- a/AMDiS/src/ValueWriter.cc +++ b/AMDiS/src/ValueWriter.cc @@ -12,11 +12,11 @@ namespace AMDiS { FILE* ValueWriter::valueFile = NULL; DOFVector<double>* ValueWriter::valueVec = NULL; DOFVector<int>* ValueWriter::interpPointInd = NULL; - DOFVector< ::std::list<WorldVector<double> > >* ValueWriter::dofCoords = NULL; + DOFVector< std::list<WorldVector<double> > >* ValueWriter::dofCoords = NULL; int ValueWriter::ni = 0; void ValueWriter::writeValues(DataCollector *dc, - const ::std::string filename, + const std::string filename, double time, int level, Flag traverseFlag, @@ -26,31 +26,31 @@ namespace AMDiS { TEST_EXIT(dc)("no data collector\n"); - ::std::ofstream file; + std::ofstream file; file.open(filename.c_str()); - file << "mesh name: " << dc->getMesh()->getName() << ::std::endl << ::std::endl; - file << "time: " << ::std::scientific << time << ::std::endl << ::std::endl; - file << "number of values: 1" << ::std::endl << ::std::endl; - file << "value description: " << dc->getValues()->getName() << ::std::endl; + file << "mesh name: " << dc->getMesh()->getName() << std::endl << std::endl; + file << "time: " << std::scientific << time << std::endl << std::endl; + file << "number of values: 1" << std::endl << std::endl; + file << "value description: " << dc->getValues()->getName() << std::endl; file << "number of interpolation points: " << dc->getNumberInterpPoints() - << ::std::endl; - file << "type: scalar" << ::std::endl; - file << "interpolation type: lagrange" << ::std::endl; + << std::endl; + file << "type: scalar" << std::endl; + file << "interpolation type: lagrange" << std::endl; file << "interpolation degree: " << dc->getFeSpace()->getBasisFcts()->getDegree() - << ::std::endl; + << std::endl; file << "end of description: " << dc->getValues()->getName() - << ::std::endl << ::std::endl; + << std::endl << std::endl; /* ----- write vertex values -----*/ DOFVector<int>::Iterator intPointIt(dc->getInterpPointInd(), USED_DOFS); DOFVector<double>::Iterator valueIt(dc->getValues(), USED_DOFS); - DOFVector< ::std::list<WorldVector<double> > >::Iterator + DOFVector< std::list<WorldVector<double> > >::Iterator coordIt(dc->getDofCoords(), USED_DOFS); - file << "vertex values: " << dc->getValues()->getName() << ::std::endl; + file << "vertex values: " << dc->getValues()->getName() << std::endl; for (intPointIt.reset(), valueIt.reset(), coordIt.reset(); !intPointIt.end(); @@ -58,42 +58,42 @@ namespace AMDiS { if (*intPointIt == -2) { for (int i = 0; i < (int) coordIt->size(); i++) { - file << ::std::scientific << *valueIt << ::std::endl; + file << std::scientific << *valueIt << std::endl; } } } - file << ::std::endl << ::std::endl; + file << std::endl << std::endl; /* ----- write interpolation values ----- */ - file << "interpolation values: " << dc->getValues()->getName() << ::std::endl; + file << "interpolation values: " << dc->getValues()->getName() << std::endl; for (intPointIt.reset(), valueIt.reset(); !intPointIt.end(); ++intPointIt, ++valueIt) { if (*intPointIt >= 0) { - file << ::std::scientific << *valueIt << ::std::endl; + file << std::scientific << *valueIt << std::endl; } } - file << ::std::endl << ::std::endl; + file << std::endl << std::endl; /* ----- write interpolation points for each simplex */ - file << "element interpolation points: " << dc->getValues()->getName() << ::std::endl; + file << "element interpolation points: " << dc->getValues()->getName() << std::endl; - ::std::vector< ::std::vector<int> >* interpPoints = dc->getInterpPoints(); - ::std::vector< ::std::vector<int> >::iterator it1; - ::std::vector<int>::iterator it2; + std::vector< std::vector<int> >* interpPoints = dc->getInterpPoints(); + std::vector< std::vector<int> >::iterator it1; + std::vector<int>::iterator it2; for (it1 = interpPoints->begin(); it1 != interpPoints->end(); ++it1) { for (it2 = it1->begin(); it2 != it1->end(); ++it2) { file << (*it2) << " "; } - file << ::std::endl; + file << std::endl; } - file << ::std::endl; + file << std::endl; file.close(); } diff --git a/AMDiS/src/ValueWriter.h b/AMDiS/src/ValueWriter.h index db7c01a13e05569b438a55e8ed8481a30955c148..eb77eef87c56d794cebfc6d5db2ead8646a50206 100644 --- a/AMDiS/src/ValueWriter.h +++ b/AMDiS/src/ValueWriter.h @@ -57,7 +57,7 @@ namespace AMDiS { * Writes DOFVector values to values->feSpace->mesh. */ static void writeValues(DataCollector *dc, - const ::std::string filename, + const std::string filename, double time = 0.0, int level = -1, Flag traverseFlag = Mesh::CALL_LEAF_EL, @@ -77,7 +77,7 @@ namespace AMDiS { /** \brief * list of coords for each dof */ - static DOFVector< ::std::list<WorldVector<double> > > *dofCoords; + static DOFVector< std::list<WorldVector<double> > > *dofCoords; /** \brief * DOFAdmin of values diff --git a/AMDiS/src/VecSymSolver.h b/AMDiS/src/VecSymSolver.h index dabe18e2a06bcb0af5aa5bec206eca74c98ce67d..632719ef0da29754032b72e02a95e0b7d1a94a48 100644 --- a/AMDiS/src/VecSymSolver.h +++ b/AMDiS/src/VecSymSolver.h @@ -64,7 +64,7 @@ namespace AMDiS { /** \brief * constructor */ - VecSymSolver(::std::string name); + VecSymSolver(std::string name); /** \brief * destructor diff --git a/AMDiS/src/VecSymSolver.hh b/AMDiS/src/VecSymSolver.hh index 15332bcb9674452562e15728e69cc8c886540aea..3e5f522d287469f8ee3ac0e778a19540dd7d7b56 100644 --- a/AMDiS/src/VecSymSolver.hh +++ b/AMDiS/src/VecSymSolver.hh @@ -11,7 +11,7 @@ namespace AMDiS { template<typename VectorType> - VecSymSolver<VectorType>::VecSymSolver(::std::string name) + VecSymSolver<VectorType>::VecSymSolver(std::string name) : OEMSolver<VectorType>(name) {} @@ -35,11 +35,11 @@ namespace AMDiS { int oneMatrixSize = dofm->getFESpace()->getAdmin()->getUsedSize(); int bigMatrixSize = oneMatrixSize; - ::std::vector< ::std::vector< MatEntry33 > > newm; + std::vector< std::vector< MatEntry33 > > newm; newm.resize(bigMatrixSize); - ::std::vector<V3> xvec(bigMatrixSize); - ::std::vector<V3> bvec(bigMatrixSize); + std::vector<V3> xvec(bigMatrixSize); + std::vector<V3> bvec(bigMatrixSize); for (int i = 0; i < bigMatrixSize; i++) { xvec[i].resize(3); bvec[i].resize(3); @@ -49,15 +49,15 @@ namespace AMDiS { for (int stencilCol = 0; stencilCol < nComponents; stencilCol++) { if (!(*m)[stencilRow][stencilCol]) { -// ::std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist 0!" << ::std::endl; +// std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist 0!" << std::endl; continue; } else { (*m)[stencilRow][stencilCol]->print(); if ((*m)[stencilRow][stencilCol]->symmetric()) { - ::std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist symmetrisch!" << ::std::endl; + std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist symmetrisch!" << std::endl; } else { - ::std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist nicht symmetrisch!" << ::std::endl; + std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist nicht symmetrisch!" << std::endl; } }; @@ -70,7 +70,7 @@ namespace AMDiS { // if ((stencilRow == 0) && (stencilCol == 0) && // (rowIndex == 0) && ((*matrixRow)[i].col == 0)) { -// ::std::cout << "Dich habe ich: " << (*matrixRow)[i].entry << ::std::endl; +// std::cout << "Dich habe ich: " << (*matrixRow)[i].entry << std::endl; // } for (int j = 0; j < static_cast<int>(newm[rowIndex].size()); j++) { @@ -81,7 +81,7 @@ namespace AMDiS { if (newMe == NULL) { // if ((rowIndex == 0) && ((*matrixRow)[i].col == 0)) { -// ::std::cout << "0-Matrix neu anlegen!" << ::std::endl; +// std::cout << "0-Matrix neu anlegen!" << std::endl; // }; MatEntry33 newMe; @@ -90,7 +90,7 @@ namespace AMDiS { newm[rowIndex].push_back(newMe); // if ((rowIndex == 0) && ((*matrixRow)[i].col == 0)) { -// ::std::cout << "0-Matrix: " << ::std::endl; +// std::cout << "0-Matrix: " << std::endl; // newMe.entry.print(); // } @@ -98,7 +98,7 @@ namespace AMDiS { newMe->entry.set(stencilRow, stencilCol, (*matrixRow)[i].entry); // if ((rowIndex == 0) && ((*matrixRow)[i].col == 0)) { -// ::std::cout << "0-Matrix: " << ::std::endl; +// std::cout << "0-Matrix: " << std::endl; // newMe->entry.print(); // } } @@ -125,27 +125,27 @@ namespace AMDiS { } - ::std::cout << "Gesuchter Vektor ist: " << ::std::endl; + std::cout << "Gesuchter Vektor ist: " << std::endl; for (int i = 0; i < x->getSize(); i++) { DOFVector<double>::Iterator it(x->getDOFVector(i), USED_DOFS); int counter = 0; for (it.reset(); !it.end(); it++, counter++) { - ::std::cout << (*it) << ::std::endl; + std::cout << (*it) << std::endl; xvec[counter][i] = *it; } } - ::std::cout << "Rechte Seite ist: " << ::std::endl; + std::cout << "Rechte Seite ist: " << std::endl; for (int i = 0; i < b->getSize(); i++) { DOFVector<double>::Iterator it(b->getDOFVector(i), USED_DOFS); int counter = 0; for (it.reset(); !it.end(); it++, counter++) { - ::std::cout << (*it) << ::std::endl; + std::cout << (*it) << std::endl; bvec[counter][i] = *it; } @@ -156,16 +156,16 @@ namespace AMDiS { for (int i = 0; i < static_cast<int>(newm.size()); i++) { -// ::std::cout << "Zeile " << i << ": " << ::std::endl; +// std::cout << "Zeile " << i << ": " << std::endl; for (int j = 0; j < static_cast<int>(newm[i].size()); j++) { int col = newm[i][j].col; -// ::std::cout << col << ": [ "; +// std::cout << col << ": [ "; // for (int k = 0; k < 9; k++) { -// ::std::cout << newm[i][j].entry[k] << " "; +// std::cout << newm[i][j].entry[k] << " "; // } -// ::std::cout << "], "; +// std::cout << "], "; if (col != i) { for (int k = 0; k < static_cast<int>(newm[col].size()); k++) { @@ -178,27 +178,27 @@ namespace AMDiS { } } -// ::std::cout << ::std::endl; +// std::cout << std::endl; } if (isSym) { - ::std::cout << "Gesamtmatrix ist symmetrisch!" << ::std::endl; + std::cout << "Gesamtmatrix ist symmetrisch!" << std::endl; } else { - ::std::cout << "Gesamtmatrix ist nicht symmetrisch!" << ::std::endl; + std::cout << "Gesamtmatrix ist nicht symmetrisch!" << std::endl; } - CGSolver< ::std::vector<V3> > solver2(this->name); + CGSolver< std::vector<V3> > solver2(this->name); solver2.initParameters(); solver2.setVectorCreator(NEW V3Creator(bigMatrixSize)); - StandardMatVec< ::std::vector< ::std::vector<MatEntry33> >, ::std::vector<V3> > mv(&newm); + StandardMatVec< std::vector< std::vector<MatEntry33> >, std::vector<V3> > mv(&newm); *p = *x; *p *= -1.0; matVec->matVec(NoTranspose, *p, *r); *r += *b; - ::std::cout << "Checking res 1: " << norm(r) << ::std::endl; + std::cout << "Checking res 1: " << norm(r) << std::endl; solver2.solve(&mv, &xvec, &bvec); @@ -216,7 +216,7 @@ namespace AMDiS { matVec->matVec(NoTranspose, *p, *r); *r += *b; - ::std::cout << "Checking res 2: " << norm(r) << ::std::endl; + std::cout << "Checking res 2: " << norm(r) << std::endl; ERROR_EXIT("na, dass wars wohl!\n"); @@ -242,9 +242,9 @@ namespace AMDiS { int oneMatrixSize = dofm->getFESpace()->getAdmin()->getUsedSize(); int bigMatrixSize = oneMatrixSize * nComponents; - ::std::vector< ::std::vector< MatEntry > > newm(bigMatrixSize, ::std::vector<MatEntry>(0)); - ::std::vector<double> xvec(bigMatrixSize); - ::std::vector<double> bvec(bigMatrixSize); + std::vector< std::vector< MatEntry > > newm(bigMatrixSize, std::vector<MatEntry>(0)); + std::vector<double> xvec(bigMatrixSize); + std::vector<double> bvec(bigMatrixSize); int nElements = 0; @@ -255,8 +255,8 @@ namespace AMDiS { continue; } - // ::std::cout << "------------------------------" << ::std::endl; - // ::std::cout << "Matrix " << stencilRow << " - " << stencilCol << ::std::endl; + // std::cout << "------------------------------" << std::endl; + // std::cout << "Matrix " << stencilRow << " - " << stencilCol << std::endl; // (*m)[stencilRow][stencilCol]->print(); @@ -277,9 +277,9 @@ namespace AMDiS { } // if ((*m)[stencilRow][stencilCol]->symmetric()) { -// ::std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist symmetrisch!" << ::std::endl; +// std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist symmetrisch!" << std::endl; // } else { -// ::std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist nicht symmetrisch!" << ::std::endl; +// std::cout << "Matrix " << stencilRow << "-" << stencilCol << " ist nicht symmetrisch!" << std::endl; // } @@ -299,13 +299,13 @@ namespace AMDiS { } } -// ::std::cout << "-------------------------------" << ::std::endl; +// std::cout << "-------------------------------" << std::endl; // for (int i = 0; i < static_cast<int>(newm.size()); i++) { -// ::std::cout << "row : " << i << ::std::endl; +// std::cout << "row : " << i << std::endl; // for (int j = 0; j < static_cast<int>(newm[i].size()); j++) { -// ::std::cout << " ( " << newm[i][j].col << ", " << newm[i][j].entry << ")"; +// std::cout << " ( " << newm[i][j].col << ", " << newm[i][j].entry << ")"; // } -// ::std::cout << ::std::endl; +// std::cout << std::endl; // } for (int i = 0; i < x->getSize(); i++) { @@ -327,21 +327,21 @@ namespace AMDiS { } /* ======= CHOLMOD ========= - ::std::fstream file; + std::fstream file; file.open("matrix.m", fstream::out); - file << newm.size() << " " << newm.size() << " " << nElements << ::std::endl; + file << newm.size() << " " << newm.size() << " " << nElements << std::endl; for (int i = 0; i < static_cast<int>(newm.size()); i++) { for (int j = 0; j < static_cast<int>(newm[i].size()); j++) { - file << i + 1 << " " << newm[i][j].col + 1 << " " << newm[i][j].entry << ::std::endl; + file << i + 1 << " " << newm[i][j].col + 1 << " " << newm[i][j].entry << std::endl; } } file.close(); file.open("vector.m", fstream::out); - file << bvec.size() << " 1" << ::std::endl; + file << bvec.size() << " 1" << std::endl; for (int i = 0; i < static_cast<int>(bvec.size()); i++) { - file << bvec[i] << ::std::endl; + file << bvec[i] << std::endl; } file.close(); */ @@ -365,9 +365,9 @@ namespace AMDiS { } if (isSym) { - ::std::cout << "Matrix is symmetrisch!" << ::std::endl; + std::cout << "Matrix is symmetrisch!" << std::endl; } else { - ::std::cout << "Matrix ist nicht symmetrisch!" << ::std::endl; + std::cout << "Matrix ist nicht symmetrisch!" << std::endl; } @@ -397,19 +397,19 @@ namespace AMDiS { ch_x = cholmod_solve(CHOLMOD_A, L, ch_b, &c); ch_r = cholmod_copy_dense(ch_b, &c); cholmod_sdmult (A, 0, m1, one, ch_x, ch_r, &c) ; - ::std::cout << "NORM: " << cholmod_norm_dense(ch_r, 2, &c) << ::std::endl; + std::cout << "NORM: " << cholmod_norm_dense(ch_r, 2, &c) << std::endl; cholmod_finish(&c); */ - //GMResSolver2< ::std::vector<double> > solver2(this->name); - //CGSolver< ::std::vector<double> > solver2(this->name); - // BiCGStab< ::std::vector<double> > solver2(this->name); + //GMResSolver2< std::vector<double> > solver2(this->name); + //CGSolver< std::vector<double> > solver2(this->name); + // BiCGStab< std::vector<double> > solver2(this->name); // solver2.initParameters(); // solver2.setVectorCreator(NEW StlVectorCreator(bigMatrixSize)); - // StandardMatVec< ::std::vector< ::std::vector<MatEntry> >, ::std::vector<double> > mv(&newm); + // StandardMatVec< std::vector< std::vector<MatEntry> >, std::vector<double> > mv(&newm); // ILUPreconditionerStd ilu; // ilu.setMatrix(&newm); @@ -433,7 +433,7 @@ namespace AMDiS { matVec->matVec(NoTranspose, *p, *r); *r += *b; - ::std::cout << "NORM: " << norm(r) << ::std::endl; + std::cout << "NORM: " << norm(r) << std::endl; // ERROR_EXIT("DA\n"); diff --git a/AMDiS/src/VertexVector.cc b/AMDiS/src/VertexVector.cc index effe10df0e567fc75292d2b9d71d251dd59fddeb..919458be8472cb56500e7fbfbc6d12d6a950384d 100644 --- a/AMDiS/src/VertexVector.cc +++ b/AMDiS/src/VertexVector.cc @@ -4,7 +4,7 @@ namespace AMDiS { - VertexVector::VertexVector(const DOFAdmin *admin_, ::std::string name_) + VertexVector::VertexVector(const DOFAdmin *admin_, std::string name_) : DOFVectorDOF() { name = name_; diff --git a/AMDiS/src/VertexVector.h b/AMDiS/src/VertexVector.h index 99e3e07b2caa86302255d17757fc45cf8d86b633..11ef6a4e48c31be53bd6a73ce6c670c51bde9b91 100644 --- a/AMDiS/src/VertexVector.h +++ b/AMDiS/src/VertexVector.h @@ -19,7 +19,7 @@ namespace AMDiS { {}; }; - VertexVector(const DOFAdmin *admin_, ::std::string name_); + VertexVector(const DOFAdmin *admin_, std::string name_); ~VertexVector(); @@ -35,7 +35,7 @@ namespace AMDiS { void set(DegreeOfFreedom val); - void compressDOFContainer(int size, ::std::vector<DegreeOfFreedom> &newDOF) { + void compressDOFContainer(int size, std::vector<DegreeOfFreedom> &newDOF) { DOFContainer::compressDOFContainer(size, newDOF); int totalSize = getAdmin()->getSize(); for(int i = size; i < totalSize; i++) {