Commit 745701c4 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Exact error computation added

* ::std:: -> std::
parent 4a775f34
...@@ -43,7 +43,7 @@ namespace AMDiS { ...@@ -43,7 +43,7 @@ namespace AMDiS {
/** \brief /** \brief
* Constructor * Constructor
*/ */
AdaptBase(const ::std::string& name, AdaptBase(const std::string& name,
ProblemIterationInterface *problemIteration, ProblemIterationInterface *problemIteration,
AdaptInfo *adaptInfo, AdaptInfo *adaptInfo,
ProblemTimeInterface *problemTime = NULL, ProblemTimeInterface *problemTime = NULL,
...@@ -69,7 +69,7 @@ namespace AMDiS { ...@@ -69,7 +69,7 @@ namespace AMDiS {
/** \brief /** \brief
* Returns \ref name_ * Returns \ref name_
*/ */
inline const ::std::string& getName() const { inline const std::string& getName() const {
return name_; return name_;
}; };
...@@ -113,7 +113,7 @@ namespace AMDiS { ...@@ -113,7 +113,7 @@ namespace AMDiS {
/** \brief /** \brief
* Name of the adaption loop * Name of the adaption loop
*/ */
::std::string name_; std::string name_;
/** \brief /** \brief
* Problem iteration interface * Problem iteration interface
......
...@@ -88,12 +88,12 @@ namespace AMDiS { ...@@ -88,12 +88,12 @@ namespace AMDiS {
/** \brief /** \brief
* serialization * serialization
*/ */
virtual void serialize(::std::ostream &out); virtual void serialize(std::ostream &out);
/** \brief /** \brief
* deserialization * deserialization
*/ */
virtual void deserialize(::std::istream &in); virtual void deserialize(std::istream &in);
protected: protected:
...@@ -111,7 +111,7 @@ namespace AMDiS { ...@@ -111,7 +111,7 @@ namespace AMDiS {
/** \brief /** \brief
* Initialisation of this AdaptInstationary object * Initialisation of this AdaptInstationary object
*/ */
void initialize(const ::std::string& aName); void initialize(const std::string& aName);
/** \brief /** \brief
* Implements the explit time strategy. Used by \ref oneTimestep(). * Implements the explit time strategy. Used by \ref oneTimestep().
...@@ -169,7 +169,7 @@ namespace AMDiS { ...@@ -169,7 +169,7 @@ namespace AMDiS {
/** \brief /** \brief
* Name of the file used to automatically serialize the problem. * Name of the file used to automatically serialize the problem.
*/ */
::std::string queueSerializationFilename_; std::string queueSerializationFilename_;
/** \brief /** \brief
* Timestamp at the beginning of all calculations. It is used to calculate the overall * Timestamp at the beginning of all calculations. It is used to calculate the overall
...@@ -186,7 +186,7 @@ namespace AMDiS { ...@@ -186,7 +186,7 @@ namespace AMDiS {
/** \brief /** \brief
* Stores the runtime (in seconds) of some last timestep iterations. * Stores the runtime (in seconds) of some last timestep iterations.
*/ */
::std::queue<int> lastIterationsDuration_; std::queue<int> lastIterationsDuration_;
}; };
} }
......
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
namespace AMDiS { namespace AMDiS {
::std::vector<SubAssembler*> ZeroOrderAssembler::optimizedSubAssemblers; std::vector<SubAssembler*> ZeroOrderAssembler::optimizedSubAssemblers;
::std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPhi; std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPhi;
::std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPsi; std::vector<SubAssembler*> FirstOrderAssembler::optimizedSubAssemblersGrdPsi;
::std::vector<SubAssembler*> SecondOrderAssembler::optimizedSubAssemblers; std::vector<SubAssembler*> SecondOrderAssembler::optimizedSubAssemblers;
::std::vector<SubAssembler*> ZeroOrderAssembler::standardSubAssemblers; std::vector<SubAssembler*> ZeroOrderAssembler::standardSubAssemblers;
::std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPhi; std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPhi;
::std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPsi; std::vector<SubAssembler*> FirstOrderAssembler::standardSubAssemblersGrdPsi;
::std::vector<SubAssembler*> SecondOrderAssembler::standardSubAssemblers; std::vector<SubAssembler*> SecondOrderAssembler::standardSubAssemblers;
SubAssembler::SubAssembler(Operator *op, SubAssembler::SubAssembler(Operator *op,
Assembler *assembler, Assembler *assembler,
...@@ -98,20 +98,20 @@ namespace AMDiS { ...@@ -98,20 +98,20 @@ namespace AMDiS {
coordsValid = false; coordsValid = false;
// set values at QPs invalid // 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) { for (it1 = valuesAtQPs.begin(); it1 != valuesAtQPs.end(); ++it1) {
((*it1).second)->valid = false; ((*it1).second)->valid = false;
} }
// set gradients at QPs invalid // 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) { for (it2 = gradientsAtQPs.begin(); it2 != gradientsAtQPs.end(); ++it2) {
((*it2).second)->valid = false; ((*it2).second)->valid = false;
} }
int myRank = omp_get_thread_num(); int myRank = omp_get_thread_num();
// calls initElement of each term // 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) { for (it = terms[myRank].begin(); it != terms[myRank].end(); ++it) {
(*it)->initElement(elInfo, this, quad); (*it)->initElement(elInfo, this, quad);
} }
...@@ -298,20 +298,20 @@ namespace AMDiS { ...@@ -298,20 +298,20 @@ namespace AMDiS {
ZeroOrderAssembler *newAssembler; ZeroOrderAssembler *newAssembler;
::std::vector<SubAssembler*> *subAssemblers = std::vector<SubAssembler*> *subAssemblers =
optimized ? optimized ?
&optimizedSubAssemblers : &optimizedSubAssemblers :
&standardSubAssemblers; &standardSubAssemblers;
int myRank = omp_get_thread_num(); 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()); sort(opTerms.begin(), opTerms.end());
// check if a new assembler is needed // check if a new assembler is needed
if (quad) { if (quad) {
for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { 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()); sort(assTerms.begin(), assTerms.end());
...@@ -354,7 +354,7 @@ namespace AMDiS { ...@@ -354,7 +354,7 @@ namespace AMDiS {
FirstOrderType type, FirstOrderType type,
bool optimized) bool optimized)
{ {
::std::vector<SubAssembler*> *subAssemblers = std::vector<SubAssembler*> *subAssemblers =
optimized ? optimized ?
(type == GRD_PSI ? (type == GRD_PSI ?
&optimizedSubAssemblersGrdPsi : &optimizedSubAssemblersGrdPsi :
...@@ -364,7 +364,7 @@ namespace AMDiS { ...@@ -364,7 +364,7 @@ namespace AMDiS {
&standardSubAssemblersGrdPhi); &standardSubAssemblersGrdPhi);
int myRank = omp_get_thread_num(); int myRank = omp_get_thread_num();
::std::vector<OperatorTerm*> opTerms std::vector<OperatorTerm*> opTerms
= (type == GRD_PSI) ? = (type == GRD_PSI) ?
op->firstOrderGrdPsi[myRank] : op->firstOrderGrdPsi[myRank] :
op->firstOrderGrdPhi[myRank]; op->firstOrderGrdPhi[myRank];
...@@ -381,7 +381,7 @@ namespace AMDiS { ...@@ -381,7 +381,7 @@ namespace AMDiS {
// check if a new assembler is needed // check if a new assembler is needed
for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { 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()); sort(assTerms.begin(), assTerms.end());
...@@ -440,18 +440,18 @@ namespace AMDiS { ...@@ -440,18 +440,18 @@ namespace AMDiS {
SecondOrderAssembler *newAssembler; SecondOrderAssembler *newAssembler;
::std::vector<SubAssembler*> *subAssemblers = std::vector<SubAssembler*> *subAssemblers =
optimized ? optimized ?
&optimizedSubAssemblers : &optimizedSubAssemblers :
&standardSubAssemblers; &standardSubAssemblers;
::std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank]; std::vector<OperatorTerm*> opTerms = op->zeroOrder[myRank];
sort(opTerms.begin(), opTerms.end()); sort(opTerms.begin(), opTerms.end());
// check if a new assembler is needed // check if a new assembler is needed
for (int i = 0; i < static_cast<int>( subAssemblers->size()); i++) { 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()); sort(assTerms.begin(), assTerms.end());
...@@ -508,7 +508,7 @@ namespace AMDiS { ...@@ -508,7 +508,7 @@ namespace AMDiS {
} }
int myRank = omp_get_thread_num(); 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) { for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) {
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c);
} }
...@@ -565,7 +565,7 @@ namespace AMDiS { ...@@ -565,7 +565,7 @@ namespace AMDiS {
} }
int myRank = omp_get_thread_num(); 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) { for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) {
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c);
} }
...@@ -615,7 +615,7 @@ namespace AMDiS { ...@@ -615,7 +615,7 @@ namespace AMDiS {
c[iq] = 0.0; c[iq] = 0.0;
} }
::std::vector<OperatorTerm*>::iterator termIt; std::vector<OperatorTerm*>::iterator termIt;
for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) { for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) {
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c);
} }
...@@ -668,7 +668,7 @@ namespace AMDiS { ...@@ -668,7 +668,7 @@ namespace AMDiS {
} }
int myRank = omp_get_thread_num(); 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) { for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt) {
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c); (static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c);
} }
...@@ -738,7 +738,7 @@ namespace AMDiS { ...@@ -738,7 +738,7 @@ namespace AMDiS {
firstCall = false; firstCall = false;
} }
::std::vector<OperatorTerm*>::iterator termIt; std::vector<OperatorTerm*>::iterator termIt;
int myRank = omp_get_thread_num(); int myRank = omp_get_thread_num();
double c = 0.0; double c = 0.0;
......
...@@ -40,7 +40,7 @@ namespace AMDiS ...@@ -40,7 +40,7 @@ namespace AMDiS
double beta; double beta;
double *alpha = GET_MEMORY(double, k); 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()) { while (pairsIterator != pairsVec.end()) {
alpha[i] = pairsIterator->s * *vec; alpha[i] = pairsIterator->s * *vec;
......
...@@ -15,7 +15,7 @@ namespace AMDiS { ...@@ -15,7 +15,7 @@ namespace AMDiS {
/* are those corresponding to these barycentric coordinates. */ /* 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_), : name(name_),
degree(degree_), degree(degree_),
dim(dim_) dim(dim_)
......
...@@ -131,7 +131,7 @@ namespace AMDiS { ...@@ -131,7 +131,7 @@ namespace AMDiS {
/** \brief /** \brief
* Creates a BasisFunction object of given dim and degree * 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 /** \brief
* destructor * destructor
...@@ -214,7 +214,7 @@ namespace AMDiS { ...@@ -214,7 +214,7 @@ namespace AMDiS {
/** \brief /** \brief
* Returns \ref name of BasisFunction * Returns \ref name of BasisFunction
*/ */
inline const ::std::string& getName() const { inline const std::string& getName() const {
return name; return name;
}; };
...@@ -415,7 +415,7 @@ namespace AMDiS { ...@@ -415,7 +415,7 @@ namespace AMDiS {
/** \brief /** \brief
* Textual description * Textual description
*/ */
::std::string name; std::string name;
/** \brief /** \brief
* Number of basisfunctions on one Element * Number of basisfunctions on one Element
...@@ -445,30 +445,30 @@ namespace AMDiS { ...@@ -445,30 +445,30 @@ namespace AMDiS {
/** \brief /** \brief
* Vector of the local functions * Vector of the local functions
*/ */
::std::vector<BasFctType*> *phi; std::vector<BasFctType*> *phi;
/** \brief /** \brief
* Vector of gradients * Vector of gradients
*/ */
::std::vector<GrdBasFctType*> *grdPhi; std::vector<GrdBasFctType*> *grdPhi;
/** \brief /** \brief
* Vector of second derivatives * Vector of second derivatives
*/ */
::std::vector<D2BasFctType*> *d2Phi; std::vector<D2BasFctType*> *d2Phi;
/** \brief /** \brief
* Is used by function evalGrdUh. To make it thread safe, we need a * Is used by function evalGrdUh. To make it thread safe, we need a
* temporary DimVec for every thread. * temporary DimVec for every thread.
*/ */
::std::vector<DimVec<double>* > grdTmpVec1; std::vector<DimVec<double>* > grdTmpVec1;
/** \brief /** \brief
* Is used by function evalGrdUh. To make it thread safe, we need a * Is used by function evalGrdUh. To make it thread safe, we need a
* temporary DimVec for every thread. * temporary DimVec for every thread.
*/ */
::std::vector<DimVec<double>* > grdTmpVec2; std::vector<DimVec<double>* > grdTmpVec2;
}; };
} }
......
...@@ -66,7 +66,7 @@ namespace AMDiS { ...@@ -66,7 +66,7 @@ namespace AMDiS {
/** \brief /** \brief
* constructor * constructor
*/ */
BiCGSolver(::std::string name); BiCGSolver(std::string name);
/** \brief /** \brief
* destructor * destructor
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace AMDiS { namespace AMDiS {
template<typename VectorType> template<typename VectorType>
BiCGSolver<VectorType>::BiCGSolver(::std::string name) BiCGSolver<VectorType>::BiCGSolver(std::string name)
: OEMSolver<VectorType>(name), : OEMSolver<VectorType>(name),
rstar(NULL), d(NULL), s(NULL), CAd(NULL), h(NULL) rstar(NULL), d(NULL), s(NULL), CAd(NULL), h(NULL)
{ {
......
...@@ -68,7 +68,7 @@ namespace AMDiS ...@@ -68,7 +68,7 @@ namespace AMDiS
/** \brief /** \brief
* constructor * constructor
*/ */
BiCGStab(::std::string name); BiCGStab(std::string name);
/** \brief /** \brief
* destructor * destructor
......
...@@ -4,7 +4,7 @@ namespace AMDiS ...@@ -4,7 +4,7 @@ namespace AMDiS
{ {
template<typename VectorType> template<typename VectorType>
BiCGStab<VectorType>::BiCGStab(::std::string name) BiCGStab<VectorType>::BiCGStab(std::string name)
: OEMSolver<VectorType>(name), : OEMSolver<VectorType>(name),
r(NULL), r(NULL),
rstar(NULL), rstar(NULL),
......
...@@ -67,7 +67,7 @@ namespace AMDiS ...@@ -67,7 +67,7 @@ namespace AMDiS
/** \brief /** \brief
* constructor * constructor
*/ */
BiCGStab2(::std::string name); BiCGStab2(std::string name);
/** \brief /** \brief
* destructor * destructor
......
...@@ -4,7 +4,7 @@ namespace AMDiS ...@@ -4,7 +4,7 @@ namespace AMDiS
{ {
template<typename VectorType> template<typename VectorType>
BiCGStab2<VectorType>::BiCGStab2(::std::string name) BiCGStab2<VectorType>::BiCGStab2(std::string name)
: OEMSolver<VectorType>(name), : OEMSolver<VectorType>(name),
r(NULL), rstar(NULL), u(NULL), v(NULL), s(NULL), w(NULL), t(NULL), r(NULL), rstar(NULL), u(NULL), v(NULL), s(NULL), w(NULL), t(NULL),
xmin(NULL) xmin(NULL)
......
...@@ -63,7 +63,7 @@ namespace AMDiS { ...@@ -63,7 +63,7 @@ namespace AMDiS {
/** \brief /** \brief
* constructor * constructor
*/ */
BiCGStab_M(::std::string name); BiCGStab_M(std::string name);
/** \brief /** \brief
* destructor * destructor
......
namespace AMDiS { namespace AMDiS {
template<typename VectorType> 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> template<typename VectorType>
BiCGStab_M<VectorType>::~BiCGStab_M() {} BiCGStab_M<VectorType>::~BiCGStab_M() {}
......
...@@ -14,7 +14,7 @@ namespace AMDiS { ...@@ -14,7 +14,7 @@ namespace AMDiS {
const DOFVectorBase<double> *dv) const DOFVectorBase<double> *dv)
{ {
double result = 0; double result = 0;
::std::map<BoundaryType, BoundaryCondition*>::iterator it; std::map<BoundaryType, BoundaryCondition*>::iterator it;
for (it = localBCs.begin(); it != localBCs.end(); ++it) { for (it = localBCs.begin(); it != localBCs.end(); ++it) {
if ((*it).second) if ((*it).second)
result += (*it).second->boundResidual(elInfo, matrix, dv); result += (*it).second->boundResidual(elInfo, matrix, dv);
...@@ -32,7 +32,7 @@ namespace AMDiS { ...@@ -32,7 +32,7 @@ namespace AMDiS {
int nBasFcts = basisFcts->getNumber(); int nBasFcts = basisFcts->getNumber();
DOFAdmin *admin = feSpace->getAdmin(); DOFAdmin *admin = feSpace->getAdmin();
::std::map<BoundaryType, BoundaryCondition*>::iterator it; std::map<BoundaryType, BoundaryCondition*>::iterator it;