From 8597c3eeae4ebcfcff9fc8458791a3b984871781 Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Sun, 17 Feb 2013 22:43:07 +0000
Subject: [PATCH] AMDiS now compiles with -pedantic

---
 extensions/base_problems/BaseProblem.hh | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/extensions/base_problems/BaseProblem.hh b/extensions/base_problems/BaseProblem.hh
index 6cbe92fe..5e10859e 100644
--- a/extensions/base_problems/BaseProblem.hh
+++ b/extensions/base_problems/BaseProblem.hh
@@ -5,10 +5,10 @@ BaseProblem<ProblemType>::BaseProblem(const std::string &name_, bool createProbl
   : ProblemInstatBase(name_,NULL),
     prob(NULL),
     secureIteration(false),
-    oldMeshChangeIdx(0),
-    nTimesteps(-1),
     dim(1),
     dow(1),
+    nTimesteps(-1),
+    oldMeshChangeIdx(0),
     oldTimestep(0.0)
 {
   // create basic problems
@@ -40,7 +40,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
   FUNCNAME("BaseProblem::initDataFromFile()");
   
   Flag initFlag;
-  bool readDataFromFile = false, readArhFiles = false, readDatFiles = false;
+  bool readDataFromFile = false;
   Initfile::get(name + "->read data from file", readDataFromFile, 2);
   if (!readDataFromFile)
     return initFlag;
@@ -61,7 +61,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
       throw(std::runtime_error("The file '" + filename + "' does not exist!"));
     
     std::vector<DOFVector<double>*> solutions;
-    for (size_t i = 0; i < prob->getNumComponents(); i++)
+    for (int i = 0; i < prob->getNumComponents(); i++)
       solutions.push_back(prob->getSolution()->getDOFVector(i));
     ArhReader::read(filename, prob->getMesh(), solutions);
   }
@@ -72,7 +72,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
       throw(std::runtime_error("Yout have to set the flag 'mesh_name->preserve macroFileInfo' to 'true' ("+boost::lexical_cast<std::string>(preserveMacroFileInfo)+"), in order to read .dat-files"));
     
     std::string filename = "";
-    for (size_t i = 0; i < prob->getNumComponents(); i++) {
+    for (int i = 0; i < prob->getNumComponents(); i++) {
       Parameters::get(name + "->value file["+boost::lexical_cast<std::string>(i)+"]",filename);
       if (!file_exists(filename))
 	throw(std::runtime_error("The file '" + filename + "'does not exist!"));
@@ -102,7 +102,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
       std::vector<int> readComponents;
       Initfile::get(name + "->read components", readComponents);
       if (readComponents.size() == 0)
-	for (size_t i = 0; i < prob->getNumComponents(); i++)
+	for (int i = 0; i < prob->getNumComponents(); i++)
 	  readComponents.push_back(i);
 	
       std::vector<DOFVector<double>*> solutions;
@@ -141,7 +141,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
 	std::vector<int> readComponents;
 	Initfile::get(name + "->read components[" + boost::lexical_cast<std::string>(n) + "]", readComponents);
 	if (readComponents.size() == 0)
-	  for (size_t i = 0; i < prob->getNumComponents(); i++)
+	  for (int i = 0; i < prob->getNumComponents(); i++)
 	    readComponents.push_back(i);
 	  
 	std::vector<DOFVector<double>*> solutions;
@@ -261,8 +261,7 @@ void BaseProblem<ProblemType>::endIteration(AdaptInfo *adaptInfo)
 
 template<typename ProblemType>
 void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo)
-{ FUNCNAME("BaseProblem::closeTimestep()");
-
+{
   int outputPeriod = 1;
   Initfile::get("user parameter->write every ith timestep", outputPeriod);
   if (adaptInfo->getTimestepNumber() % outputPeriod == 0
@@ -275,8 +274,7 @@ void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo)
 
 template<typename ProblemType>
 void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j)
-{ FUNCNAME("BaseProblem::addTimeOperator()");
-
+{
   Operator *op = new Operator(prob->getFeSpace(i), prob->getFeSpace(j));
     op->addZeroOrderTerm(new Simple_ZOT);
   Operator *opRhs = new Operator(prob->getFeSpace(i));
@@ -289,7 +287,6 @@ void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j)
 
 template<typename ProblemType>
 void BaseProblem<ProblemType>::addTimeOperator(RosenbrockStationary *prob, int i, int j)
-{ FUNCNAME("BaseProblem::addTimeOperator()");
-
+{
   prob->addTimeOperator(i,j);
 };
-- 
GitLab