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

* Exact error computation added

* ::std:: -> std::
parent 4a775f34
......@@ -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
......
......@@ -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_;
};
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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_)
......
......@@ -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;
};
}
......
......@@ -66,7 +66,7 @@ namespace AMDiS {
/** \brief
* constructor
*/
BiCGSolver(::std::string name);
BiCGSolver(std::string name);
/** \brief
* destructor
......
......@@ -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)
{
......
......@@ -68,7 +68,7 @@ namespace AMDiS
/** \brief
* constructor
*/
BiCGStab(::std::string name);
BiCGStab(std::string name);
/** \brief
* destructor
......
......@@ -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),
......
......@@ -67,7 +67,7 @@ namespace AMDiS
/** \brief
* constructor
*/
BiCGStab2(::std::string name);
BiCGStab2(std::string name);
/** \brief
* destructor
......
......@@ -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)
......
......@@ -63,7 +63,7 @@ namespace AMDiS {
/** \brief
* constructor
*/
BiCGStab_M(::std::string name);
BiCGStab_M(std::string name);
/** \brief
* destructor
......
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() {}
......
......@@ -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()) {
......
......@@ -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;
};
}
......
......@@ -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) {
......
......@@ -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_;
};
......