Commit 2e10969e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

MS Windows compatibility and Warnings removed

parent 3484b9be
......@@ -112,7 +112,7 @@ namespace AMDiS {
return "LeafDataEstimatable";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return ESTIMATABLE;
}
......@@ -198,7 +198,7 @@ namespace AMDiS {
return "LeafDataEstimatableVec";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return ESTIMATABLE;
}
......@@ -294,7 +294,7 @@ namespace AMDiS {
return "LeafDataCoarsenable";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return COARSENABLE;
}
......@@ -379,7 +379,7 @@ namespace AMDiS {
return "LeafDataCoarsenableVec";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return COARSENABLE;
}
......@@ -484,7 +484,7 @@ namespace AMDiS {
return "LeafDataPeriodic";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return PERIODIC;
}
......
......@@ -96,49 +96,49 @@ namespace AMDiS {
}
/// Returns \ref nDofEl of the mesh
inline const int getNumberOfAllDofs() const
inline int getNumberOfAllDofs() const
{
return nDofEl;
}
/// Returns \ref nNodeEl of the mesh
inline const int getNumberOfNodes() const
inline int getNumberOfNodes() const
{
return nNodeEl;
}
/// Returns \ref nVertices of the mesh
inline const int getNumberOfVertices() const
inline int getNumberOfVertices() const
{
return nVertices;
}
/// Returns \ref nEdges of the mesh
inline const int getNumberOfEdges() const
inline int getNumberOfEdges() const
{
return nEdges;
}
/// Returns \ref nFaces of the mesh
inline const int getNumberOfFaces() const
inline int getNumberOfFaces() const
{
return nFaces;
}
/// Returns \ref nLeaves of the mesh
inline const int getNumberOfLeaves() const
inline int getNumberOfLeaves() const
{
return nLeaves;
}
/// Returns \ref nElements of the mesh
inline const int getNumberOfElements() const
inline int getNumberOfElements() const
{
return nElements;
}
/// Returns \ref maxEdgeNeigh of the mesh
inline const int getMaxEdgeNeigh() const
inline int getMaxEdgeNeigh() const
{
return maxEdgeNeigh;
}
......@@ -156,7 +156,7 @@ namespace AMDiS {
}
/// Returns nDof[i] of the mesh
inline const int getNumberOfDofs(int i) const
inline int getNumberOfDofs(int i) const
{
TEST_EXIT_DBG(i <= dim)("Wrong index: %d %d\n", i, dim);
return nDof[i];
......@@ -199,14 +199,14 @@ namespace AMDiS {
/// Returns the size of \ref admin which is the number of the DOFAdmins
/// belonging to this mesh
const int getNumberOfDOFAdmin() const
int getNumberOfDOFAdmin() const
{
return admin.size();
}
/// Returns the size of \ref macroElements which is the number of
/// of macro elements of this mesh
const int getNumberOfMacros() const
int getNumberOfMacros() const
{
return macroElements.size();
}
......
......@@ -84,7 +84,7 @@ namespace AMDiS {
return true;
}
virtual const int getTypeID() const
virtual int getTypeID() const
{
return MESH_STRUCTURE;
}
......
......@@ -176,7 +176,7 @@ namespace AMDiS {
}
const bool Q11PsiPhi::operator==(const Q11PsiPhi& q11pp) const
bool Q11PsiPhi::operator==(const Q11PsiPhi& q11pp) const
{
return (q11pp.psi == psi && q11pp.phi == phi && q11pp.quadrature == quadrature);
}
......@@ -337,7 +337,7 @@ namespace AMDiS {
}
}
const bool Q10PsiPhi::operator==(const Q10PsiPhi& q10pp) const
bool Q10PsiPhi::operator==(const Q10PsiPhi& q10pp) const
{
return (q10pp.psi == psi && q10pp.phi == phi && q10pp.quadrature == quadrature);
}
......@@ -498,7 +498,7 @@ namespace AMDiS {
}
}
const bool Q01PsiPhi::operator==(const Q01PsiPhi& q01pp) const
bool Q01PsiPhi::operator==(const Q01PsiPhi& q01pp) const
{
return (q01pp.psi == psi && q01pp.phi == phi && q01pp.quadrature == quadrature);
}
......@@ -543,7 +543,7 @@ namespace AMDiS {
/* first order term: */
/****************************************************************************/
const double Q00PsiPhi::getValue(unsigned int i,unsigned int j) const
double Q00PsiPhi::getValue(unsigned int i,unsigned int j) const
{
if ((values)&&(values[i])) return values[i][j];
return 0.;
......@@ -621,7 +621,7 @@ namespace AMDiS {
delete [] values;
}
const bool Q00PsiPhi::operator==(const Q00PsiPhi& q00pp) const
bool Q00PsiPhi::operator==(const Q00PsiPhi& q00pp) const
{
return (q00pp.psi == psi && q00pp.phi == phi && q00pp.quadrature == quadrature);
}
......@@ -702,7 +702,7 @@ namespace AMDiS {
delete [] values;
}
const bool Q0Psi::operator==(const Q0Psi& q0p) const
bool Q0Psi::operator==(const Q0Psi& q0p) const
{
return (q0p.psi == psi && q0p.quadrature == quadrature);
}
......@@ -825,7 +825,7 @@ namespace AMDiS {
}
const bool Q1Psi::operator==(const Q1Psi& q1p) const
bool Q1Psi::operator==(const Q1Psi& q1p) const
{
return (q1p.psi == psi && q1p.quadrature == quadrature);
}
......
......@@ -119,16 +119,16 @@ namespace AMDiS {
const Quadrature*);
/// Compares two Q11PsiPhi objects.
const bool operator==(const Q11PsiPhi&) const;
bool operator==(const Q11PsiPhi&) const;
/// Compares two Q11PsiPhi objects.
const bool operator!=(const Q11PsiPhi& q11pp) const
bool operator!=(const Q11PsiPhi& q11pp) const
{
return !(operator==(q11pp));
}
/// Returns \ref values[i][j][k]
inline const double getValue(unsigned int i,
inline double getValue(unsigned int i,
unsigned int j,
unsigned int v) const
{
......@@ -140,7 +140,7 @@ namespace AMDiS {
}
/// Returns \ref nrEntries[i][j]
inline const int getNumberEntries(unsigned int i, unsigned int j) const
inline int getNumberEntries(unsigned int i, unsigned int j) const
{
if (nrEntries && nrEntries[i])
return nrEntries[i][j];
......@@ -155,7 +155,7 @@ namespace AMDiS {
}
/// Returns \ref k[i1][i2][i3]
inline const int getK(unsigned int i1,
inline int getK(unsigned int i1,
unsigned int i2,
unsigned int i3) const
{
......@@ -166,7 +166,7 @@ namespace AMDiS {
}
/// Returns \ref l[i][j][v]
inline const int getL(unsigned int i, unsigned int j, unsigned int v) const
inline int getL(unsigned int i, unsigned int j, unsigned int v) const
{
if (l && l[i] && l[i][j] && (static_cast<int>(v) < nrEntries[i][j]))
return l[i][j][v];
......@@ -276,16 +276,16 @@ namespace AMDiS {
const Quadrature*);
/// Compares two Q10PsiPhi objects.
const bool operator==(const Q10PsiPhi&) const;
bool operator==(const Q10PsiPhi&) const;
/// Compares two Q10PsiPhi objects.
const bool operator!=(const Q10PsiPhi& q10pp) const
bool operator!=(const Q10PsiPhi& q10pp) const
{
return !(operator==(q10pp));
}
/// Returns \ref values[i][j][k]
inline const double getValue(unsigned int i,
inline double getValue(unsigned int i,
unsigned int j,
unsigned int v) const
{
......@@ -297,7 +297,7 @@ namespace AMDiS {
}
/// Returns \ref nrEntries[i][j]
inline const int getNumberEntries(unsigned int i, unsigned int j) const
inline int getNumberEntries(unsigned int i, unsigned int j) const
{
if (nrEntries && nrEntries[i])
return nrEntries[i][j];
......@@ -312,7 +312,7 @@ namespace AMDiS {
}
/// Returns \ref k[i1][i2][i3]
inline const int getK(unsigned int i1,
inline int getK(unsigned int i1,
unsigned int i2,
unsigned int i3) const
{
......@@ -409,16 +409,16 @@ namespace AMDiS {
const Quadrature*);
/// Compares two Q01PsiPhi objects.
const bool operator==(const Q01PsiPhi&) const;
bool operator==(const Q01PsiPhi&) const;
/// Compares two Q01PsiPhi objects.
const bool operator!=(const Q01PsiPhi& q01pp) const
bool operator!=(const Q01PsiPhi& q01pp) const
{
return !(operator==(q01pp));
}
/// Returns \ref values[i][j][k]
inline const double getValue(unsigned int i,
inline double getValue(unsigned int i,
unsigned int j,
unsigned int v) const
{
......@@ -430,7 +430,7 @@ namespace AMDiS {
}
/// Returns \ref nrEntries[i][j]
inline const int getNumberEntries(unsigned int i, unsigned int j) const
inline int getNumberEntries(unsigned int i, unsigned int j) const
{
if (nrEntries && nrEntries[i])
return nrEntries[i][j];
......@@ -445,7 +445,7 @@ namespace AMDiS {
}
/// Returns \ref k[i1][i2][i3]
inline const int getK(unsigned int i1,
inline int getK(unsigned int i1,
unsigned int i2,
unsigned int i3) const;
......@@ -468,7 +468,7 @@ namespace AMDiS {
}
/// Returns \ref k[i][j][v]
inline const int getL(unsigned int i,
inline int getL(unsigned int i,
unsigned int j,
unsigned int v) const
{
......@@ -565,16 +565,16 @@ namespace AMDiS {
const Quadrature*);
/// Compares two Q00PsiPhi objects.
const bool operator==(const Q00PsiPhi&) const;
bool operator==(const Q00PsiPhi&) const;
/// Compares two Q00PsiPhi objects.
const bool operator!=(const Q00PsiPhi& q00pp) const
bool operator!=(const Q00PsiPhi& q00pp) const
{
return !(operator==(q00pp));
}
/// Returns \ref values[i][j]
const double getValue(unsigned int i, unsigned int j) const;
double getValue(unsigned int i, unsigned int j) const;
/// Returns \ref values[i]
const double *getValVec(unsigned int i) const;
......@@ -614,16 +614,16 @@ namespace AMDiS {
static Q0Psi* provideQ0Psi(const BasisFunction *, const Quadrature*);
/// Compares two Q0Psi objects.
const bool operator==(const Q0Psi&) const;
bool operator==(const Q0Psi&) const;
/// Compares two Q0Psi objects.
const bool operator!=(const Q0Psi& q0p) const
bool operator!=(const Q0Psi& q0p) const
{
return !(operator==(q0p));
}
/// Returns \ref value
inline const double getValue(int i) const
inline double getValue(int i) const
{
return values[i];
}
......@@ -658,16 +658,16 @@ namespace AMDiS {
const Quadrature*);
/// Compares two Q1Psi objects.
const bool operator==(const Q1Psi&) const;
bool operator==(const Q1Psi&) const;
/// Compares two Q1Psi objects.
const bool operator!=(const Q1Psi& q1p) const
bool operator!=(const Q1Psi& q1p) const
{
return !(operator==(q1p));
}
/// Returns \ref values[i][j]
inline const double getValue(unsigned int i,
inline double getValue(unsigned int i,
unsigned int j) const
{
if (values && values[i] && (static_cast<int>(j) < nrEntries[i]))
......@@ -677,7 +677,7 @@ namespace AMDiS {
}
/// Returns \ref nrEntries[i]
inline const int getNumberEntries(unsigned int i) const
inline int getNumberEntries(unsigned int i) const
{
return (nrEntries ? nrEntries[i] : 0);
}
......@@ -689,7 +689,7 @@ namespace AMDiS {
}
/// Returns \ref k[i1][i2]
inline const int
inline int
getK(unsigned int i1, unsigned int i2) const
{
if (k && k[i1] && (static_cast<int>(i2) < nrEntries[i1]))
......
......@@ -1622,7 +1622,7 @@ namespace AMDiS {
}
const double FastQuadrature::getSecDer(int q,int i ,int j, int m) const
double FastQuadrature::getSecDer(int q,int i ,int j, int m) const
{
return (D2Phi) ? (*D2Phi)[q][i][j][m] : 0.0;
}
......
......@@ -369,13 +369,13 @@ namespace AMDiS {
}
/// Returns (*\ref D2Phi)[q][i][j][m]
const double getSecDer(int q, int i, int j, int m) const;
double getSecDer(int q, int i, int j, int m) const;
/// Returns (*\ref D2Phi)[q]
const VectorOfFixVecs<DimMat<double> > *getSecDer(int q) const;
/// Returns (*\ref grdPhi)[q][i][j]
inline const double getGradient(int q, int i ,int j) const
inline double getGradient(int q, int i ,int j) const
{
return (!grdPhi.empty()) ? grdPhi[q][i][j] : 0.0;
}
......@@ -397,7 +397,7 @@ namespace AMDiS {
}
/// Returns \ref phi[q][i]
inline const double getPhi(int q, int i) const
inline double getPhi(int q, int i) const
{
return phi[q][i];
}
......
......@@ -70,7 +70,7 @@ namespace AMDiS {
}
/// Returns \ref rclist[i].flag
inline const bool isPatchCoarse(int i) const
inline bool isPatchCoarse(int i) const
{
return rclist[i]->flag;
}
......
......@@ -77,7 +77,7 @@ namespace AMDiS {
void scaleQuadrature(DimMat<double> *scalMat);
/// Get b-th coordinate of the a-th original quadrature point.
inline const double getOldLambda(int a, int b) const
inline double getOldLambda(int a, int b) const
{
if (oldLambda)
return (*oldLambda)[a][b];
......
......@@ -53,7 +53,7 @@ namespace AMDiS {
}
/// Get b-th coordinate of the a-th vertex of subelement (barycentriccoordinates).
inline const double getLambda(int a, int b) const
inline double getLambda(int a, int b) const
{
if (lambda)
return (*lambda)[a][b];
......@@ -74,7 +74,7 @@ namespace AMDiS {
}
/// Get determinant corresponding to subelement.
inline const double getDet() const
inline double getDet() const
{
return det;
}
......
......@@ -65,7 +65,7 @@ namespace AMDiS {
return "SurfaceRegion_ED";
}
inline const int getTypeID() const
inline int getTypeID() const
{
return SURFACE_REGION;
}
......
......@@ -167,7 +167,7 @@ public:
const bool doCalcIntersecPts_ = true);
/// Gets value of level set function at point given in barycentric coordinates.
inline const double calcLevelSetFct(const DimVec<double>& bary)
inline double calcLevelSetFct(const DimVec<double>& bary)
{
return (*lSFct)(bary);
}
......@@ -246,7 +246,7 @@ public:
}
/// Get i-th component of vector elVertexLevelSetVec.
inline const double getElVertLevelSetVec(const int i) const
inline double getElVertLevelSetVec(const int i) const
{
return elVertexLevelSetVec[i];
}
......
......@@ -133,7 +133,7 @@ namespace AMDiS {
for (std::set<int>::iterator it = readArhFiles.begin();
it != readArhFiles.end(); ++it) {
string arhFilename = directory.native() + "/" + arhPrefix;
string arhFilename = directory.string() + "/" + arhPrefix;
if (nProc == 1)
arhFilename += ".arh";
else
......
......@@ -409,7 +409,7 @@ namespace AMDiS {
int idx = elInfo->getElement()->getIndex();
for (int j = 0; j < nComponents; j++) {
double val = (vec != NULL ? (*vec)[idx] : ((*vecs)[idx].size()==dataLength ? (*vecs)[idx][i*nComponents+j] : 0.0));
double val = (vec != NULL ? (*vec)[idx] : (static_cast<int>((*vecs)[idx].size())==dataLength ? (*vecs)[idx][i*nComponents+j] : 0.0));
// Write value for each vertex of each element.
if (fabs(val) < 1.e-40)
......
......@@ -227,7 +227,7 @@ namespace AMDiS {
file = fopen(filename.c_str(), "r");
TEST_EXIT(file)("cannot open file %s\n", filename.c_str());
int result;
int result, n_;
for (int i_key = 0; i_key < n_keys; i_key++) {
......@@ -283,7 +283,7 @@ namespace AMDiS {
case 4:
// block "vertex coordinates"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
for (int i = 0; i < nVertices; i++) {
for (j = 0; j <Global::getGeo(WORLD) ; j++) {
result = fscanf(file, "%lf", &dbl);
......@@ -297,7 +297,7 @@ namespace AMDiS {
case 5:
// block "element vertices"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
// === Global number of vertices on a single element. ===
......@@ -315,7 +315,7 @@ namespace AMDiS {
case 6:
// block "element boundaries"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
// === MEL boundary pointers. ===
......@@ -341,7 +341,7 @@ namespace AMDiS {
case 7:
// block "element neighbours"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
// === Fill MEL neighbour pointers: ===
// === if they are specified in the file: read them from file, ===
......@@ -368,7 +368,7 @@ namespace AMDiS {
case 8:
// block "element type"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
// === MEL elType ===
......@@ -389,7 +389,7 @@ namespace AMDiS {
case 9:
// block "projections"
{
fscanf(file, "%*s");
n_ = fscanf(file, "%*s");
int nFaces = mesh->getGeo(FACE);
int nEdgesAtBoundary = 0;
......@@ -427,7 +427,7 @@ namespace AMDiS {
case 10:
// block "element region"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
// === MEL regions. ===
......@@ -448,7 +448,7 @@ namespace AMDiS {
case 11:
// block "surface region"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
for (int i = 0; i < nElements; i++) {
result = read_indices(file, *ind);
TEST_EXIT(result)
......@@ -471,12 +471,12 @@ namespace AMDiS {
case 12:
// line "mesh name"
fscanf(file, "%*s %*s %*s");
n_ = fscanf(file, "%*s %*s %*s");
break;
case 13:
// line "time"
fscanf(file, "%*s %*s");
n_ = fscanf(file, "%*s %*s");
break;
}
}
......
......@@ -235,7 +235,7 @@ class ElementLevelSet
}
/// Get i-th component of vector elVertexLevelSetVec.
inline const double getElVertLevelSetVec(const int i) const
inline double getElVertLevelSetVec(const int i) const
{