diff --git a/extensions/base_problems/BaseProblem.hh b/extensions/base_problems/BaseProblem.hh index 6cbe92fe0a984ba391efbc505e79e9435b8867db..5e10859ebe30a564252d92aef25216c9583a735f 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); };