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
: 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);
};
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