Commit 8597c3ee authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

AMDiS now compiles with -pedantic

parent 66a2fd59
...@@ -5,10 +5,10 @@ BaseProblem<ProblemType>::BaseProblem(const std::string &name_, bool createProbl ...@@ -5,10 +5,10 @@ BaseProblem<ProblemType>::BaseProblem(const std::string &name_, bool createProbl
: ProblemInstatBase(name_,NULL), : ProblemInstatBase(name_,NULL),
prob(NULL), prob(NULL),
secureIteration(false), secureIteration(false),
oldMeshChangeIdx(0),
nTimesteps(-1),
dim(1), dim(1),
dow(1), dow(1),
nTimesteps(-1),
oldMeshChangeIdx(0),
oldTimestep(0.0) oldTimestep(0.0)
{ {
// create basic problems // create basic problems
...@@ -40,7 +40,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo) ...@@ -40,7 +40,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
FUNCNAME("BaseProblem::initDataFromFile()"); FUNCNAME("BaseProblem::initDataFromFile()");
Flag initFlag; Flag initFlag;
bool readDataFromFile = false, readArhFiles = false, readDatFiles = false; bool readDataFromFile = false;
Initfile::get(name + "->read data from file", readDataFromFile, 2); Initfile::get(name + "->read data from file", readDataFromFile, 2);
if (!readDataFromFile) if (!readDataFromFile)
return initFlag; return initFlag;
...@@ -61,7 +61,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo) ...@@ -61,7 +61,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
throw(std::runtime_error("The file '" + filename + "' does not exist!")); throw(std::runtime_error("The file '" + filename + "' does not exist!"));
std::vector<DOFVector<double>*> solutions; 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)); solutions.push_back(prob->getSolution()->getDOFVector(i));
ArhReader::read(filename, prob->getMesh(), solutions); ArhReader::read(filename, prob->getMesh(), solutions);
} }
...@@ -72,7 +72,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo) ...@@ -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")); 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 = ""; 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); Parameters::get(name + "->value file["+boost::lexical_cast<std::string>(i)+"]",filename);
if (!file_exists(filename)) if (!file_exists(filename))
throw(std::runtime_error("The file '" + filename + "'does not exist!")); throw(std::runtime_error("The file '" + filename + "'does not exist!"));
...@@ -102,7 +102,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo) ...@@ -102,7 +102,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
std::vector<int> readComponents; std::vector<int> readComponents;
Initfile::get(name + "->read components", readComponents); Initfile::get(name + "->read components", readComponents);
if (readComponents.size() == 0) 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); readComponents.push_back(i);
std::vector<DOFVector<double>*> solutions; std::vector<DOFVector<double>*> solutions;
...@@ -141,7 +141,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo) ...@@ -141,7 +141,7 @@ Flag BaseProblem<ProblemType>::initDataFromFile(AdaptInfo *adaptInfo)
std::vector<int> readComponents; std::vector<int> readComponents;
Initfile::get(name + "->read components[" + boost::lexical_cast<std::string>(n) + "]", readComponents); Initfile::get(name + "->read components[" + boost::lexical_cast<std::string>(n) + "]", readComponents);
if (readComponents.size() == 0) 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); readComponents.push_back(i);
std::vector<DOFVector<double>*> solutions; std::vector<DOFVector<double>*> solutions;
...@@ -261,8 +261,7 @@ void BaseProblem<ProblemType>::endIteration(AdaptInfo *adaptInfo) ...@@ -261,8 +261,7 @@ void BaseProblem<ProblemType>::endIteration(AdaptInfo *adaptInfo)
template<typename ProblemType> template<typename ProblemType>
void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo) void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo)
{ FUNCNAME("BaseProblem::closeTimestep()"); {
int outputPeriod = 1; int outputPeriod = 1;
Initfile::get("user parameter->write every ith timestep", outputPeriod); Initfile::get("user parameter->write every ith timestep", outputPeriod);
if (adaptInfo->getTimestepNumber() % outputPeriod == 0 if (adaptInfo->getTimestepNumber() % outputPeriod == 0
...@@ -275,8 +274,7 @@ void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo) ...@@ -275,8 +274,7 @@ void BaseProblem<ProblemType>::closeTimestep(AdaptInfo *adaptInfo)
template<typename ProblemType> template<typename ProblemType>
void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j) void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j)
{ FUNCNAME("BaseProblem::addTimeOperator()"); {
Operator *op = new Operator(prob->getFeSpace(i), prob->getFeSpace(j)); Operator *op = new Operator(prob->getFeSpace(i), prob->getFeSpace(j));
op->addZeroOrderTerm(new Simple_ZOT); op->addZeroOrderTerm(new Simple_ZOT);
Operator *opRhs = new Operator(prob->getFeSpace(i)); Operator *opRhs = new Operator(prob->getFeSpace(i));
...@@ -289,7 +287,6 @@ void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j) ...@@ -289,7 +287,6 @@ void BaseProblem<ProblemType>::addTimeOperator(ProblemStat *prob, int i, int j)
template<typename ProblemType> template<typename ProblemType>
void BaseProblem<ProblemType>::addTimeOperator(RosenbrockStationary *prob, int i, int j) void BaseProblem<ProblemType>::addTimeOperator(RosenbrockStationary *prob, int i, int j)
{ FUNCNAME("BaseProblem::addTimeOperator()"); {
prob->addTimeOperator(i,j); prob->addTimeOperator(i,j);
}; };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment