diff --git a/Base/FileFinder.h b/Base/FileFinder.h index 0ff0bb668..b8699e11a 100644 --- a/Base/FileFinder.h +++ b/Base/FileFinder.h @@ -49,7 +49,8 @@ class FileFinder << "Error: FileFinder::getPath() -- directory list is empty." << "\n"; for (std::list::iterator it = _directories.begin(); - it != _directories.end(); ++it) + it != _directories.end(); + ++it) { std::string testDir(*it); std::ifstream is(testDir.append(filename).c_str()); diff --git a/Base/printList.h b/Base/printList.h index 0c38f5825..18de358d0 100644 --- a/Base/printList.h +++ b/Base/printList.h @@ -24,7 +24,8 @@ void printList(std::list const& mylist, std::string const& title) { std::cout << title << "\n"; for (std::list::const_iterator my_it(mylist.begin()); - my_it != mylist.end(); my_it++) + my_it != mylist.end(); + my_it++) std::cout << *my_it << " "; std::cout << "\n"; } diff --git a/CMakeLists.txt b/CMakeLists.txt index ad1f313ed..0b125607f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,8 +163,8 @@ mark_as_advanced(FORCE OGS_PYTHON OGS_CMAKE_DEBUG OGS_ONE_BIG_GTEST OGS_BUILD_IN ########################################################################### ### OGS version information is now obtained from Git tags. Adjust authors & date. ########################################################################### -set (OGS_RELEASE_PERSONS "LB/NW/TN/WW") -set (OGS_DATE "09.08.2016") +set (OGS_RELEASE_PERSONS "") +set (OGS_DATE "21.12.2018") ################### ### Fem configs ### diff --git a/FEM/DUMUX.cpp b/FEM/DUMUX.cpp index 60fc702b2..ea70df238 100644 --- a/FEM/DUMUX.cpp +++ b/FEM/DUMUX.cpp @@ -484,9 +484,9 @@ int CDUMUXData::WriteInputForDuMux(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux // class // value = - //pcs_vector[this->ProcessIndex_CO2inLiquid]->GetNodeValue(i, - //indexConcentration_DIC) * (this->Molweight_CO2 / 1000) / - //this->NodeData[i]->phase_density[0]; + // pcs_vector[this->ProcessIndex_CO2inLiquid]->GetNodeValue(i, + // indexConcentration_DIC) * (this->Molweight_CO2 / 1000) / + // this->NodeData[i]->phase_density[0]; value = pcs_vector[this->ProcessIndex_CO2inLiquid]->GetNodeValue( i, indexConcentration_DIC) * (this->Molweight_CO2 / 1000) / @@ -583,10 +583,11 @@ int CDUMUXData::WriteInputForDuMux(CRFProcess* m_pcs, tempstring = temp.str(); // TF commented out since we want to use the improved PointDuMux class // temp.str(""); temp.clear(); temp << this->NodeData[i]->x; - //tempstring += "; " + temp.str(); temp.str(""); temp.clear(); temp << - //this->NodeData[i]->y; tempstring += "; " + temp.str(); temp.str(""); - //temp.clear(); temp << this->NodeData[i]->z; tempstring += "; " + - //temp.str(); + // tempstring += "; " + temp.str(); temp.str(""); temp.clear(); + // temp + // << this->NodeData[i]->y; tempstring += "; " + temp.str(); + // temp.str(""); temp.clear(); temp << this->NodeData[i]->z; tempstring + // += "; " + temp.str(); for (size_t k(0); k < 3; k++) { temp.str(""); @@ -597,29 +598,29 @@ int CDUMUXData::WriteInputForDuMux(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux class // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_pressure[0]; tempstring + // this->NodeData[i]->phase_pressure[0]; tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_pressure[1]; tempstring + // this->NodeData[i]->phase_pressure[1]; tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_saturation[0]; + // this->NodeData[i]->phase_saturation[0]; // tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_saturation[1]; + // this->NodeData[i]->phase_saturation[1]; // tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_density[0]; tempstring + // this->NodeData[i]->phase_density[0]; tempstring //+= //"; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_density[1]; tempstring + // this->NodeData[i]->phase_density[1]; tempstring //+= //"; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->CO2inLiquid; tempstring += "; + // this->NodeData[i]->CO2inLiquid; tempstring += "; //" //+ temp.str(); temp.str(""); @@ -663,10 +664,10 @@ int CDUMUXData::WriteInputForDuMux(CRFProcess* m_pcs, i, indexConcentration_DIC); // TF commented out since we want to use the improved PointDuMux class // mass_CO2_gas = node_volume * - //this->NodeData[i]->phase_saturation[1] * + // this->NodeData[i]->phase_saturation[1] * // this->NodeData[i]->phase_density[1]; // mass_CO2_water = node_volume * - //this->NodeData[i]->phase_saturation[0] * concentration_CO2_water * + // this->NodeData[i]->phase_saturation[0] * concentration_CO2_water * // this->Molweight_CO2 * 0.001; mass_CO2_gas = node_volume * this->NodeData[i]->getPhaseSaturation()[1] * @@ -834,11 +835,11 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux // class // if ((atof(TextFile->Data_separated[i][1].data()) != - //this->NodeData[i]->x) || + // this->NodeData[i]->x) || //(atof(TextFile->Data_separated[i][2].data()) != - //this->NodeData[i]->y) || + // this->NodeData[i]->y) || //(atof(TextFile->Data_separated[i][3].data()) != - //this->NodeData[i]->z)) { + // this->NodeData[i]->z)) { if ((atof(TextFile->Data_separated[i][1].data()) != (*(this->NodeData[i]))[0]) || (atof(TextFile->Data_separated[i][2].data()) != @@ -865,7 +866,7 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux // class // this->NodeData[i]->phase_pressure[j] = - //atof(TextFile->Data_separated[i][column].data()) * + // atof(TextFile->Data_separated[i][column].data()) * // Multiplier; this->NodeData[i]->getPhasePressure()[j] = atof(TextFile->Data_separated[i][column].data()) * Multiplier; @@ -891,7 +892,7 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux // class // this->NodeData[i]->q[j][k] = - //atof(TextFile->Data_separated[i][column].data()) * + // atof(TextFile->Data_separated[i][column].data()) * // Multiplier; this->NodeData[i]->getQ()[j][k] = atof(TextFile->Data_separated[i][column].data()) * @@ -900,32 +901,32 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, column += 1; // TF commented out since we want to use the improved PointDuMux class // this->NodeData[i]->CO2inLiquid = - //atof(TextFile->Data_separated[i][column].data()) * Multiplier; + // atof(TextFile->Data_separated[i][column].data()) * Multiplier; this->NodeData[i]->setCO2InLiquid( atof(TextFile->Data_separated[i][column].data()) * Multiplier); // cout << i << " " << this->NodeData[i]->CO2inLiquid << "\n"; column += 1; // TF commented out since we want to use the improved PointDuMux class // this->NodeData[i]->NaClinLiquid = - //atof(TextFile->Data_separated[i][column].data()) * Multiplier; + // atof(TextFile->Data_separated[i][column].data()) * Multiplier; this->NodeData[i]->setNaClInLiquid( atof(TextFile->Data_separated[i][column].data()) * Multiplier); column += 1; // TF commented out since we want to use the improved PointDuMux class // this->NodeData[i]->temperature = - //atof(TextFile->Data_separated[i][column].data()) * Multiplier; + // atof(TextFile->Data_separated[i][column].data()) * Multiplier; this->NodeData[i]->setTemperature( atof(TextFile->Data_separated[i][column].data()) * Multiplier); column += 1; // TF commented out since we want to use the improved PointDuMux class // this->NodeData[i]->phase_density[0] = - //atof(TextFile->Data_separated[i][column].data()) * Multiplier; + // atof(TextFile->Data_separated[i][column].data()) * Multiplier; this->NodeData[i]->getPhaseDensity()[0] = atof(TextFile->Data_separated[i][column].data()) * Multiplier; column += 1; // TF commented out since we want to use the improved PointDuMux class // this->NodeData[i]->phase_density[1] = - //atof(TextFile->Data_separated[i][column].data()) * Multiplier; + // atof(TextFile->Data_separated[i][column].data()) * Multiplier; this->NodeData[i]->getPhaseDensity()[1] = atof(TextFile->Data_separated[i][column].data()) * Multiplier; } @@ -980,10 +981,11 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, tempstring = temp.str(); // TF commented out since we want to use the improved PointDuMux class // temp.str(""); temp.clear(); temp << this->NodeData[i]->x; - //tempstring += "; " + temp.str(); temp.str(""); temp.clear(); temp << - //this->NodeData[i]->y; tempstring += "; " + temp.str(); temp.str(""); - //temp.clear(); temp << this->NodeData[i]->z; tempstring += "; " + - //temp.str(); + // tempstring += "; " + temp.str(); temp.str(""); temp.clear(); + // temp + // << this->NodeData[i]->y; tempstring += "; " + temp.str(); + // temp.str(""); temp.clear(); temp << this->NodeData[i]->z; tempstring + // += "; " + temp.str(); for (size_t k(0); k < 3; k++) { temp.str(""); @@ -994,29 +996,29 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux class // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_pressure[0]; tempstring + // this->NodeData[i]->phase_pressure[0]; tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_pressure[1]; tempstring + // this->NodeData[i]->phase_pressure[1]; tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_saturation[0]; + // this->NodeData[i]->phase_saturation[0]; // tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_saturation[1]; + // this->NodeData[i]->phase_saturation[1]; // tempstring //+= "; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_density[0]; tempstring + // this->NodeData[i]->phase_density[0]; tempstring //+= //"; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->phase_density[1]; tempstring + // this->NodeData[i]->phase_density[1]; tempstring //+= //"; " + temp.str(); // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->NodeData[i]->CO2inLiquid; tempstring += "; + // this->NodeData[i]->CO2inLiquid; tempstring += "; //" //+ temp.str(); temp.str(""); @@ -1057,12 +1059,12 @@ void CDUMUXData::ReadDuMuxData(CRFProcess* m_pcs, // TF commented out since we want to use the improved PointDuMux class // concentration_CO2_water = this->NodeData[i]->CO2inLiquid * - //this->NodeData[i]->phase_density[0] / (this->Molweight_CO2 * 1e-3); + // this->NodeData[i]->phase_density[0] / (this->Molweight_CO2 * 1e-3); // mass_CO2_gas = node_volume * - //this->NodeData[i]->phase_saturation[1] * + // this->NodeData[i]->phase_saturation[1] * // this->NodeData[i]->phase_density[1]; // mass_CO2_water = node_volume * - //this->NodeData[i]->phase_saturation[0] * concentration_CO2_water * + // this->NodeData[i]->phase_saturation[0] * concentration_CO2_water * // this->Molweight_CO2 * 0.001; concentration_CO2_water = this->NodeData[i]->getCO2InLiquid() * this->NodeData[i]->getPhaseDensity()[0] / @@ -1164,7 +1166,7 @@ void CDUMUXData::WriteDataToGeoSys(CRFProcess* m_pcs) m_pcs->GetNodeValueIndex("PRESSURE1") + 1; //+1... new time level // TF commented out since we want to use the improved PointDuMux class // value = this->NodeData[i]->getPhasePressure()[1] - - //this->NodeData[i]->getPhasePressure()[0]; + // this->NodeData[i]->getPhasePressure()[0]; value = pnt_dumux->getPhasePressure()[1] - pnt_dumux->getPhasePressure()[0]; m_pcs->SetNodeValue(i, index, value); @@ -1291,7 +1293,7 @@ void CDUMUXData::WriteDataToGeoSys(CRFProcess* m_pcs) // * density_liq[kg/m�] / (Molweight_CO2 [g/mol] * 1e-3 [kg/g]) TF // commented out since we want to use the improved PointDuMux class // value = this->NodeData[i]->CO2inLiquid * - //this->NodeData[i]->phase_density[0] / (this->Molweight_CO2 * + // this->NodeData[i]->phase_density[0] / (this->Molweight_CO2 * // 1e-3); value = pnt_dumux->getCO2InLiquid() * pnt_dumux->getPhaseDensity()[0] / (this->Molweight_CO2 * 1e-3); @@ -1307,7 +1309,7 @@ void CDUMUXData::WriteDataToGeoSys(CRFProcess* m_pcs) // TF commented out since we want to use the improved PointDuMux // class // cout << "Node: " << i << " Druck: " << - //this->NodeData[i]->phase_pressure[1] << " X_CO2: " << + // this->NodeData[i]->phase_pressure[1] << " X_CO2: " << // this->NodeData[i]->CO2inLiquid << " Dichte: " << // this->NodeData[i]->phase_density[0] << " C(4): " << value //<< "\n"; @@ -1420,7 +1422,8 @@ void CDUMUXData::WriteDataToGeoSys(CRFProcess* m_pcs) // position = path.find_last_of("\\"); // path = path.substr(0,position); // temp.str(""); temp.clear(); temp << timestep; tempstring = - //temp.str(); string aus_file = path + "\\CheckVelocity_" + Phases[k] + + // temp.str(); string aus_file = path + "\\CheckVelocity_" + Phases[k] + // + //"_" + tempstring + ".csv"; ofstream aus; // aus.open(aus_file.data(),ios::out); // for (int i = 0; i < vec_string.size(); i++) { @@ -1655,4 +1658,4 @@ int CDUMUXData::RunDuMux(long Timestep, CRFProcess* m_pcs) // ToDO: // - Konstruktor nur einmal aufrufen // - in st-file: Masse einlesen und mit aktueller Dichte in Volumenstrom -//umrechnen +// umrechnen diff --git a/FEM/Eclipse.cpp b/FEM/Eclipse.cpp index 509f752f7..81273186f 100644 --- a/FEM/Eclipse.cpp +++ b/FEM/Eclipse.cpp @@ -141,8 +141,8 @@ CWriteTextfiles_ECL::~CWriteTextfiles_ECL(void) {} Programming: 09/2009 BG Modification: -------------------------------------------------------------------------*/ -void CWriteTextfiles_ECL::Write_Text(std::string Filename, - vector Text) +void CWriteTextfiles_ECL::Write_Text( + std::string Filename, vector Text) { ofstream textfile; textfile.open(Filename.c_str(), ios::out); @@ -473,7 +473,7 @@ void CECLIPSEData::ReadEclipseGrid(std::string Filename) // this->SplitStrings(TextFile->Daten[i+1]," "); // if (this->SplittedString.size()<=4) { // cout << "\n" << "The grid output format (GRIDFILE) for Eclipse - //should be set to 2 0 instead of 1 1! The + // should be set to 2 0 instead of 1 1! The // run is terminated now!" << "\n"; // //system("Pause"); // exit(0); @@ -740,7 +740,7 @@ void CECLIPSEData::DetermineNeighbourElements(string Projectname) // if (Error_NeighbourFile == true) { // cout << "The program is canceled because the *.neighbours file is - //not correct!" << "\n"; + // not correct!" << "\n"; // //system("Pause"); // exit(0); //} @@ -755,7 +755,8 @@ void CECLIPSEData::DetermineNeighbourElements(string Projectname) // Set neighbourElements to -1 for (unsigned long i = 0; i < this->eclgrid.size(); i++) for (unsigned int j = 0; - j < this->eclgrid[i]->NeighbourElement.size(); j++) + j < this->eclgrid[i]->NeighbourElement.size(); + j++) this->eclgrid[i]->NeighbourElement[j] = -1; // Determine neighboured Elements @@ -906,11 +907,11 @@ void CECLIPSEData::DetermineNeighbourElements(string Projectname) // //Calculating neighboured element in y-direction // if (this->eclgrid[i]->row > 1) { // this->eclgrid[i]->NeighbourElement[2] = this->eclgrid[i]->index - - //this->columns; + // this->columns; // } // if (this->eclgrid[i]->row < this->rows) { // this->eclgrid[i]->NeighbourElement[3] = this->eclgrid[i]->index + - //this->columns; + // this->columns; // } // //Calculating neighboured element in z-direction // if (this->eclgrid[i]->layer > 1) { @@ -923,7 +924,7 @@ void CECLIPSEData::DetermineNeighbourElements(string Projectname) // } // //check // //cout << this->eclgrid[i]->index << ": " << - //this->eclgrid[i]->NeighbourElement[0] << " " << + // this->eclgrid[i]->NeighbourElement[0] << " " << // this->eclgrid[i]->NeighbourElement[1] << " " << // this->eclgrid[i]->NeighbourElement[2] << " " << // this->eclgrid[i]->NeighbourElement[3] << " " << @@ -1062,7 +1063,8 @@ int CECLIPSEData::ReadDataFromInputFile(std::string Filename) does not read the data for(long unsigned j = l + zeilen + 1; j < (l + this->ecl_well.size() + zeilen + 1); j++)*/ for (long unsigned j = l + 1; - j < (l + this->ecl_well.size() + 1); j++) + j < (l + this->ecl_well.size() + 1); + j++) { if (this->actual_time == 0) { @@ -1169,7 +1171,7 @@ void CECLIPSEData::ReadWellData(std::string Filename_Wells) ecl_single_well->rate.push_back(tempvalue_rate); // if ((double(ecl_single_well->time.begin())) != "0"){ // cout << "Warning: first item of time in timecurve is not - //0!" << "\n"; break; + // 0!" << "\n"; break; //} in.clear(); in.getline(Line, MAX_ZEILEN); @@ -1186,8 +1188,8 @@ void CECLIPSEData::ReadWellData(std::string Filename_Wells) // for (unsigned int m = 0; m < SplittedString.size(); m++) // { // if (m == 0)ecl_single_well->time = - //atof(SplittedString[m]); if (m == - //1)ecl_single_well->time.push_back(SplittedString[m]); + // atof(SplittedString[m]); if (m == + // 1)ecl_single_well->time.push_back(SplittedString[m]); //} // position = in.tellg(); @@ -1450,7 +1452,7 @@ void CECLIPSEData::ReadEclipseData(std::string Filename, long Timestep) // for(long i = 0; i < (this->elements); i++) // for(long j = 0; j < this->times; j++) // Data[i][j] = (double *) - //malloc(this->numberOutputParameters*sizeof(double)); + // malloc(this->numberOutputParameters*sizeof(double)); // Deallokieren /*Data2 = (double **) malloc(1000000 * sizeof(double*)); @@ -1596,7 +1598,8 @@ void CECLIPSEData::ReadEclipseData(std::string Filename, long Timestep) SplitStrings(TextFile->Data[l], delimiter); // cout << TextFile->Daten[l] << "\n"; for (unsigned int m = 0; - m < SplittedString.size(); m++) + m < SplittedString.size(); + m++) { rowindex = rowindex + 1; // cout << rowindex-1 << " " << k << " " @@ -1677,7 +1680,8 @@ void CECLIPSEData::ReadEclipseData(std::string Filename, long Timestep) SplitStrings(TextFile->Data[l], delimiter); // cout << TextFile->Daten[l] << "\n"; for (unsigned int m = 0; - m < SplittedString.size(); m++) + m < SplittedString.size(); + m++) { rowindex = rowindex + 1; // cout << rowindex-1 << " " << timestep @@ -1694,7 +1698,8 @@ void CECLIPSEData::ReadEclipseData(std::string Filename, long Timestep) atof(SplittedString[m].data()) * Multiplier; // cout << "Element: " << rowindex << " - //Variable: " << this->Variables[k] << " + // Variable: " << this->Variables[k] << + // " // Value: " << // this->Data[rowindex-1][timestep][k] // << "\n"; @@ -1926,12 +1931,12 @@ void CECLIPSEData::ReadEclipseData(std::string Filename, long Timestep) // temp.str(""); temp.clear(); temp << i; tempstring = temp.str(); // temp.str(""); temp.clear(); temp << elem->x_barycentre; tempstring += "; //" + temp.str(); temp.str(""); temp.clear(); temp << elem->y_barycentre; - //tempstring += "; " + temp.str(); temp.str(""); temp.clear(); temp << - //elem->z_barycentre; tempstring += "; " + temp.str(); + // tempstring += "; " + temp.str(); temp.str(""); temp.clear(); temp << + // elem->z_barycentre; tempstring += "; " + temp.str(); // for (unsigned int k = 0; k < this->Variables.size(); k++) { // temp.str(""); temp.clear(); temp.precision(12); temp << - //this->Data[i][k]; tempstring += "; " + temp.str(); + // this->Data[i][k]; tempstring += "; " + temp.str(); // } // //if (i == 470) { // // cout << i; @@ -2165,7 +2170,8 @@ bool CECLIPSEData::ReplaceWellRate(std::string Filename, // and the items jj = 0; for (long unsigned j = i + zeilen + 1; - j < (i + this->ecl_well.size() + zeilen + 1); j++) + j < (i + this->ecl_well.size() + zeilen + 1); + j++) { if (this->actual_time == 0) { @@ -2324,7 +2330,7 @@ bool CECLIPSEData::CompareElementsGeosysEclipse() // a_node = ele_nodes[j]; // cout << "\n"; // cout << a_node->X() << " " << a_node->Y() << " " << a_node->Z() << " - //ECL " << + // ECL " << // this->eclgrid[i]->x_coordinates[j] << " " << // this->eclgrid[i]->y_coordinates[j] << " " << // this->eclgrid[i]->z_coordinates[j] << "\n"; @@ -2940,7 +2946,7 @@ bool CECLIPSEData::ConnectFacesToElements(void) // for(unsigned long i=0;iindex << " : "; // for(int j=0;jconnected_faces.size();j++) cout << - //eclgrid[i]->connected_faces[j] << ", "; cout << "\n"; + // eclgrid[i]->connected_faces[j] << ", "; cout << "\n"; //} for (long i = 0; i < long(eclgrid.size()); i++) @@ -3538,23 +3544,23 @@ bool CECLIPSEData::MakeNodeVector(void) this->NodeData.push_back(m_NodeData); // Test output - // cout << " Node " << i << " (X,Y,Z): (" << m_NodeData->x << ", - //" << m_NodeData->y << ", "<< + // cout << " Node " << i << " (X,Y,Z): (" << m_NodeData->x << + //", " << m_NodeData->y << ", "<< // m_NodeData->z << ") "; // for (long k = 0; k < 3; k++){ // cout << m_NodeData->phase_density[k] << " " << - //m_NodeData->phase_pressure[k] << " " << + // m_NodeData->phase_pressure[k] << " " << // m_NodeData->phase_saturation[k] << " "; // } // cout << "\n"; // // Test output // cout << " Node " << i << " (X,Y,Z): (" << - //this->NodeData[this->NodeData.size()-1]->x << ", " << + // this->NodeData[this->NodeData.size()-1]->x << ", " << // this->NodeData[this->NodeData.size()-1]->y << ", "<< // this->NodeData[this->NodeData.size()-1]->z << ") "; // for (long k = 0; k < 3; k++){ // cout << - //this->NodeData[this->NodeData.size()-1]->phase_density[k] << " " + // this->NodeData[this->NodeData.size()-1]->phase_density[k] << " " //<< // this->NodeData[this->NodeData.size()-1]->phase_pressure[k] << " " // << this->NodeData[this->NodeData.size()-1]->phase_saturation[k] @@ -3587,30 +3593,39 @@ bool CECLIPSEData::MakeNodeVector(void) // m_NodeData->z = m_node->Z(); // //sum_weights = 0; // // sum the distance weighted data from each connected - //face for (unsigned int j = 0; j < m_node->connected_faces.size(); j++) { - // distance = weight = 0; - // m_face = this->faces[m_node->connected_faces[j]]; - // distance = m_node->distance_to_connected_faces[j]; + // face for (unsigned int j = 0; j < + // m_node->connected_faces.size(); + // j++) { distance = weight = 0; m_face + // = + // this->faces[m_node->connected_faces[j]]; distance = + // m_node->distance_to_connected_faces[j]; // //Weight of each face depending on distance // weight = (1.0 / distance); // // Sum of weights // //sum_weights += weight; // normal_vec_face = - //m_face->PlaneEquation->GetNormalVector(); - // // Go through all three coordinates x, y, z and check, if face - //is perpendicular to axis for (int k = 0; k < 3; k++){ if(k == 0) val = - //fabs(PointProduction(normal_vec_face,coord_v_x)); if(k == 1) val = - //fabs(PointProduction(normal_vec_face,coord_v_y)); if(k == 2) val = - //fabs(PointProduction(normal_vec_face,coord_v_z)); if(val > MKleinsteZahl){ + // m_face->PlaneEquation->GetNormalVector(); + // // Go through all three coordinates x, y, z and check, + // if face + // is perpendicular to axis for (int k = 0; k < 3; + // k++){ if(k + // == 0) val = fabs(PointProduction(normal_vec_face,coord_v_x)); + // if(k == 1) val = fabs(PointProduction(normal_vec_face,coord_v_y)); + // if(k == 2) val = fabs(PointProduction(normal_vec_face,coord_v_z)); + // if(val > MKleinsteZahl){ //// face not perpendicular to ccordinate axis k - // //m_NodeData->Flow[k] += m_face->phases[phase_index]->q[k] * - //weight; weights_xyz[k] += weight; - // //cout << " Node " << i << " contributed by face " << - //m_face->index << ", " << + // //m_NodeData->Flow[k] += + // m_face->phases[phase_index]->q[k] + //* weight; weights_xyz[k] += weight; + // //cout << " Node " << i << " contributed by face + //" + //<< m_face->index << ", " << // m_face->model_axis //<< //" , " << m_face->q_norm << ": "; - // //for(int mm=0;mm<3;mm++) cout << m_face->q[mm] << ", + // //for(int mm=0;mm<3;mm++) cout << m_face->q[mm] + //<< + //", //"; // //cout << "\n"; // } @@ -3621,10 +3636,12 @@ bool CECLIPSEData::MakeNodeVector(void) // for (int k = 0; k < 3; k++) { // // if(weights_xyz[k] > 0.0) // ////m_NodeData->Flow[k] = m_NodeData->Flow[k] / - //weights_xyz[k]; + // weights_xyz[k]; // // else{ // ////m_NodeData->Flow[k] = m_NodeData->Flow[k]; - // //cout << " Warning - no faces for direction (I=0,J=1,K=2): " + // //cout << " Warning - no faces for direction + //(I=0,J=1,K=2): + //" //<< k << " at node " << i << " // with // non-zero contributions! " << "\n"; @@ -3636,29 +3653,33 @@ bool CECLIPSEData::MakeNodeVector(void) // ostringstream temp; // vector vec_string; // double v_geosys[3]; - // vec_string.push_back("Node; X; Y; Z; v_x_ECL; v_y_ECL; v_z_ECL; - //v_ECL; v_x_Geos; v_y_Geos; v_z_Geos; + // vec_string.push_back("Node; X; Y; Z; v_x_ECL; v_y_ECL; + // v_z_ECL; v_ECL; v_x_Geos; v_y_Geos; v_z_Geos; // v_Geos"); // // for(unsigned long i=0; i< this->NodeData.size();i++){ // m_NodeData = this->NodeData[i]; - // //cout << " NodeData["<< i << "]: (X,Y,Z): (" << m_NodeData->x + // //cout << " NodeData["<< i << "]: (X,Y,Z): (" << + // m_NodeData->x //<< ", " << m_NodeData->y << ", " //<< // m_NodeData->z << "): " ; // tempstring=""; // temp.str(""); temp.clear(); temp << i; tempstring = - //temp.str(); temp.str(""); temp.clear(); temp << m_NodeData->x; tempstring - //+= "; " +temp.str(); temp.str(""); temp.clear(); temp << m_NodeData->y; - //tempstring += "; " + temp.str(); temp.str(""); temp.clear(); temp << - //m_NodeData->z; tempstring += "; " + temp.str(); for(int k=0;k< 3;k++) { - // //temp.str(""); temp.clear(); temp << m_NodeData->Flow[k]; - //tempstring += "; " + temp.str(); + // temp.str(); temp.str(""); temp.clear(); temp << + // m_NodeData->x; tempstring + //+= "; " +temp.str(); temp.str(""); temp.clear(); temp << + // m_NodeData->y; tempstring += "; " + temp.str(); temp.str(""); + // temp.clear(); temp << m_NodeData->z; tempstring += "; " + temp.str(); + // for(int k=0;k< 3;k++) { + // //temp.str(""); temp.clear(); temp << + // m_NodeData->Flow[k]; tempstring += "; " + temp.str(); // //cout << m_NodeData->Data_separated[k] << " "; // } // //cout << "\n"; // //calculate v - //// temp.str(""); temp.clear(); temp << sqrt(pow(m_NodeData->Flow[0],2) + //// temp.str(""); temp.clear(); temp << + /// sqrt(pow(m_NodeData->Flow[0],2) ///+ /// pow(m_NodeData->Flow[1],2) ///+ @@ -3667,12 +3688,15 @@ bool CECLIPSEData::MakeNodeVector(void) // //get node velocity of geosys // InterpolateGeosysVelocitiesToNodes(m_pcs, v_geosys, i); // for(int k=0;k< 3;k++) { - // temp.str(""); temp.clear(); temp << v_geosys[k]; tempstring += + // temp.str(""); temp.clear(); temp << v_geosys[k]; + // tempstring + //+= //"; " + temp.str(); // } // //calculate v - // temp.str(""); temp.clear(); temp << sqrt(pow(v_geosys[0], 2) + - //pow(v_geosys[1], 2) + + // temp.str(""); temp.clear(); temp << + //sqrt(pow(v_geosys[0], 2) + //+ pow(v_geosys[1], 2) + // pow(v_geosys[2], // 2)); tempstring += "; " + temp.str(); // //write string @@ -3683,9 +3707,11 @@ bool CECLIPSEData::MakeNodeVector(void) // position = int(path.find_last_of("\\")); // path = path.substr(0,position); // temp.str(""); temp.clear(); temp << timestep; tempstring = - //temp.str(); std::string aus_file = path + "\\CheckVelocityAtNodes_" + - //tempstring + ".csv"; ofstream aus; aus.open(aus_file.data(),ios::out); for - //(unsigned long i = 0; i < vec_string.size(); i++) { aus << vec_string[i] + // temp.str(); std::string aus_file = path + + // "\\CheckVelocityAtNodes_" + // + tempstring + ".csv"; ofstream aus; + // aus.open(aus_file.data(),ios::out); for (unsigned long i = + // 0; i < vec_string.size(); i++) { aus << vec_string[i] //<< "\n"; // } // aus.close(); @@ -3865,7 +3891,7 @@ void CECLIPSEData::InterpolateDataFromFacesToNodes(long ele_nr, double* n_vel_x, // Test Output // for(long i=0; i< nod_index.Size();i++){ // cout << " Node "<< nod_index[i] << ": (X,Y,Z): (" << - //m_msh->nod_vector[nod_index[i]]->X() << ", " << + // m_msh->nod_vector[nod_index[i]]->X() << ", " << // m_msh->nod_vector[nod_index[i]]->Y() << ", "<< // m_msh->nod_vector[nod_index[i]]->Z() << "): " ; // cout << n_vel_x[i] << " " << n_vel_y[i] << " " << n_vel_z[i] << " " << @@ -4069,14 +4095,14 @@ void CECLIPSEData::InterpolateDataFromBlocksToNodes(CRFProcess* m_pcs, // if ((m_block->z_barycentre == -2001.8)) { // //cout << " Node " << i << "\n"; // //cout << " : connected block: " << - //m_node->connected_elements[j] << " (X,Y,Z): " << + // m_node->connected_elements[j] << " (X,Y,Z): " << // m_block->x_barycentre << ", " << m_block->y_barycentre << ", " << // m_block->z_barycentre << " with saturation " << sat; // //cout << " distance: " << distance << " weight: " << weight //<< " sum of weights: " << sum_weights << //"\n"; // cout << " Node " << i << " Element: " << - //m_node->connected_elements[j] << " SGAS: " << sat << + // m_node->connected_elements[j] << " SGAS: " << sat << //"\n"; //} } // for j=connected_elements @@ -4128,17 +4154,17 @@ void CECLIPSEData::InterpolateDataFromBlocksToNodes(CRFProcess* m_pcs, // Test output // if ((m_block->z_barycentre == -2001.8)) { // //cout << " Node " << i << " (X,Y,Z): (" << m_node->X() << ", " << - //m_node->Y() << ", "<< m_node->X() << ") + // m_node->Y() << ", "<< m_node->X() << ") //"; // //cout << " Pressure at Node " << this->NodeData[i]->pressure << //"\n"; // //cout << " Node " << i << " (X,Y,Z): (" << m_node->X() << ", " << - //m_node->Y() << ", "<< m_node->X() << ") + // m_node->Y() << ", "<< m_node->X() << ") //"; // //cout << " Saturation at Node " << - //this->NodeData[i]->phase_saturation[phase_index] << "\n"; cout << " - //Node " << i << " SGAS: " << - //this->NodeData[i]->phase_saturation[phase_index] << "\n"; + // this->NodeData[i]->phase_saturation[phase_index] << "\n"; cout << + // " Node " << i << " SGAS: " << + // this->NodeData[i]->phase_saturation[phase_index] << "\n"; //} } @@ -4496,7 +4522,7 @@ void CECLIPSEData::WriteDataToGeoSys(CRFProcess* m_pcs, std::string path) // this->NodeData[i]->z << ") "; // for (long k = 0; k < 3; k++){ // cout << this->NodeData[i]->phase_density[k] << " " << - //this->NodeData[i]->phase_pressure[k] << " " << + // this->NodeData[i]->phase_pressure[k] << " " << // this->NodeData[i]->phase_saturation[k] << " "; //} // cout << "\n"; @@ -5105,7 +5131,7 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs, } // if (this->WellRates.size() != 0){ // std::string outline = this->ecl_well[ii]->name + " " + - //this->ecl_well[ii]->phase + " " + + // this->ecl_well[ii]->phase + " " + // this->ecl_well[ii]->open_flag + " " + // this->ecl_well[ii]->control_mode + " " + this->WellRates[ii] + //" " + " / "; @@ -5376,26 +5402,26 @@ std::string CECLIPSEData::ExecuteEclipse(long Timestep, CRFProcess* m_pcs, "MLSC3"); // total molar density for components(moles per // reservoir volume) - // this->Variables.push_back("FLOC1I+"); // inter-block - // component flow for component 1 - // this->Variables.push_back("FLOC1J+"); // inter-block - // component flow for component 1 - // this->Variables.push_back("FLOC1K+"); // inter-block - // component flow for component 1 - - // this->Variables.push_back("FLOC2I+"); // inter-block - // component flow for component 2 - // this->Variables.push_back("FLOC2J+"); // inter-block - // component flow for component 2 - // this->Variables.push_back("FLOC2K+"); // inter-block - // component flow for component 2 - - // this->Variables.push_back("FLOC3I+"); // inter-block - // component flow for component 3 - // this->Variables.push_back("FLOC3J+"); // inter-block - // component flow for component 3 - // this->Variables.push_back("FLOC3K+"); // inter-block - // component flow for component 3 + // this->Variables.push_back("FLOC1I+"); // + // inter-block component flow for component 1 + // this->Variables.push_back("FLOC1J+"); // + // inter-block component flow for component 1 + // this->Variables.push_back("FLOC1K+"); // + // inter-block component flow for component 1 + + // this->Variables.push_back("FLOC2I+"); // + // inter-block component flow for component 2 + // this->Variables.push_back("FLOC2J+"); // + // inter-block component flow for component 2 + // this->Variables.push_back("FLOC2K+"); // + // inter-block component flow for component 2 + + // this->Variables.push_back("FLOC3I+"); // + // inter-block component flow for component 3 + // this->Variables.push_back("FLOC3J+"); // + // inter-block component flow for component 3 + // this->Variables.push_back("FLOC3K+"); // + // inter-block component flow for component 3 this->Variables.push_back("FLOWATI+"); this->Variables.push_back("FLOWATJ+"); @@ -6859,7 +6885,8 @@ int CECLIPSEData::RunEclipse(long Timestep, CRFProcess* m_pcs) } // test if faces are perpenducular to I coordinate axis for (int ii = 0; - ii < int(this->eclgrid[iindex]->connected_faces.size()); ii++) + ii < int(this->eclgrid[iindex]->connected_faces.size()); + ii++) if (this->faces[ii]->model_axis.find("I") == 0) { nvec = this->faces[ii]->PlaneEquation->GetNormalVector(); diff --git a/FEM/FEMEnums.h b/FEM/FEMEnums.h index ed70f2972..8a7a0b90d 100644 --- a/FEM/FEMEnums.h +++ b/FEM/FEMEnums.h @@ -247,8 +247,8 @@ const std::list getAllDistributionNames(); --> LMAX: max(|x1-x0|) -- Infinity norm: Local max error (across all elements) of solution vector delta (absolute error). Tolerance required for each primary variable. - --> ENORM: |x1-x0| -- Euclidian norm: Norm of the solution vector delta - (absolute error). Norm taken over entire solution vector (all primary + --> ENORM: |x1-x0| -- Euclidian norm: Norm of the solution vector + delta (absolute error). Norm taken over entire solution vector (all primary variables) and checked against a single tolerance. --> EVNORM: |x1-x0| -- Euclidian varient norm: Norm of the solution vector delta (absolute error). Norm taken over solution vector of each primary diff --git a/FEM/Output.cpp b/FEM/Output.cpp index 0b45dd6da..f0647ded0 100644 --- a/FEM/Output.cpp +++ b/FEM/Output.cpp @@ -416,7 +416,7 @@ ios::pos_type COutput::Read(std::ifstream& in_str, else time_vector.push_back(strtod(line_string.data(), NULL)); // rwpt_time_vector.push_back(strtod(line_string.data(), - //NULL)); + // NULL)); in_str.ignore(MAX_ZEILE, '\n'); } continue; @@ -874,7 +874,7 @@ void COutput::NODWriteDOMDataTEC() // string tec_file_name = file_base_name + "_" + "domain" + "_tet"; // //#if defined(USE_MPI) || defined(USE_MPI_PARPROC) || - //defined(USE_MPI_REGSOIL) + // defined(USE_MPI_REGSOIL) // sprintf(tf_name, "%d", myrank); // tec_file_name += "_" + string(tf_name); //#endif @@ -1243,7 +1243,8 @@ void COutput::WriteTECNodeData(fstream& tec_file) { timelevel = 0; for (size_t m = 0; - m < m_pcs->nod_val_name_vector.size(); m++) + m < m_pcs->nod_val_name_vector.size(); + m++) if (m_pcs->nod_val_name_vector[m].compare( nod_value_name) == 0) { @@ -1883,7 +1884,7 @@ double COutput::NODWritePLYDataTEC(int number) } // WW // double old_val_n = m_pcs->GetNodeValue(old_gnode, - //NodeIndex[k]); + // NodeIndex[k]); if (_nod_value_vector[k].find("DELTA") == 0) // JOD 2014-11-10 val_n = m_pcs->GetNodeValue(gnode, 1) - m_pcs->GetNodeValue(gnode, NodeIndex[k]); @@ -1967,7 +1968,7 @@ void COutput::NODWritePNTDataTEC(double time_current, int time_step_number) CRFProcess* dm_pcs = NULL; for (size_t i = 0; i < pcs_vector.size(); i++) // if (pcs_vector[i]->pcs_type_name.find("DEFORMATION") != - //string::npos) { TF + // string::npos) { TF if (isDeformationProcess(pcs_vector[i]->getProcessType())) { dm_pcs = pcs_vector[i]; @@ -2087,7 +2088,7 @@ void COutput::NODWritePNTDataTEC(double time_current, int time_step_number) else tec_file << " ZONE T=\"POINT=" << geo_name << "\"" << "\n"; //, I=" << anz_zeitschritte << ", J=1, K=1, - //F=POINT" << "\n"; + // F=POINT" << "\n"; } } @@ -2141,8 +2142,9 @@ void COutput::NODWritePNTDataTEC(double time_current, int time_step_number) for (size_t l = 0; l < pcs_vector.size(); l++) { m_pcs = pcs_vector[l]; - // if (m_pcs->pcs_type_name.compare("MASS_TRANSPORT") == - //0) { TF + // if + //(m_pcs->pcs_type_name.compare("MASS_TRANSPORT") + //== 0) { TF if (m_pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { timelevel = 0; @@ -2151,8 +2153,8 @@ void COutput::NODWritePNTDataTEC(double time_current, int time_step_number) if (m_pcs->nod_val_name_vector[m].compare( nod_value_name) == 0) { - // m_pcs_out = PCSGet(pcs_type_name, - //nod_value_name); + // m_pcs_out = + // PCSGet(pcs_type_name, nod_value_name); m_pcs_out = PCSGet(FiniteElement::MASS_TRANSPORT, nod_value_name); if (timelevel == 1) @@ -2949,7 +2951,7 @@ void COutput::CalcELEFluxes() // CGLPolyline* ply = GEOGetPLYByName(geo_name); // if (!ply) // std::cout << "Warning in COutput::CalcELEFluxes - no GEO - //data" << "\n"; + // data" << "\n"; // BG 04/2011: ELEWritePLY_TEC does not work for MASS_TRANSPORT // because there is no flux considered @@ -3628,7 +3630,7 @@ void COutput::PCONWriteDOMDataTEC() // string tec_file_name = file_base_name + "_" + "domain" + "_tet"; // //#if defined(USE_MPI) || defined(USE_MPI_PARPROC) || - //defined(USE_MPI_REGSOIL) + // defined(USE_MPI_REGSOIL) // sprintf(tf_name, "%d", myrank); // tec_file_name += "_" + string(tf_name); //#endif diff --git a/FEM/Output.h b/FEM/Output.h index c451b4931..d1511c7a2 100644 --- a/FEM/Output.h +++ b/FEM/Output.h @@ -236,7 +236,7 @@ class COutput : public GeoInfo, public ProcessInfo, public DistributionInfo friend void OUTData(double, int step, bool force_output); // std::vector rwpt_time_vector; //JT, needed because outputs are - //treated differently in RWPT + // treated differently in RWPT // MSH std::string msh_type_name; // OK diff --git a/FEM/SparseMatrixDOK.cpp b/FEM/SparseMatrixDOK.cpp index db9d6c490..5a3f34400 100644 --- a/FEM/SparseMatrixDOK.cpp +++ b/FEM/SparseMatrixDOK.cpp @@ -469,7 +469,8 @@ void SparseMatrixDOK::Write(std::ostream& os, int format) { #ifdef USE_HASHMAP for (col_id_itr kk = set_col_id[i].begin(); - kk != set_col_id[i].end(); kk++) + kk != set_col_id[i].end(); + kk++) { jj = this->mat_row[i].find(*kk); #else diff --git a/FEM/burgers.cpp b/FEM/burgers.cpp index 8b9e044e1..d67d07268 100644 --- a/FEM/burgers.cpp +++ b/FEM/burgers.cpp @@ -65,7 +65,7 @@ void SolidBurgers::UpdateBurgersProperties(double s_eff, (PhysicalConstant::IdealGasConstant * Temperature * T_ref)); // if (etaM / etaM0 < 1.e-2) // std::cout << "WARNING: Maxwell viscosity sank to 100th of original - //value." << std::endl; + // value." << std::endl; } /************************************************************************** diff --git a/FEM/conversion_rate.cpp b/FEM/conversion_rate.cpp index f70c5126b..b0ba57be5 100644 --- a/FEM/conversion_rate.cpp +++ b/FEM/conversion_rate.cpp @@ -48,7 +48,7 @@ conversion_rate::conversion_rate(double T_solid, // set in rf_msp reaction_enthalpy = -1.12e+05; // in J/mol; negative for exothermic // composition reaction - reaction_entropy = -143.5; // in J/mol K + reaction_entropy = -143.5; // in J/mol K M_carrier = PhysicalConstant::MolarMass::N2; M_react = PhysicalConstant::MolarMass::Water; } @@ -59,7 +59,7 @@ conversion_rate::conversion_rate(double T_solid, rho_up = 4860.0; reaction_enthalpy = -1.376e+05; // in J/mol; negative for exothermic // composition reaction - reaction_entropy = -114.1; // in J/mol K + reaction_entropy = -114.1; // in J/mol K M_carrier = PhysicalConstant::MolarMass::N2; M_react = PhysicalConstant::MolarMass::O2; } @@ -297,7 +297,7 @@ double conversion_rate::Z13XBF_adsorption() // automatic time stepping should be used instead of the following. // else if (dCdt > 0.) { // double dens_guess = p_r_g*COMP_MOL_MASS_WATER/(R*T); //vapor density - //guess + // guess // //const double max_rate = dens_guess/(rho_low*dt); // //dCdt = min(dCdt,max_rate); //} diff --git a/FEM/equation_class.cpp b/FEM/equation_class.cpp index f626493a8..b3f7abb15 100644 --- a/FEM/equation_class.cpp +++ b/FEM/equation_class.cpp @@ -772,11 +772,14 @@ int Linear_EQS::Solver(CNumerics* num) // // std::string fname("CO2MAN-Matrix.bin"); // std::ofstream os (fname.c_str(), std::ios::binary); - // std::cout << "writing matrix in binary format to " << fname << " - //... " << std::flush; unsigned mat_size (size); os.write((char*) - //&mat_size, sizeof(unsigned)); unsigned *iA(new unsigned[mat_size+1]); - // for (size_t k(0); kptr[k]; + // std::cout << "writing matrix in binary format to " << fname + //<< + //" + //... " << std::flush; unsigned mat_size (size); + // os.write((char*) + //&mat_size, sizeof(unsigned)); unsigned *iA(new + // unsigned[mat_size+1]); for (size_t k(0); kptr[k]; // } // // unsigned mat_nnz(iA[mat_size]); diff --git a/FEM/fct_mpi.cpp b/FEM/fct_mpi.cpp index 8a1856d77..e478d63f5 100644 --- a/FEM/fct_mpi.cpp +++ b/FEM/fct_mpi.cpp @@ -261,13 +261,13 @@ void gatherK(const CommunicationTable& ct, Math_Group::SparseMatrixDOK& globalK) vec_sendbuf[i].resize(neighbor.overlapping_edges.size()); vec_recvbuf[i].resize(neighbor.overlapping_edges.size()); // std::cout << "rank= " << myrank << ": neighbor rank " << - //neighbor.rank << "\n"; + // neighbor.rank << "\n"; for (size_t j = 0; j < neighbor.overlapping_edges.size(); j++) { const Edge& edge = neighbor.overlapping_edges[j]; vec_sendbuf[i][j] = globalK(edge.first, edge.second); // std::cout << "rank= " << myrank << ": neighbor rank " << - //neighbor.rank << "- edge (" << + // neighbor.rank << "- edge (" << // edge.first //<< "," << edge.second << ")\n"; } @@ -280,7 +280,7 @@ void gatherK(const CommunicationTable& ct, Math_Group::SparseMatrixDOK& globalK) MPI_Isend(&vec_sendbuf[i][0], vec_sendbuf[i].size(), MPI_DOUBLE, neighbor_rank, 0, MPI_COMM_WORLD, &vec_req[i]); // std::cout << "rank= " << myrank << ": sending " << - //vec_sendbuf[i].size() << " data to rank " << + // vec_sendbuf[i].size() << " data to rank " << // neighbor_rank << "\n"; } @@ -292,7 +292,7 @@ void gatherK(const CommunicationTable& ct, Math_Group::SparseMatrixDOK& globalK) MPI_Irecv(&vec_recvbuf[i][0], vec_recvbuf[i].size(), MPI_DOUBLE, neighbor_rank, 0, MPI_COMM_WORLD, &vec_req[i]); // std::cout << "rank= " << myrank << ": receiving " << - //vec_recvbuf[i].size() << " data from rank " << + // vec_recvbuf[i].size() << " data from rank " << // neighbor_rank << "\n"; } @@ -323,9 +323,10 @@ void gatherK(const CommunicationTable& ct, Math_Group::SparseMatrixDOK& globalK) // } // // for (int i=0; idrhodP(variables) / FluidProp->Density(); - // cout << FluidProp->fluid_name << " Pressure: " << P << " Temp: - //" << ": drhodP: " << FluidProp->drhodP(P,T) << " density: " << + // cout << FluidProp->fluid_name << " Pressure: " << P << " + // Temp: " << ": drhodP: " << FluidProp->drhodP(P,T) << " density: " + //<< // FluidProp->Density() << "\n"; break; case 1: // Snw in the wetting equation @@ -2150,8 +2151,8 @@ double CFiniteElementStd::CalCoefContent() } // SB, BG dS = porval1 * nodeval1 - porval0 * nodeval0; // 1/dt accounted for in assemble function - // if(Index == 195) cout << val << "Sat_old = " << nodeval0 << ", - //Sa_new: "<< nodeval1<< ", dS: " << dS + // if(Index == 195) cout << val << "Sat_old = " << nodeval0 << + //", Sa_new: "<< nodeval1<< ", dS: " << dS //<< "\n"; val = dS; break; @@ -3103,13 +3104,13 @@ void CFiniteElementStd::CalCoefLaplacePSGLOBAL(bool Gravity, int dof_index) // Doing Upwind elements for saturation by divergent of // pressure. Pnw upwind // int WhichNode = - //UpwindElement((int)(pcs->m_num->ele_upwind_method), 1); // TF: - //set, but never used Snw = NodalVal_SatNW[WhichNode]; // TF: - //set, but never used + // UpwindElement((int)(pcs->m_num->ele_upwind_method), 1); // + // TF: set, but never used Snw = + // NodalVal_SatNW[WhichNode]; // TF: set, but never used // } // else - // Snw = interpolate(NodalVal_SatNW); // TF: set, but - //never used + // Snw = interpolate(NodalVal_SatNW); // TF: set, + // but never used CMediumProperties* m_mmp = NULL; CElem* thisEle = pcs->m_msh->ele_vector[index]; @@ -3142,17 +3143,18 @@ void CFiniteElementStd::CalCoefLaplacePSGLOBAL(bool Gravity, int dof_index) // Doing Upwind elements for saturation by divergent of pressure. // Pnw upwind // int WhichNode = - //UpwindElement((int)(pcs->m_num->ele_upwind_method), 1); // TF: - //set, but never used Snw = NodalVal_SatNW[WhichNode]; // TF: set, - //but never used + // UpwindElement((int)(pcs->m_num->ele_upwind_method), 1); // TF: + // set, but never used Snw = NodalVal_SatNW[WhichNode]; // + // TF: set, but never used // } // else // Snw = interpolate(NodalVal_SatNW); // TF: set, but never - //used + // used // CElem* thisEle = pcs->m_msh->ele_vector[index]; // TF: set, - //but never used int matgrp = thisEle->GetPatchIndex(); // TF: set, - //but never used CMediumProperties* m_mmp = mmp_vector[matgrp]; + // but never used int matgrp = thisEle->GetPatchIndex(); // + // TF: set, but never used CMediumProperties* m_mmp = + // mmp_vector[matgrp]; k_rel = MediaProp->PermeabilitySaturationFunction(Sw, 1); mat_fac = k_rel / GasProp->Viscosity(); @@ -3618,8 +3620,10 @@ double CFiniteElementStd::CalCoefAdvection() val = FluidProp->SpecificHeatCapacity() * FluidProp->Density(); break; case EPT_MASS_TRANSPORT: // Mass transport //SB4200 - val = 1.0 * time_unit_factor; //*MediaProp->Porosity(Index,pcs->m_num->ls_theta); - //// Porosity; + val = + 1.0 * + time_unit_factor; //*MediaProp->Porosity(Index,pcs->m_num->ls_theta); + //// Porosity; break; case EPT_OVERLAND_FLOW: // Liquid flow val = 1.0; @@ -7525,14 +7529,14 @@ void CFiniteElementStd::AssembleRHS(int dimension) PcsType = EPT_LIQUID_FLOW; break; // } else if (m_pcs->pcs_type_name.find("RICHARDS_FLOW") != - //string::npos) { // TF + // string::npos) { // TF } else if (m_pcs->getProcessType() == FiniteElement::RICHARDS_FLOW) { PcsType = EPT_RICHARDS_FLOW; break; // } else if (m_pcs->pcs_type_name.find("GROUNDWATER_FLOW") // - //TF + // TF } else if (m_pcs->getProcessType() == FiniteElement::GROUNDWATER_FLOW) { @@ -7544,7 +7548,7 @@ void CFiniteElementStd::AssembleRHS(int dimension) pcs = m_pcs; int nidx1; // if (!(m_pcs->pcs_type_name.find("GROUNDWATER_FLOW") != string::npos)) // - //TF + // TF if (!(m_pcs->getProcessType() == GROUNDWATER_FLOW)) nidx1 = m_pcs->GetNodeValueIndex("PRESSURE1") + 1; else // then, this is GROUNDWATER_FLOW @@ -7593,8 +7597,8 @@ void CFiniteElementStd::AssembleRHS(int dimension) rho = 1.0; else rho *= gravity_constant; - // rho *= gravity_constant/FluidProp->Viscosity(); // This seems - //to divide viscosity two times. Thus, wrong. + // rho *= gravity_constant/FluidProp->Viscosity(); // This + // seems to divide viscosity two times. Thus, wrong. fktG *= rho; for (int i = 0; i < nnodes; i++) @@ -7628,7 +7632,8 @@ void CFiniteElementStd::AssembleRHS(int dimension) for (size_t i = 0; i < pcs_vector.size(); ++i) { m_pcs = pcs_vector[i]; - // if (m_pcs->pcs_type_name.find("GROUNDWATER_FLOW") != string::npos) + // if (m_pcs->pcs_type_name.find("GROUNDWATER_FLOW") != + // string::npos) //// TF if (m_pcs->getProcessType() == GROUNDWATER_FLOW) { @@ -8595,8 +8600,8 @@ void CFiniteElementStd::AssembleMixedHyperbolicParabolicEquation() (*AuxMatrix) *= fac_storage; *StiffMatrix += *AuxMatrix; // Content matrix - //*AuxMatrix = *Content; //SB, BG; Korrektur Stofftransport bei - //Mehrphasenströmung + //*AuxMatrix = *Content; //SB, BG; Korrektur Stofftransport + // bei Mehrphasenströmung //(*AuxMatrix) *= fac_content; //*StiffMatrix += *AuxMatrix; // SB, BG @@ -8693,7 +8698,7 @@ void CFiniteElementStd::AssembleMixedHyperbolicParabolicEquation() cout << " initial concentrations" << "\n"; for (i=0;iDBL_MIN) // //DBL_EPSILON) @@ -1430,7 +1431,8 @@ void CSparseMatrix::Write_BIN(std::ostream& os) ptr[ii * rows + i] = counter; for (jj = 0; jj < DOF; jj++) for (k = num_column_entries[i]; - k < num_column_entries[i + 1]; k++) + k < num_column_entries[i + 1]; + k++) { A_index[counter] = jj * rows + entry_column[k]; A_value[counter] = diff --git a/FEM/matrix_routines.cpp b/FEM/matrix_routines.cpp index de8483c18..3cb1e40c8 100644 --- a/FEM/matrix_routines.cpp +++ b/FEM/matrix_routines.cpp @@ -250,9 +250,10 @@ typedef struct /* Die nachfolgenden Makros dienen der besseren Lesbarkeit (Kuerze!) des Codes. Sie werden am Ende dieser Quelle saemtlich undefiniert! Allgemeines: */ -#define dim ((long*)wurzel)[0] /* Dimension der aktuellen Matrix */ -#define matrix_type ((long*)wurzel)[1] /* Speichermodell der aktuellen Matrix \ - */ +#define dim ((long*)wurzel)[0] /* Dimension der aktuellen Matrix */ +#define matrix_type \ + ((long*)wurzel)[1] /* Speichermodell der aktuellen Matrix \ + */ #define Maxim(x, v) \ if (x < (v)) \ x = v /* x =max(x,v) */ @@ -1883,7 +1884,7 @@ void* M5CreateMatrix(long param1, long param2, long param3) ii = jd_ptr2[i]; index = m_msh->Eqs2Global_NodeIndex[ii]; // col_ind[count1] = - //m_msh->go[m_msh->nod_vector[index]->connected_nodes[k]]; + // m_msh->go[m_msh->nod_vector[index]->connected_nodes[k]]; col_i = m_msh->nod_vector[index]->getConnectedNodes()[k]; col_ind[count1] = m_msh->nod_vector[col_i]->GetEquationIndex(); jj = col_ind[count1]; diff --git a/FEM/minkley.cpp b/FEM/minkley.cpp index 118d8488d..9c6436fa0 100644 --- a/FEM/minkley.cpp +++ b/FEM/minkley.cpp @@ -110,7 +110,7 @@ void SolidMinkley::UpdateMinkleyProperties(double s_eff, const double eps_p_eff, hard4))); // fourth order isotropic hardening/softening // if (etaM / etaM0 < 1.e-2) // std::cout << "WARNING: Maxwell viscosity sank to 100th of original - //value." << std::endl; + // value." << std::endl; } /************************************************************************** diff --git a/FEM/pcs_dm.cpp b/FEM/pcs_dm.cpp index fb39a7722..bb6ca682a 100644 --- a/FEM/pcs_dm.cpp +++ b/FEM/pcs_dm.cpp @@ -2741,7 +2741,7 @@ void CRFProcessDeformation::GlobalAssembly() // STD else #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//10.3012. - //WW + // WW { GlobalAssembly_DM(); @@ -2857,8 +2857,8 @@ void CRFProcessDeformation::PostExcavation() if (msp_vector[l]->excavated) deact_dom.push_back(l); } - // if(ExcavMaterialGroup>=0&&PCS_ExcavState<0) //WX:01.2010.update pcs excav - // state + // if(ExcavMaterialGroup>=0&&PCS_ExcavState<0) //WX:01.2010.update pcs + // excav state if (ExcavMaterialGroup >= 0) { for (size_t l = 0; l < m_msh->ele_vector.size(); l++) @@ -2875,9 +2875,8 @@ void CRFProcessDeformation::PostExcavation() m_msh->ele_vector[l]->SetExcavState( 0); // 1=now, 0=past PCS_ExcavState = 1; // not necessary - now_Excav = - true; // new elems are excavated at this time step - // break; + now_Excav = true; // new elems are excavated at this time + // step break; } } } @@ -3383,7 +3382,8 @@ void CRFProcessDeformation::ReleaseLoadingByExcavation() // CC 10/05 Surface* m_surface = GEOGetSFCByName(m_st->getGeoName()); // 07/2010 TF ToDo: to do away with the global vector - //surface_vector fetch the geometry from CFEMesh Surface *m_surface + // surface_vector fetch the geometry + // from CFEMesh Surface *m_surface //(surface_vector[m_st->getGeoObjIdx()]); if (m_surface) { diff --git a/FEM/problem.cpp b/FEM/problem.cpp index 2e85f194c..87943670a 100644 --- a/FEM/problem.cpp +++ b/FEM/problem.cpp @@ -462,7 +462,7 @@ Problem::Problem(const char* filename) #endif } #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW //---------------------------------------------------------------------- PCSRestart(); // SB OUTCheck(); // new SB @@ -1545,7 +1545,7 @@ bool Problem::CouplingLoop() // inner_max = a_pcs->m_num->cpl_max_iterations; // inner_min = a_pcs->m_num->cpl_min_iterations; // - //variable set but never used + // variable set but never used // a_pcs->iter_outer_cpl = outer_index; b_pcs->iter_outer_cpl = outer_index; @@ -1563,7 +1563,7 @@ bool Problem::CouplingLoop() if (a_pcs->first_coupling_iteration) PreCouplingLoop(a_pcs); // error = Call_Member_FN(this, - //active_processes[index])(); + // active_processes[index])(); Call_Member_FN(this, active_processes[index])(); if (!a_pcs->TimeStepAccept()) { @@ -1576,7 +1576,7 @@ bool Problem::CouplingLoop() if (b_pcs->first_coupling_iteration) PreCouplingLoop(b_pcs); // error = Call_Member_FN(this, - //active_processes[cpl_index])(); + // active_processes[cpl_index])(); Call_Member_FN(this, active_processes[cpl_index])(); if (!b_pcs->TimeStepAccept()) { @@ -1631,7 +1631,7 @@ bool Problem::CouplingLoop() if (a_pcs->first_coupling_iteration) PreCouplingLoop(a_pcs); // error = Call_Member_FN(this, - //active_processes[index])(); // TF: error set, but never + // active_processes[index])(); // TF: error set, but never // used Call_Member_FN(this, active_processes[index])(); if (!a_pcs->TimeStepAccept()) @@ -2102,8 +2102,9 @@ inline double Problem::MultiPhaseFlow() // m_pcs->CalculateFluidDensitiesAndViscositiesAtNodes(m_pcs); // Cases: decide, weather to use GEOSYS, ECLIPSE or DuMux; BG 10/2010 - if ((m_pcs->simulator.compare("GEOSYS") == 0)) // ||(m_pcs->simulator.compare("ECLIPSE")==0)){ - // // standard: use GeoSys + if ((m_pcs->simulator.compare("GEOSYS") == + 0)) // ||(m_pcs->simulator.compare("ECLIPSE")==0)){ + // // standard: use GeoSys { // if((m_pcs->simulator.compare("GEOSYS")==0) // ||(m_pcs->simulator.compare("ECLIPSE")==0)){ // standard: use GeoSys @@ -3031,7 +3032,7 @@ void Problem::OutputMassOfComponentInModel(std::vector flow_pcs, // int position; std::string path; // double density_water; // 2012-08 TF, variable ‘density_water’ set but - //not used [-Wunused-but-set-variable] + // not used [-Wunused-but-set-variable] double porosity; // int variable_index; // 2012-08 TF, variable set but not used double ComponentConcentration, TotalVolume, SourceTerm; @@ -3103,15 +3104,16 @@ void Problem::OutputMassOfComponentInModel(std::vector flow_pcs, node_volume = 0; if (mfp_vector[0]->density_model == 18) { - // variable_index = flow_pcs[0]->GetNodeValueIndex("DENSITY1"); + // variable_index = + // flow_pcs[0]->GetNodeValueIndex("DENSITY1"); //// // 2012-08 TF, variable set but // not used density_water = flow_pcs[0]->GetNodeValue(i, // variable_index); // 2012-08 TF, variable ‘density_water’ set but - //not used [-Wunused-but-set-variable] + // not used [-Wunused-but-set-variable] } // else // density_water = mfp_vector[0]->Density(); // 2012-08 TF, - //variable ‘density_water’ set but not used + // variable ‘density_water’ set but not used //[-Wunused-but-set-variable] for (int j = 0; j < int(m_node->getConnectedElementIDs().size()); j++) @@ -3767,17 +3769,17 @@ inline double Problem::RandomWalker() // Select the mesh whose process name has the mesh for // Fluid_Momentum // if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) // TF if (m_pcs->getProcessType() == FiniteElement::RICHARDS_FLOW) m_msh = FEMGet("RICHARDS_FLOW"); // else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) // TF else if (m_pcs->getProcessType() == FiniteElement::LIQUID_FLOW) m_msh = FEMGet("LIQUID_FLOW"); // else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) // TF else if (m_pcs->getProcessType() == FiniteElement::GROUNDWATER_FLOW) m_msh = FEMGet("GROUNDWATER_FLOW"); diff --git a/FEM/rf_REACT_BRNS.cpp b/FEM/rf_REACT_BRNS.cpp index 71f757efe..b6607b263 100644 --- a/FEM/rf_REACT_BRNS.cpp +++ b/FEM/rf_REACT_BRNS.cpp @@ -499,7 +499,7 @@ void REACT_BRNS::RUN(double time_step) // Run BRNS; // solverTime=0.0; // if (pos_x== 0 && pos_y==0) { porosity=8; pos_z=99.9; - //waterSaturation=3.3; solverTime=7.0; cout << "solverTime + // waterSaturation=3.3; solverTime=7.0; cout << "solverTime // passed to BRNS: " << solverTime << endl; } #ifdef USE_MPI_BRNS @@ -596,7 +596,8 @@ void REACT_BRNS::RUN(double time_step) #else timeSpentInBrnsCoupling += (double)(clock() - startTime) / CLOCKS_PER_SEC; -// cout << "solverTime=" << solverTime << "total "<< timeSpentInBrnsSolver +// cout << "solverTime=" << solverTime << "total "<< +// timeSpentInBrnsSolver //<< endl; #endif @@ -726,7 +727,8 @@ int REACT_BRNS::GetFlowType_MT(void) m_flow_pcs = m_pcs; return 3; } - // else if ( m_pcs->pcs_type_name.compare ( "TWO_PHASE_FLOW" ) ==0 ) + // else if ( m_pcs->pcs_type_name.compare ( "TWO_PHASE_FLOW" ) ==0 + //) //{ else if (m_pcs->getProcessType() == FiniteElement::TWO_PHASE_FLOW) { diff --git a/FEM/rf_REACT_GEM.cpp b/FEM/rf_REACT_GEM.cpp index c3b8dad99..a44fc6bda 100644 --- a/FEM/rf_REACT_GEM.cpp +++ b/FEM/rf_REACT_GEM.cpp @@ -1439,12 +1439,12 @@ double REACT_GEM::GetPressureValue_MT(long node_Index, int timelevel) case 3: // for "RICHARDS_FLOW", not tested!!! pressure = m_gem_pressure; // indx = m_flow_pcs->GetNodeValueIndex ( "PRESSURE1" ) - //+timelevel; pressure = m_flow_pcs->GetNodeValue ( node_Index, - //indx ); // The unit of HEAD is in meters + //+timelevel; pressure = m_flow_pcs->GetNodeValue ( + // node_Index, indx ); // The unit of HEAD is in meters // change the pressure unit from meters of water to bar. // pressure = Pressure_M_2_Bar ( pressure , - //m_FluidProp->Density() ); + // m_FluidProp->Density() ); // add atmospheric pressure // pressure +=1.0; if (pressure < 0.0 /*valcumm suction in groundwater is not so @@ -1517,9 +1517,9 @@ short REACT_GEM::SetPressureValue_MT(long node_Index, int timelevel, break; // m_pcs = PCSGet ( "RICHARDS_FLOW" ); // indx = m_pcs->GetNodeValueIndex ( "PRESSURE1" ) - //+timelevel; pressure = Pressure_Bar_2_Pa ( pressure ); - // m_pcs->SetNodeValue ( node_Index, indx, pressure ); - // break; + //+timelevel; pressure = Pressure_Bar_2_Pa ( pressure + //); m_pcs->SetNodeValue ( node_Index, indx, pressure + //); break; case 4: m_pcs = PCSGet("MULTI_PHASE_FLOW"); indx = m_pcs->GetNodeValueIndex("PRESSURE1") + timelevel; @@ -2289,7 +2289,7 @@ int REACT_GEM::CalcPorosity(long in, TNode* m_Node) // normalized by m_Vs // m_porosity[in] = 1.0 - m_porosity[in] / ( m_Vs[in] * 1.0e-6 /*convert to - //cm3 here*/) ; + // cm3 here*/) ; // kg44 this is the correct way to do it m_porosity[in] = 1.0 - (m_porosity[in]); @@ -2300,8 +2300,8 @@ int REACT_GEM::CalcPorosity(long in, TNode* m_Node) m_porosity[in] = max_possible_porosity; // upper limit of porosity if (m_porosity[in] <= min_possible_porosity) m_porosity[in] = - min_possible_porosity; // lower limit of porosity.. cout << " - // skal factor " << skal_faktor << " + min_possible_porosity; // lower limit of porosity.. cout << + // " skal factor " << skal_faktor << " // excess water volume " << m_excess_water[in] ; // cout <<" porosity:" << m_porosity[in] << " node: "<< in <<" Vs // "<GetNodeValue(in, idx + 1); // m_pcs->SetNodeValue ( in, idx, m_fluid_volume[in] / - //m_porosity[in]); // instead change + // m_porosity[in]); // instead change // saturation accordingly; this is done always. } // m_excess_gas[in] = m_gas_volume[in]- m_porosity[in]* ( 1.0 - @@ -2489,14 +2489,15 @@ int REACT_GEM::MassToConcentration( } #if defined(USE_MPI_GEMS) || defined(USE_PETSC) // if ( fabs ( m_excess_water_buff[in] ) >= 0.01 ) cout << "node "<< in <<" -//m_excess_water" << m_excess_water_buff[in] +// m_excess_water" << m_excess_water_buff[in] //<<"\n"; // if ( fabs ( m_excess_gas_buff[in] ) >= 0.01 ) cout << "node "<< in <<" -//m_excess_gas" << m_excess_water_buff[in] +// m_excess_gas" << m_excess_water_buff[in] //<<"\n"; #else // if ( fabs ( m_excess_water[in] ) >= 0.01 ) cout << "node "<< in <<" -//m_excess_water " << m_excess_water[in] <<"\n"; if ( fabs ( m_excess_gas[in] ) +// m_excess_water " << m_excess_water[in] <<"\n"; if ( fabs ( m_excess_gas[in] +// ) //>= 0.01 ) cout << "node "<< in <<" m_excess_gas " << m_excess_water[in] //<<"\n"; #endif @@ -3123,17 +3124,19 @@ ios::pos_type REACT_GEM::Read(std::ifstream* gem_file) // cout <<" activities " << n_activities << "\n"; // first general kinetic parameters // 0,1,2 double E_acid,E_neutral,E_base; // activation - //energies + // energies in >> d_kin.kinetic_parameters[0] >> d_kin.kinetic_parameters[1] >> d_kin.kinetic_parameters[2]; - // cout << kinetic_parameters[0] << kinetic_parameters[1] + // cout << kinetic_parameters[0] << + // kinetic_parameters[1] //<< kinetic_parameters[1]<<"\n"; // 3-5 double k_acid, k_neutral,k_base; // // dissolution/precipitation rate constants in >> d_kin.kinetic_parameters[3] >> d_kin.kinetic_parameters[4] >> d_kin.kinetic_parameters[5]; - // cout << kinetic_parameters[3] << kinetic_parameters[4] + // cout << kinetic_parameters[3] << + // kinetic_parameters[4] //<< kinetic_parameters[5]<<"\n"; // 6-11 double q1,p1,q2,q3,p2,p3; // exponents for omega @@ -3295,7 +3298,8 @@ int REACT_GEM::CalcReactionRate(long in, double temp, TNode* m_Node) // vanselow convention { for (j = m_kin[ii].dc_counter; - j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; j++) + j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; + j++) // do not include surface complexation species! if (!(dCH->ccDC[j] == '0') && !(dCH->ccDC[j] == 'X') && !(dCH->ccDC[j] == 'Y') && !(dCH->ccDC[j] == 'Z')) @@ -3319,13 +3323,14 @@ int REACT_GEM::CalcReactionRate(long in, double temp, TNode* m_Node) // characteristics { for (j = m_kin[ii].dc_counter; - j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; j++) + j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; + j++) // do not include surface complexation species! if (!(dCH->ccDC[j] == '0') && !(dCH->ccDC[j] == 'X') && !(dCH->ccDC[j] == 'Y') && !(dCH->ccDC[j] == 'Z')) { - // omega_phase[k] += CalcSaturationIndex ( j, - //in,tempC,press ); // loop over all + // omega_phase[k] += CalcSaturationIndex ( + // j, in,tempC,press ); // loop over all // components of the phase // we need this later for solid solutions.... omega_components[in * nDC + j] = m_Node->DC_a(j); @@ -3530,7 +3535,8 @@ int REACT_GEM::CalcLimitsInitial(long in, TNode* m_Node) // kinetic_mocel==3 only precipitation (no dissolution) for (j = m_kin[ii].dc_counter; - j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; j++) + j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; + j++) { if ((dCH->ccDC[j] == '0') || (dCH->ccDC[j] == 'X') || (dCH->ccDC[j] == 'Y') || (dCH->ccDC[j] == 'Z')) @@ -3597,7 +3603,8 @@ int REACT_GEM::CalcLimits(long in, TNode* m_Node) // kinetic_model==2 only dissolution (no precipitation) // kinetic_mocel==3 only precipitation (no dissolution) for (j = m_kin[ii].dc_counter; - j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; j++) + j < m_kin[ii].dc_counter + dCH->nDCinPH[k]; + j++) { // cout << "Kin debug " << in << " mol amount species " << // m_xDC[in*nDC+j] << " saturation phase " @@ -4637,9 +4644,9 @@ void REACT_GEM::gems_worker(int tid, string m_Project_path) // const std::vector& msh_nodes //(m_flow_pcs->m_msh->getNodeVector()); double const* const coords //(msh_nodes[in]->getData()); if (coords[0] <=0.0) - //m_dll[in*nDC+nDC-3]=27300.0; // here set monocorn... if ((coords[0] - //>0.0) && (coords[0]<10.0)) m_dll[in*nDC+nDC-6]= 2.869412109375e+04; // - //here set gravel + // m_dll[in*nDC+nDC-3]=27300.0; // here set monocorn... if + // ((coords[0] >0.0) && (coords[0]<10.0)) + // m_dll[in*nDC+nDC-6]= 2.869412109375e+04; // here set gravel // if (coords[0] >=10.0) m_dll[in*nDC+nDC-3]=2.532753515625e+04; // // here set monocorn again diff --git a/FEM/rf_bc_new.cpp b/FEM/rf_bc_new.cpp index 591de11c5..e05b61f66 100644 --- a/FEM/rf_bc_new.cpp +++ b/FEM/rf_bc_new.cpp @@ -1483,18 +1483,23 @@ void CBoundaryConditionsGroup::Set(CRFProcess* pcs, nodes_vector.clear(); // m_msh->GetNODOnSFC(m_surface, - //nodes_vector); #ifndef NDEBUG GEOLIB::GEOObjects const& - //geo_obj(* m_msh->getGEOObjects()); std::string const& - //geo_project_name (* m_msh->getProjectName()); std::string - //sfc_name; + // nodes_vector); #ifndef NDEBUG + // GEOLIB::GEOObjects const& geo_obj(* + // m_msh->getGEOObjects()); std::string const& + // geo_project_name (* m_msh->getProjectName()); + // std::string sfc_name; // geo_obj.getSurfaceVecObj(geo_project_name)->getNameOfElement(sfc, - //sfc_name); std::string debug_fname("MeshNodesOld-BC-" + - //sfc_name + ".gli"); std::ofstream debug_out - //(debug_fname.c_str()); debug_out << "#POINTS" << "\n"; for - //(size_t k(0); kgetNodeVector())[nodes_vector[k]]->getData()) - //<< " $NAME " << nodes_vector[k] << "\n"; + //<< " $NAME " << nodes_vector[k] + //<< + //"\n"; // } // debug_out << "#STOP" << "\n"; // debug_out.close(); @@ -1531,8 +1536,8 @@ void CBoundaryConditionsGroup::Set(CRFProcess* pcs, // nodes_vector.clear(); for (size_t k(0); k < msh_nod_vec.size(); k++) { - // std::cout << "\t" << k << "\t" << - //nodes_vector_old[k] << "\t" << + // std::cout << "\t" << k << "\t" + //<< nodes_vector_old[k] << "\t" << // msh_nod_vec[k] //<< //"\n"; @@ -1715,7 +1720,8 @@ void CBoundaryConditionsGroup::Set(CRFProcess* pcs, // m_node_value->msh_node_number = nodes_vector[i] // + ShiftInNodeVector; //nodes[i]; // m_node_value->geo_node_number = nodes_vector[i]; - ////nodes[i]; m_node_value->node_value = bc->geo_node_value; + ////nodes[i]; m_node_value->node_value = + /// bc->geo_node_value; // m_node_value->pcs_pv_name = pcs_pv_name; //YD/WW // m_node_value->CurveIndex = bc->getCurveIndex(); // pcs->bc_node.push_back(bc); //WW diff --git a/FEM/rf_fluid_momentum.cpp b/FEM/rf_fluid_momentum.cpp index 175489501..892f162dd 100644 --- a/FEM/rf_fluid_momentum.cpp +++ b/FEM/rf_fluid_momentum.cpp @@ -149,11 +149,11 @@ double CFluidMomentum::Execute(int loop_process_number) if (m_pcs->getProcessType() == FiniteElement::RICHARDS_FLOW) m_msh = FEMGet("RICHARDS_FLOW"); // else if( m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) - //TF + // TF else if (m_pcs->getProcessType() == FiniteElement::LIQUID_FLOW) m_msh = FEMGet("LIQUID_FLOW"); // else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) TF + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) TF else if (m_pcs->getProcessType() == FiniteElement::GROUNDWATER_FLOW) m_msh = FEMGet("GROUNDWATER_FLOW"); @@ -497,11 +497,11 @@ void CFluidMomentum::ConstructFractureNetworkTopology() if (m_pcs->getProcessType() == FiniteElement::RICHARDS_FLOW) m_msh = FEMGet("RICHARDS_FLOW"); // else if( m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) - //TF + // TF else if (m_pcs->getProcessType() == FiniteElement::LIQUID_FLOW) m_msh = FEMGet("LIQUID_FLOW"); // else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) TF + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) TF else if (m_pcs->getProcessType() == FiniteElement::GROUNDWATER_FLOW) m_msh = FEMGet("GROUNDWATER_FLOW"); } diff --git a/FEM/rf_ic_new.cpp b/FEM/rf_ic_new.cpp index 10fcaffb4..b70531fb1 100644 --- a/FEM/rf_ic_new.cpp +++ b/FEM/rf_ic_new.cpp @@ -872,7 +872,8 @@ void CInitialCondition::SetDomain(int nidx) FiniteElement::OVERLAND_FLOW) // OK MSH for (i = 0; - i < this->getProcess()->m_msh->GetNodesNumber(false); i++) + i < this->getProcess()->m_msh->GetNodesNumber(false); + i++) { node_val = geo_node_value + diff --git a/FEM/rf_kinreact.cpp b/FEM/rf_kinreact.cpp index 18f3576f9..b145ad4f4 100644 --- a/FEM/rf_kinreact.cpp +++ b/FEM/rf_kinreact.cpp @@ -1232,7 +1232,7 @@ void KRConfig(const GEOLIB::GEOObjects& geo_obj, const std::string& unique_name) "Change Settings in *.mmp file " << "\n"; //#ds k= m_krd->NumberLinear + m_krd->NumberFreundlich + - //m_krd->NumberLangmuir; + // m_krd->NumberLangmuir; int k = m_krd->NumberLinear + m_krd->NumberFreundlich + m_krd->NumberLangmuir + m_krd->NumberNAPLdissolution; if (k > 0) @@ -1552,7 +1552,8 @@ void KRConfig(const GEOLIB::GEOObjects& geo_obj, const std::string& unique_name) // check vs. all previously identified nodes to // prevent duplicate entries for (size_t nn = 0; - nn < ReactNeighborNodes.size(); nn++) + nn < ReactNeighborNodes.size(); + nn++) // node has already been found if (annode_idx == ReactNeighborNodes[nn]) { @@ -2317,7 +2318,8 @@ int CKinReact::CheckReactionDataConsistency() if (number_reactionpartner < 2) { // SB todo ok=0; - // SB todo cout << " Less than two reaction partners in equation found" + // SB todo cout << " Less than two reaction partners in equation + // found" // << "\n"; } // Ratekonstant zero? @@ -2378,7 +2380,8 @@ int CKinReact::CheckReactionDataConsistency() if ((number_monod + number_inhibit + number_production == 0) && (type == "monod")) { - // cout << "Warning: no monod terms specified for monod equation "<< + // cout << "Warning: no monod terms specified for monod equation + //"<< //"\n"; } @@ -2534,7 +2537,7 @@ void CKinReact::Write(ofstream* rfe_file) //*rfe_file << "$PRODUCTIONTERMS" << "\n" << number_production << "\n"; // for(i=0;ispecies << " " << - //production[i]->concentration << " " << production[i]->order + // production[i]->concentration << " " << production[i]->order //<< "\n"; // Production Terms length = (int)ProdStochhelp.size(); @@ -3158,10 +3161,11 @@ void KBlobConfig(const GEOLIB::GEOObjects& geo_obj, { // 06/2010 TF - switch to new GEOLIB - REMOVE CANDIDATE // CGLPoint* m_geo_point = NULL; // make new GEO - //point m_geo_point = GEOGetPointByName(s_geo_name);//Get GEO - //point by name if (m_geo_point) l = - //m_msh->GetNODOnPNT(m_geo_point); // + ShiftInNodeVector; // - //find MSH point + // point m_geo_point = + // GEOGetPointByName(s_geo_name);//Get GEO + // point by name if (m_geo_point) l = + // m_msh->GetNODOnPNT(m_geo_point); // + ShiftInNodeVector; // + // find MSH point // number // stored // in l @@ -3723,8 +3727,8 @@ void CKinReactData::Write(ofstream* rfe_file) //*rfe_file << " Number of reactions: " << NumberReactions << "\n"; //*rfe_file << " Number of linear exchange reactions: " << NumberLinear << //"\n"; *rfe_file << " Number of freundlich exchange reactions: " << - //NumberFreundlich << "\n"; *rfe_file << " Number of langmuir exchange - //reactions: " << NumberLangmuir << "\n"; *rfe_file << " is_a_bacterium: " + // NumberFreundlich << "\n"; *rfe_file << " Number of langmuir exchange + // reactions: " << NumberLangmuir << "\n"; *rfe_file << " is_a_bacterium: " //<< "\n"; // for(i=0;iexSurface[m_kr->exSurfaceID]; //#ds ACHTUNG hier muss sicher gestellt sein, dass Sp1 die - //adsorbierte und Sp2 die gel�ste Species ist ! + // adsorbierte und Sp2 die gel�ste Species ist ! exchange = kadsorb * (totalSurface - occupiedSurface[surfaceID]) * c[Sp2] - @@ -6824,8 +6828,8 @@ void jacobn(double t, double c[], double dfdt[], double** dfdc, int n, pow((m_kr->Current_Csat[node] - c[Sp2]), exponent) * dt) > c[Sp1]) { - // dfdc[Sp1][Sp2] = 0 derivatives for water-concentration - //is zero in case of reduced rate in + // dfdc[Sp1][Sp2] = 0 derivatives for + // water-concentration is zero in case of reduced rate in // derivs // dfdc[Sp2][Sp2] = 0 @@ -6842,8 +6846,8 @@ void jacobn(double t, double c[], double dfdt[], double** dfdc, int n, // Case 2 : original rate in derivs else { - // dfdc[Sp1][Sp1] = 0 derivatives for NAPL-concentration - //always zero dfdc[Sp2][Sp1] = 0 + // dfdc[Sp1][Sp1] = 0 derivatives for + // NAPL-concentration always zero dfdc[Sp2][Sp1] = 0 // if ( (m_kr->current_Csat < c[Sp2]) || (c[Sp1] > // MKleinsteZahl) ) { // no dissolution or NAPL mass @@ -9722,7 +9726,8 @@ void CKinReactData::CopyConcentrations(void) coord0 = m_msh->nod_vector[i]->getData(); // check all neighbour nodes for (j = 0; - j < m_msh->nod_vector[i]->getNumConnectedNodes(); j++) + j < m_msh->nod_vector[i]->getNumConnectedNodes(); + j++) { nidx = m_msh->nod_vector[i]->getConnectedNodes()[j]; coord1 = m_msh->nod_vector[nidx]->getData(); diff --git a/FEM/rf_kinreact.h b/FEM/rf_kinreact.h index 8fef104aa..2ad79609b 100644 --- a/FEM/rf_kinreact.h +++ b/FEM/rf_kinreact.h @@ -153,8 +153,8 @@ class CKinReact std::string bacteria_name; int bacteria_number; std::vector ProductionStoch; // stochiometry of reaction - // vector ProductionStoch2; // stochiometry of reaction - short - // version + // vector ProductionStoch2; // stochiometry of reaction - + // short version std::vector ProdStochhelp; // store input values double specif_cap; // CB Isotope fractionation @@ -199,7 +199,7 @@ class CKinReact interally calculated */ double Density_NAPL; /* density of the pure NAPL phase */ // double ConversionFactor; /* factor to convert concentrations to - //mol/kg */ + // mol/kg */ // SB speed-up flags int typeflag_monod; /* set to 1 if reaction is monod type */ int typeflag_exchange; /* set to 1 if reaction is exchange type */ diff --git a/FEM/rf_mfp_new.cpp b/FEM/rf_mfp_new.cpp index 676009000..100373dba 100644 --- a/FEM/rf_mfp_new.cpp +++ b/FEM/rf_mfp_new.cpp @@ -967,7 +967,7 @@ void CFluidProperties::Write(std::ofstream* mfp_file) const // TF 11/2011 - used only in read- and write-method // if(heat_capacity_model == 0) // *mfp_file << " " << heat_capacity_model << " " << - //heat_capacity_fct_name << + // heat_capacity_fct_name << // "\n"; if (heat_capacity_model == 1) *mfp_file << " " << heat_capacity_model << " " @@ -4026,7 +4026,8 @@ double Hash_Table::CalcValue(double* var, const int var_id) const { data_0 = hash_table_data[i + j]; for (k = table_section_ends[i + j]; - k < table_section_ends[i + j + 1]; k++) + k < table_section_ends[i + j + 1]; + k++) { } } diff --git a/FEM/rf_mmp_new.cpp b/FEM/rf_mmp_new.cpp index 5e90e5e83..fe5d43c08 100644 --- a/FEM/rf_mmp_new.cpp +++ b/FEM/rf_mmp_new.cpp @@ -1000,14 +1000,14 @@ std::ios::pos_type CMediumProperties::Read(std::ifstream* mmp_file) // plas strain) in >> permeability_strain_model_value[0]; // threshold vol. // strain - in >> - permeability_strain_model_value[1]; // d_fac/d_volStrain - // when vol. strain - // <= threshold - in >> - permeability_strain_model_value[2]; // d_fac/d_volStrain - // when vol. strain - // > threshold + in >> permeability_strain_model_value + [1]; // d_fac/d_volStrain + // when vol. strain + // <= threshold + in >> permeability_strain_model_value + [2]; // d_fac/d_volStrain + // when vol. strain + // > threshold in >> permeability_strain_model_value [3]; // curve numer for dependenc between // threshold and plas strain @@ -2602,11 +2602,11 @@ double CMediumProperties::PermeabilitySaturationFunction( // TF: the following commented code is a new implementation of JOD // with this code we have different results in benchmark // H2/LabGasInjec/H2_Permeability_GasPressure - // if (sl > (maximum_saturation[phase] - MKleinsteZahl)) sl = - //maximum_saturation[phase] + // if (sl > (maximum_saturation[phase] - MKleinsteZahl)) sl + //= maximum_saturation[phase] // - MKleinsteZahl; - // if (sl < (residual_saturation[phase] + MKleinsteZahl)) sl = - //residual_saturation[phase] + // if (sl < (residual_saturation[phase] + MKleinsteZahl)) + // sl = residual_saturation[phase] // + MKleinsteZahl; // // slr = residual_saturation[0]; @@ -2617,8 +2617,8 @@ double CMediumProperties::PermeabilitySaturationFunction( // se = (sl - slr1) / (1 - slr); // // // kr = pow(1.0 - se, 1.0 / 3.0) * pow(1.0 - pow(se, 1.0 / - //m), 2.0 * m); if (kr < minimum_relative_permeability) kr = - //minimum_relative_permeability; + // m), 2.0 * m); if (kr < minimum_relative_permeability) + // kr = minimum_relative_permeability; break; // case 6: // 2-phase BROOKS/COREY --> WETTING @@ -2663,10 +2663,11 @@ double CMediumProperties::PermeabilitySaturationFunction( // sl = residual_saturation[phase]+ MKleinsteZahl; // // // se = (sl - residual_saturation[1]) / (1. - - //residual_saturation[0] - residual_saturation[1]); kr = pow(1.0 - - //se, 2) * (1.0 - pow(se, (2.0 + saturation_exponent[phase]) / - //saturation_exponent[phase])); kr = - //MRange(minimum_relative_permeability,kr,1.); + // residual_saturation[0] - residual_saturation[1]); kr = + // pow(1.0 + // - se, 2) * (1.0 - pow(se, (2.0 + saturation_exponent[phase]) + // / saturation_exponent[phase])); kr = + // MRange(minimum_relative_permeability,kr,1.); break; // @@ -2839,7 +2840,7 @@ double* CMediumProperties::HeatConductivityTensor(int number) for (size_t ii = 0; ii < pcs_vector.size(); ii++) { // if (pcs_vector[ii]->pcs_type_name.find("FLOW") != string::npos) - //TF + // TF if (isFlowProcess(pcs_vector[ii]->getProcessType())) FLOW = true; } @@ -4142,7 +4143,7 @@ double CMediumProperties::Porosity(long number, double theta) for (size_t i = 0; i < pcs_vector.size(); i++) // if ((pcs_vector[i]->pcs_type_name.find("FLOW") != - //string::npos)) { + // string::npos)) { if (isFlowProcess(pcs_vector[i]->getProcessType())) { idx = pcs_vector[i]->GetElementValueIndex("POROSITY"); @@ -4167,7 +4168,7 @@ double CMediumProperties::Porosity(long number, double theta) { pcs_temp = pcs_vector[i]; // if ( - //pcs_temp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 + // pcs_temp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 //|| // pcs_temp->pcs_type_name.compare("LIQUID_FLOW") // == 0 ) { @@ -4324,7 +4325,8 @@ double CMediumProperties::Porosity(CElement* assem) for (size_t i = 0; i < pcs_vector.size(); i++) { pcs_temp = pcs_vector[i]; - // if ((pcs_temp->pcs_type_name.compare("GROUNDWATER_FLOW") + // if + //((pcs_temp->pcs_type_name.compare("GROUNDWATER_FLOW") //== 0) || (pcs_temp->pcs_type_name.compare("RICHARDS_FLOW") == // 0)||(pcs_temp->pcs_type_name.compare("MULTI_PHASE_FLOW") == // 0)) @@ -4687,7 +4689,7 @@ double* CMediumProperties::PermeabilityTensor(long index) { pcs_tmp = pcs_vector[i]; // if ( - //m_pcs_tmp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 + // m_pcs_tmp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 //|| // m_pcs_tmp->pcs_type_name.compare("LIQUID_FLOW") // == 0) TF @@ -4738,9 +4740,9 @@ double* CMediumProperties::PermeabilityTensor(long index) { pcs_tmp = pcs_vector[i]; // if ( - //m_pcs_tmp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 - //|| m_pcs_tmp->pcs_type_name.compare("LIQUID_FLOW") == 0) - //TF + // m_pcs_tmp->pcs_type_name.compare("GROUNDWATER_FLOW") == 0 + //|| m_pcs_tmp->pcs_type_name.compare("LIQUID_FLOW") == 0) + // TF if (pcs_tmp->getProcessType() == FiniteElement::GROUNDWATER_FLOW || pcs_tmp->getProcessType() == FiniteElement::LIQUID_FLOW) @@ -7446,18 +7448,18 @@ double CMediumProperties::NonlinearFlowFunction(long index, int gp, double detjac, *invjac, invjac2d[4]; double grad_omega[8]; double grad_h_min = MKleinsteZahl; - double xgt[3],ygt[3],zgt[3]; //CMCD Global x,y,z coordinates of - traingular element - double xt[3],yt[3]; //CMCD Local x,y coordinates of traingular - element double pt_element_node[4], ht_element_node[4], + double xgt[3],ygt[3],zgt[3]; //CMCD Global x,y,z coordinates + of traingular element + double xt[3],yt[3]; //CMCD Local x,y coordinates + of traingular element double pt_element_node[4], ht_element_node[4], zt_element_node[4]; //CMCD Pressure, depth head traingular element double dN_dx[3],dN_dy[3], area; //CMCD Shape function derivates for triangles double isotropicgradient,porosity, Re, Lambda, apperture, hyd_radius, perm; double linear_q,turbulent_q,linear_grad, turbulent_grad, flow_rate, temp; double dircos[6]; //CMCD 04 2004 - gp[0]= gp[1] = gp[2] = 0.0; //Gaus points, triangular interpretation - value not relevant + gp[0]= gp[1] = gp[2] = 0.0; //Gaus points, triangular + interpretation value not relevant element_nodes = ElGetElementNodes(index); g = gravity_constant; @@ -7624,11 +7626,11 @@ double CMediumProperties::NonlinearFlowFunction(long index, int gp, 0 Curve 1 Constant 2 Funktion der effektiven Spannung und des Drucks in Elementmitte - 3 Funktion der effektiven Spannung und des Drucks in Elementmitte ueber -Kurve 4 Storage as function of effective stress read from curve 5 Storage as -normal stress in element in stress field defined by KTB stress field. 6 -Storage as normal stress in element in stress field defined by KTB stress field, -function to increase storage with distance from borehole. + 3 Funktion der effektiven Spannung und des Drucks in Elementmitte +ueber Kurve 4 Storage as function of effective stress read from curve 5 +Storage as normal stress in element in stress field defined by KTB stress field. +6 Storage as normal stress in element in stress field defined by KTB stress +field, function to increase storage with distance from borehole. **************************************************************************/ double CMediumProperties::StorageFunction(long index, double* gp, double theta) { diff --git a/FEM/rf_msp_new.cpp b/FEM/rf_msp_new.cpp index 5e35931b0..77335148f 100644 --- a/FEM/rf_msp_new.cpp +++ b/FEM/rf_msp_new.cpp @@ -1618,8 +1618,8 @@ double CSolidProperties::Heat_Conductivity(double reference) { // val = k_max-k_min/(1+10.0*exp(reference-S0)); const double* k_T = data_Conductivity->getEntryArray(); - // val = k_T[0] - (k_T[0]-k_T[1]) / (1 + exp(10.0 * (reference - - //k_T[2]))); + // val = k_T[0] - (k_T[0]-k_T[1]) / (1 + exp(10.0 * (reference + //- k_T[2]))); val = k_T[0] + k_T[1] * (reference - k_T[2]); } break; @@ -1903,7 +1903,7 @@ void CSolidProperties::LocalNewtonBurgers( } // if (counter == counter_max) // std::cout << "WARNING: Maximum iteration number needed in - //LocalNewtonBurgers. Convergence not guaranteed." + // LocalNewtonBurgers. Convergence not guaranteed." // << std::endl; local_res = res_loc.norm(); @@ -2095,7 +2095,7 @@ void CSolidProperties::LocalNewtonMinkley( dsigdE); // Full pivoting needed for global convergence // if (counter == counter_max) // std::cout << "WARNING: Maximum iteration number needed in - //LocalNewtonMinkley. Convergence not + // LocalNewtonMinkley. Convergence not // guaranteed." // << std::endl; // << std::endl;local_res = res_loc.norm(); @@ -3697,8 +3697,8 @@ int CSolidProperties::StressIntegrationMOHR_Aniso( *TmpDe = *Dep; - // ConstitutiveMatrix->resize(Size,Size); //in head already defined, and is - // used for later as global variable + // ConstitutiveMatrix->resize(Size,Size); //in head already defined, + // and is used for later as global variable *ConstitutiveMatrix = (0.); @@ -3972,9 +3972,10 @@ int CSolidProperties::StressIntegrationMOHR_Aniso( (i - 1)); // dcsn/deta for (i = 0; i < Size; i++) dtens_dsig[i] = - dTens_daPara * dAniso_dsig_tens[i]; // dcsn/dsig=dcsn/deta - // * deta/dsig - } // end if plasticity bedding + dTens_daPara * + dAniso_dsig_tens[i]; // dcsn/dsig=dcsn/deta + // * deta/dsig + } // end if plasticity bedding if (first_step) { for (i = 0; i < Size; i++) @@ -4331,9 +4332,10 @@ int CSolidProperties::StressIntegrationMOHR_Aniso( pow(AnisoParaComp, (i - 1)); // dcsn/deta for (i = 0; i < Size; i++) dcsn_dsig[i] = - dComp_daPara * dAniso_dsig_comp[i]; // dcsn/dsig=dcsn/deta - // * deta/dsig - } // end if plasticity bedding + dComp_daPara * + dAniso_dsig_comp[i]; // dcsn/dsig=dcsn/deta + // * deta/dsig + } // end if plasticity bedding // counter++; if (first_step) { diff --git a/FEM/rf_num_new.cpp b/FEM/rf_num_new.cpp index f6429ea07..232dda4e1 100644 --- a/FEM/rf_num_new.cpp +++ b/FEM/rf_num_new.cpp @@ -762,9 +762,9 @@ ios::pos_type CNumerics::Read(ifstream* num_file) { line.str(GetLineFromFile1(num_file)); line >> newton_damping_tolerance; // if NR error decreases by less - // than this factor, the next step - // will be dampened - line >> newton_damping_factor; // dampened by this factor + // than this factor, the next + // step will be dampened + line >> newton_damping_factor; // dampened by this factor line.clear(); std::cout << "NR step will be damped by " << newton_damping_factor << " if relative residual or relative unknown increment " diff --git a/FEM/rf_num_new.h b/FEM/rf_num_new.h index c32147f13..8c4e78bcf 100644 --- a/FEM/rf_num_new.h +++ b/FEM/rf_num_new.h @@ -212,15 +212,18 @@ struct LINEAR_SOLVER long num_of_unknowns_ls; // OK UNKNOWN_LINEAR_SOLVER **unknown_ls; int unknown_vector_dimension; /* nodal degree of freedom */ - int* unknown_vector_indeces; /* pointer of field - unknown_vector_index[unknown_vector_dimension] - */ - long* unknown_node_numbers; /* pointer of field - unknown_node_numbers[unknown_vector_dimension] - */ - int* unknown_update_methods; /* pointer of field - unknown_update_methods[unknown_vector_dimension] - */ + int* + unknown_vector_indeces; /* pointer of field + unknown_vector_index[unknown_vector_dimension] + */ + long* + unknown_node_numbers; /* pointer of field + unknown_node_numbers[unknown_vector_dimension] + */ + int* + unknown_update_methods; /* pointer of field + unknown_update_methods[unknown_vector_dimension] + */ }; #ifdef USE_MPI // WW diff --git a/FEM/rf_out_new.cpp b/FEM/rf_out_new.cpp index e1c38704e..a85fc209d 100644 --- a/FEM/rf_out_new.cpp +++ b/FEM/rf_out_new.cpp @@ -185,7 +185,8 @@ bool OUTRead(const std::string& file_base_name, // char number_char[3]; //OK4709 // sprintf(number_char, "%i", (int) out_vector.size() - 1); - ////OK4709 out->ID = number_char; //OK4709 out->setID + ////OK4709 out->ID = number_char; //OK4709 + /// out->setID //(out_vector.size() - 1); out_file.seekg(position, ios::beg); @@ -333,10 +334,11 @@ void OUTData(double time_current, int time_step_number, bool force_output) || m_out->dat_type_name.compare("CSV") == 0) { // m_out->matlab_delim = " "; - // if (m_out->dat_type_name.compare("MATLAB") == 0) // JT, just - //for commenting header for matlab if + // if (m_out->dat_type_name.compare("MATLAB") == 0) // JT, + // just for commenting header for matlab if //(m_out->dat_type_name.compare("GNUPLOT") == 0) // JOD, just for - //commenting header for gnupl m_out->matlab_delim = "%"; + // commenting header for gnupl m_out->matlab_delim = + // "%"; switch (m_out->getGeoType()) { @@ -456,7 +458,8 @@ void OUTData(double time_current, int time_step_number, bool force_output) cout << "Data output: Surface profile" << "\n"; //.............................................................. - // if (m_out->_dis_type_name.compare("AVERAGE") == 0) + // if (m_out->_dis_type_name.compare("AVERAGE") + //== 0) //{ if (m_out->getProcessDistributionType() == FiniteElement::AVERAGE) @@ -512,9 +515,12 @@ void OUTData(double time_current, int time_step_number, bool force_output) // OutputBySteps = false; // } else { // for (j = 0; j < no_times; j++) { - // if ((time_current > m_out->time_vector[j]) || - //fabs( time_current - m_out->time_vector[j]) - // + // m_out->time_vector[j]) + //|| fabs( time_current - + // m_out->time_vector[j]) + // NODWriteLAYDataTEC(j); // m_out->time_vector.erase(m_out->time_vector.begin() // + j); diff --git a/FEM/rf_pcs.cpp b/FEM/rf_pcs.cpp index 0063cfa0c..6d8b985d9 100644 --- a/FEM/rf_pcs.cpp +++ b/FEM/rf_pcs.cpp @@ -21,7 +21,7 @@ matrix solver **************************************************************************/ #include "rf_pcs.h" -#include // std::numeric_limits +#include // std::numeric_limits /*--------------------- MPI Parallel -------------------*/ #if defined(USE_MPI) || defined(USE_MPI_PARPROC) || defined(USE_MPI_REGSOIL) @@ -671,7 +671,7 @@ void CRFProcess::Create() std::cout << "->Create NUM" << "\n"; // if (pcs_type_name.compare("RANDOM_WALK")) { // PCH RWPT does not need - //this. + // this. if (this->getProcessType() != FiniteElement::RANDOM_WALK) // PCH RWPT does not need this. { @@ -799,7 +799,7 @@ void CRFProcess::Create() m_pcs = pcs_vector[i]; if (m_pcs && m_pcs->eqs) // if (m_pcs->_pcs_type_name.find("DEFORMATION") == - //string::npos) + // string::npos) if (!isDeformationProcess(m_pcs->getProcessType())) break; } @@ -1700,7 +1700,7 @@ void PCSDestroyAllProcesses(void) } dom_vector.clear(); #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW //---------------------------------------------------------------------- // ELE for (i = 0; i < (long)ele_val_vector.size(); i++) @@ -1789,7 +1789,7 @@ bool PCSRead(std::string file_base_name) // RelocateDeformationProcess(m_pcs); // if (m_pcs->_pcs_type_name.find("DEFORMATION") != - //string::npos) { // TF + // string::npos) { // TF if (isDeformationProcess(m_pcs->getProcessType())) { pcs_vector.push_back(m_pcs->CopyPCStoDM_PCS()); @@ -4623,11 +4623,11 @@ bool CRFProcess::isPointInExcavatedDomain(double const* point, if ((element_center_x_in_excavation_direction > min_excavation_range || (std::fabs(element_center_x_in_excavation_direction - min_excavation_range) < - std::numeric_limits::epsilon())) &&( - (element_center_x_in_excavation_direction < max_excavation_range) || - (std::fabs(element_center_x_in_excavation_direction - - max_excavation_range) < - std::numeric_limits::epsilon()))) + std::numeric_limits::epsilon())) && + ((element_center_x_in_excavation_direction < max_excavation_range) || + (std::fabs(element_center_x_in_excavation_direction - + max_excavation_range) < + std::numeric_limits::epsilon()))) { return true; } @@ -4930,7 +4930,7 @@ double CRFProcess::Execute() #if defined(USE_PETSC) // std::string eqs_output_file = FileName + - //number2str(aktueller_zeitschritt); + // number2str(aktueller_zeitschritt); // eqs_new->EQSV_Viewer(eqs_output_file); eqs_new->Solver(); eqs_new->MappingSolution(); @@ -5726,7 +5726,7 @@ void CRFProcess::GlobalAssembly() } else #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW { // STD // YDTEST. Changed to DOF 15.02.2007 WW for (size_t ii = 0; ii < continuum_vector.size(); ii++) @@ -5911,10 +5911,10 @@ void CRFProcess::CalIntegrationPointValue() // cal_integration_point_value = true; // Currently, extropolation only valid for liquid and Richards flow. // if (_pcs_type_name.find("LIQUID") != string::npos || - //_pcs_type_name.find( "RICHARD") != string::npos || _pcs_type_name.find( - // "MULTI_PHASE_FLOW") != string::npos || _pcs_type_name.find( - // "GROUNDWATER_FLOW") != string::npos || _pcs_type_name.find( - // "TWO_PHASE_FLOW") != string::npos + //_pcs_type_name.find( "RICHARD") != string::npos || + //_pcs_type_name.find( "MULTI_PHASE_FLOW") != string::npos || + //_pcs_type_name.find( "GROUNDWATER_FLOW") != string::npos || + //_pcs_type_name.find( "TWO_PHASE_FLOW") != string::npos // || _pcs_type_name.find("AIR_FLOW") != string::npos // || _pcs_type_name.find("PS_GLOBAL") != string::npos) //WW/CB @@ -6336,7 +6336,7 @@ void CRFProcess::DDCAssembleGlobalMatrix() #endif } #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW /************************************************************************* ROCKFLOW - Function: @@ -6484,7 +6484,7 @@ void CRFProcess::SetSTWaterGemSubDomain(int myrank) rank_stgem_node_value_in_dom.push_back( (long)stgem_node_value_in_dom.size()); // cout << "dom " << k << " rank_stgem_node_value_in_dom " << (long) - //rank_stgem_node_value_in_dom[0] << "\n"; + // rank_stgem_node_value_in_dom[0] << "\n"; // } @@ -6498,7 +6498,7 @@ void CRFProcess::SetSTWaterGemSubDomain(int myrank) } #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW /************************************************************************** FEMLib-Method: CRFProcess::IncorporateBoundaryConditions Task: set PCS boundary conditions @@ -6648,7 +6648,8 @@ void CRFProcess::IncorporateBoundaryConditions(const int rank) excavated = true; #ifndef USE_PETSC for (unsigned int j = 0; - j < node->getConnectedElementIDs().size(); j++) + j < node->getConnectedElementIDs().size(); + j++) { CElem* elem = m_msh->ele_vector[node->getConnectedElementIDs()[j]]; @@ -8316,7 +8317,8 @@ void CRFProcess::IncorporateSourceTerms(const int rank) continue_bool = checkConstrainedST(st_vector, *m_st, *cnodev); for (std::size_t temp_i(0); - temp_i < m_st->getNumberOfConstrainedSTs(); temp_i++) + temp_i < m_st->getNumberOfConstrainedSTs(); + temp_i++) { if (st_vector[cnodev->getSTVectorGroup()] ->isCompleteConstrainST(temp_i) && @@ -8367,7 +8369,8 @@ void CRFProcess::IncorporateSourceTerms(const int rank) EleType == MshElemType::QUAD) { for (size_t i_face = 0; - i_face < m_msh->face_vector.size(); i_face++) + i_face < m_msh->face_vector.size(); + i_face++) { face = m_msh->face_vector[i_face]; if ((size_t)m_st->element_st_vector[i_st] == @@ -8503,7 +8506,8 @@ void CRFProcess::IncorporateSourceTerms(const int rank) // cout << "rank " << rank ; gindex = stgem_node_value_in_dom[i]; // contains indexes to // water-st_vec - // cout << " gindex " << gindex << " i " << i << endl + // cout << " gindex " << gindex << " i " << i << + // endl //; // contains index to node glocalindex = stgem_local_index_in_dom[i]; @@ -8752,7 +8756,7 @@ void CRFProcess::CalcSecondaryVariables(bool initial) // break; // case 'R': // Richards flow // if(_pcs_type_name[1] == 'I') // PCH To make a distinction with RANDOM - //WALK. + // WALK. // CalcSecondaryVariablesUnsaturatedFlow(initial); // WW // break; // case 'D': @@ -8829,9 +8833,9 @@ char* GetCompNamehelp(char* inname) if (m_pcs == NULL) break; // outname = - //GetTracerCompName(phase,m_pcs->GetProcessComponentNumber()-1); + // GetTracerCompName(phase,m_pcs->GetProcessComponentNumber()-1); // outname = - //cp_vec[m_pcs->GetProcessComponentNumber()-1]->compname; + // cp_vec[m_pcs->GetProcessComponentNumber()-1]->compname; outname = (char*)cp_vec[m_pcs->GetProcessComponentNumber() - 1] ->compname.data(); return outname; @@ -8861,7 +8865,7 @@ string GetPFNamebyCPName(string inname) { m_pcs = pcs_vector[i]; // if(m_pcs->_pcs_type_name.compare("MASS_TRANSPORT") == 0){ // if - //this is mass transport // TF + // this is mass transport // TF if (m_pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { j = m_pcs->GetProcessComponentNumber(); @@ -8884,7 +8888,7 @@ string GetPFNamebyCPName(string inname) // if(m_pcs == NULL) break; // outname = cp_vec[m_pcs->GetProcessComponentNumber()-1]->compname; // outname = (char *) - //cp_vec[m_pcs->GetProcessComponentNumber()-1]->compname.data(); + // cp_vec[m_pcs->GetProcessComponentNumber()-1]->compname.data(); // if(outname.compare(inname) == 0) // return outname; // }; @@ -10433,7 +10437,7 @@ void CRFProcess::CopyTimestepNODValues(bool forward) SetNodeValue(l, nidx0, GetNodeValue(l, nidx1)); // WW // if (_pcs_type_name.find("RICHARDS") != string::npos || type == - //1212) { //Multiphase. WW + // 1212) { //Multiphase. WW // Multiphase. WW if (this->getProcessType() == FiniteElement::RICHARDS_FLOW || type == 1212 || type == 42) @@ -10556,8 +10560,8 @@ CRFProcess* PCSGet(const std::string& pcs_type_name, FiniteElement::convertProcessType(pcs_type_name)); size_t no_processes(pcs_vector.size()); for (size_t i = 0; i < no_processes; i++) - // if (pcs_vector[i]->pcs_type_name.compare(pcs_type_name) == 0) { // - //TF + // if (pcs_vector[i]->pcs_type_name.compare(pcs_type_name) == 0) { + //// TF if (pcs_vector[i]->getProcessType() == pcs_type) if (comp_name.compare( pcs_vector[i]->pcs_primary_function_name[0]) == 0) @@ -11548,7 +11552,7 @@ void CRFProcess::SetCPL() // if (_pcs_type_name.compare("RICHARDS_FLOW") == 0 // && m_msh_cpl->pcs_name.compare("OVERLAND_FLOW") == 0) { // - //ToDo + // ToDo if (this->getProcessType() == FiniteElement::RICHARDS_FLOW // ToDo && m_msh_cpl->pcs_name.compare("OVERLAND_FLOW") == 0) @@ -11616,7 +11620,7 @@ void CRFProcess::SetCPL() // if (_pcs_type_name.compare("GROUNDWATER_FLOW") == 0 // && m_msh_cpl->pcs_name.compare("OVERLAND_FLOW") == 0) { // - //ToDo + // ToDo if (this->getProcessType() == FiniteElement::GROUNDWATER_FLOW // ToDo && m_msh_cpl->pcs_name.compare("OVERLAND_FLOW") == 0) @@ -11793,7 +11797,7 @@ void CRFProcess::CalcELEFluxes(const GEOLIB::Polyline* const ply, // for (size_t k = 0; k < m_ele->GetNodesNumber(false); k++) // { // temp_v[j] += m_pcs_flow->GetNodeValue(element_nodes[k], - //variable_index[j]); + // variable_index[j]); // } // temp_v[j] /= m_ele->GetNodesNumber(false); // v[j] = temp_v[j]; @@ -11902,7 +11906,7 @@ void CRFProcess::CalcELEFluxes(const GEOLIB::Polyline* const ply, // for (size_t k = 0; k < m_ele->GetNodesNumber(false); k++) // { // temp_v[j] += m_pcs_flow->GetNodeValue(element_nodes[k], - //variable_index[j]); + // variable_index[j]); // } // temp_v[j] /= m_ele->GetNodesNumber(false); // v_2[j] = temp_v[j]; @@ -11968,7 +11972,7 @@ void CRFProcess::CalcELEMassFluxes(const GEOLIB::Polyline* const ply, double C_ele = 0.0; // C1 = 0, C2 = 0; // TF 2012-08 // removed warning // unused variable // int number_nodes_at_edge = 0; // TF 2012-08 // removed warning unused - //variable + // variable double J_adv[3], J_disp[3], J_diff[3], v[3], temp_j, j_diff[3], j_disp[3], norm_v; double J_adv_temp, J_disp_temp, J_diff_temp, J_temp; @@ -12290,7 +12294,8 @@ void CRFProcess::CalcELEMassFluxes(const GEOLIB::Polyline* const ply, // polyline was already used, BG 11/2011 Use_Element = true; for (size_t j = 0; - j < static_cast(m_ele->GetNodesNumber(false)); j++) + j < static_cast(m_ele->GetNodesNumber(false)); + j++) { m_node = m_ele->GetNode(j); // check if edge was already used @@ -12377,7 +12382,7 @@ void CRFProcess::CalcELEMassFluxes(const GEOLIB::Polyline* const ply, // mass check // totalmassflux = 0.0; // 2012-08 TF not used // totalmass = C_ele * porosity * m_ele->GetVolume(); // 2012-08 TF - //not used + // not used // 2012-08 TF, since totalmassflux is not used we can comment out the // following two lines @@ -13869,7 +13874,7 @@ void CRFProcess::PI_TimeStepSize() fac = max(factor2, min(factor1, pow(err, 0.25) / sfactor)); hnew = Tim->time_step_length / fac; //*Tim->reject_factor; // BG, use the reject - //factor to lower timestep after rejection BG + // factor to lower timestep after rejection BG // determine if the error is small enough if (err <= 1.0e0 && accepted) // step is accept (unless Newton diverged!) @@ -14882,8 +14887,8 @@ void CRFProcess::CalculateFluidDensitiesAndViscositiesAtNodes(CRFProcess* m_pcs) Molweight_CO2 = 44.009; // [g/mol] Molweight_H2O = 18.0148; // [g/mol] - Molweight_NaCl = 58.443; // [g/mol] //ToDo: provide constants - // once in the whole project + Molweight_NaCl = 58.443; // [g/mol] //ToDo: provide + // constants once in the whole project // WW saturation_gas_min = 0.00001; // WW saturation_liquid_min = 0.00001; @@ -15203,8 +15208,8 @@ void CRFProcess::Phase_Transition_CO2(CRFProcess* m_pcs, int Step) Molweight_CO2 = 44.009; // [g/mol] Molweight_H2O = 18.0148; // [g/mol] - Molweight_NaCl = 58.443; // [g/mol] //ToDo: provide constants - // once in the whole project + Molweight_NaCl = 58.443; // [g/mol] //ToDo: provide + // constants once in the whole project saturation_gas_min = 0.00001; saturation_liquid_min = 0.00001; diff --git a/FEM/rf_pcs.h b/FEM/rf_pcs.h index ad7fd5425..ebc0b2f13 100644 --- a/FEM/rf_pcs.h +++ b/FEM/rf_pcs.h @@ -382,7 +382,7 @@ class CRFProcess : public ProcessInfo std::vector bc_local_index_in_dom; // WW for domain decomposition std::vector rank_bc_node_value_in_dom; // WW #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW std::vector bc_transient_index; // WW/CB std::vector st_transient_index; // WW/CB...BG void UpdateTransientBC(); // WW/CB @@ -401,7 +401,7 @@ class CRFProcess : public ProcessInfo std::vector st_local_index_in_dom; // WW for domain decomposition std::vector rank_st_node_value_in_dom; // WW #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW void RecordNodeVSize(const int Size) // WW { orig_size = Size; @@ -745,7 +745,7 @@ class CRFProcess : public ProcessInfo #if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. WW void SetBoundaryConditionSubDomain(); // WW #endif //#if !defined(USE_PETSC) // && !defined(other parallel libs)//03.3012. - //WW + // WW // WW void CheckBCGroup(); //OK #if !defined(USE_PETSC) // && !defined(other parallel libs)//03~04.3012. WW #ifdef NEW_EQS // WW diff --git a/FEM/rf_random_walk.cpp b/FEM/rf_random_walk.cpp index 6fa971665..92c3a3a94 100644 --- a/FEM/rf_random_walk.cpp +++ b/FEM/rf_random_walk.cpp @@ -44,7 +44,7 @@ const std::string INDEX_STR = " "; y = t; \ } // WW data type is change to double //#define CountParticleNumber //YS: to count the -//number of particles leave the domain +// number of particles leave the domain /************************************************************************** Class: RandomWalk @@ -230,12 +230,13 @@ void RandomWalk::InterpolateVelocity(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) TF m_msh = - //FEMGet("RICHARDS_FLOW"); else if( m_pcs->getProcessType () == LIQUID_FLOW) - // m_msh = FEMGet("LIQUID_FLOW"); - // else if( m_pcs->getProcessType () == GROUNDWATER_FLOW) - // m_msh = FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) TF + // m_msh + // = FEMGet("RICHARDS_FLOW"); else if( m_pcs->getProcessType () == + // LIQUID_FLOW) m_msh = FEMGet("LIQUID_FLOW"); else if( + // m_pcs->getProcessType + //() == GROUNDWATER_FLOW) m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Mount the element fromthe first particle from particles initially @@ -466,13 +467,13 @@ void RandomWalk::TracePathlineInThisElement(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Mount the element fromthe first particle from particles initially @@ -692,13 +693,13 @@ void RandomWalk::InterpolateVelocityOfTheParticleByInverseDistance(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* m_ele = m_msh->ele_vector[A->elementIndex]; @@ -878,13 +879,13 @@ void RandomWalk::InterpolateVelocityOfTheParticleByBilinear(int option, // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Let's allocate some memory for miniFEM @@ -1173,7 +1174,7 @@ void RandomWalk::InterpolateVelocityOfTheParticleByBilinear(int option, } // else // ; // This shouldn't happen here. There are only tri or quad - //ele's in 2D + // ele's in 2D } else if (IsOnTheEdge != 0) // The particle is on the edge. { @@ -1516,13 +1517,13 @@ double* RandomWalk::InterpolateLocationOfTheParticleByBilinear(Particle* A, // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } int eleIndex = IndexOfTheElementThatThisParticleBelong(0, A); @@ -1895,7 +1896,7 @@ int RandomWalk::SolveForDerivativeOfVelocity(Particle* A) // Check if the function succeeded. if (status == -1) // printf("Solving two intersections parallel to x axis - //failed\n"); + // failed\n"); return -1; // Failed // Solve for the velocity for two intersections Particle XR, XL; @@ -1942,7 +1943,7 @@ int RandomWalk::SolveForDerivativeOfVelocity(Particle* A) status = SolveForTwoIntersectionsInTheElement(A, y1, y2, 1); if (status == -1) // printf("Solving two intersections parallel to y axis - //failed\n"); + // failed\n"); return -1; // Failed // Solve for the velocity for two intersections @@ -2738,7 +2739,7 @@ void RandomWalk::AdvanceToNextTimeStep(double dt, double ctime) Y.elementIndex = IndexOfTheElementThatThisParticleBelong(1, &Y); // Y.elementIndex = - //GetTheElementOfTheParticle(&(X[i].Now), &Y); + // GetTheElementOfTheParticle(&(X[i].Now), &Y); else Y.elementIndex = IndexOfTheElementThatThisParticleBelong(0, &Y); @@ -2834,8 +2835,8 @@ void RandomWalk::AdvanceToNextTimeStep(double dt, double ctime) else if( ChanceOfMobile < ( (1.0-exp(-Koff[0]*dt))*Kon[0]/Koff[0] + (1.0-exp(-Koff[1]*dt))*Kon[1]/Koff[1]) ) { - if(numOfComps > 2) // If the number of components is bigger than - 2, X[i].Now.identity = 2; // Make another kind of immobile + if(numOfComps > 2) // If the number of components is bigger + than 2, X[i].Now.identity = 2; // Make another kind of immobile else ; } @@ -2966,7 +2967,8 @@ void RandomWalk::RandomWalkOutput(double dbl_time, int current_time_step) "CONTROL_PLANE_NORMAL_X") == 0) { for (size_t k = 0; - k < out->_control_plane_x_normal_vector.size(); k++) + k < out->_control_plane_x_normal_vector.size(); + k++) { DATWriteParticleControlPlaneFile( current_time_step, "CONTROL_PLANE_NORMAL_X", @@ -2977,7 +2979,8 @@ void RandomWalk::RandomWalkOutput(double dbl_time, int current_time_step) "CONTROL_PLANE_NORMAL_Y") == 0) { for (size_t k = 0; - k < out->_control_plane_y_normal_vector.size(); k++) + k < out->_control_plane_y_normal_vector.size(); + k++) { DATWriteParticleControlPlaneFile( current_time_step, "CONTROL_PLANE_NORMAL_Y", @@ -2988,7 +2991,8 @@ void RandomWalk::RandomWalkOutput(double dbl_time, int current_time_step) "CONTROL_PLANE_NORMAL_Z") == 0) { for (size_t k = 0; - k < out->_control_plane_z_normal_vector.size(); k++) + k < out->_control_plane_z_normal_vector.size(); + k++) { DATWriteParticleControlPlaneFile( current_time_step, "CONTROL_PLANE_NORMAL_Z", @@ -3109,13 +3113,13 @@ void RandomWalk::ConcPTFile(const char* file_name) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } sprintf(pct_file_name, "%s.conc", file_name); @@ -3339,13 +3343,13 @@ void RandomWalk::SolveDispersionCoefficient(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* m_ele = m_msh->ele_vector[A->elementIndex]; int group = m_ele->GetPatchIndex(); @@ -3768,7 +3772,8 @@ int RandomWalk::SearchElementFromNeighbor(Particle* A) // Try one more time, the neighbor's neighbor's // neighbor's neighbor for (size_t l = 0; - l < theNNNeighbor->GetFacesNumber(); ++l) + l < theNNNeighbor->GetFacesNumber(); + ++l) { CElem* theNNNNeighbor = theNNNeighbor->GetNeighbor(l); @@ -4048,13 +4053,13 @@ int RandomWalk::SolveForNextPosition(Particle* A, Particle* B) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* theElement = m_msh->ele_vector[B->elementIndex]; // m_msh->FillTransformMatrix(); @@ -4466,13 +4471,13 @@ void RandomWalk::GetDisplacement(Particle* B, double* Z, double* V, double* dD, // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* theElement = m_msh->ele_vector[B->elementIndex]; int ele_dim = theElement->GetDimension(); @@ -4652,13 +4657,13 @@ int RandomWalk::GetTheElementOfTheParticle(Particle* Pold, Particle* Pnew) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } #ifdef ALLOW_PARTICLES_GO_OUTSIDE @@ -4772,13 +4777,13 @@ int RandomWalk::GetTheElementOfTheParticleFromNeighbor(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } #ifdef ALLOW_PARTICLES_GO_OUTSIDE @@ -4826,7 +4831,8 @@ int RandomWalk::GetTheElementOfTheParticleFromNeighbor(Particle* A) // Third, search the neighbor's neighbor's neighbor for (size_t k = 0; - k < theNeighborsNeighbor->GetFacesNumber(); ++k) + k < theNeighborsNeighbor->GetFacesNumber(); + ++k) { MeshLib::CElem* theNeighborsNeighborsNeighbor = theNeighborsNeighbor->GetNeighbor(k); @@ -4897,13 +4903,13 @@ int RandomWalk::IsTheParticleInThisElement(Particle* A) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* theElement = m_msh->ele_vector[A->elementIndex]; @@ -5266,13 +5272,13 @@ void RandomWalk::IsoparametricMappingQuadfromPtoR(int index, double* R) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Mount the element fromthe first particle from particles initially MeshLib::CElem* theEle = m_msh->ele_vector[index]; @@ -5465,13 +5471,13 @@ void RandomWalk::IsoparametricMappingQuadfromRtoP(int index, double* P) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Mount the element fromthe first particle from particles initially MeshLib::CElem* theEle = m_msh->ele_vector[index]; @@ -5530,13 +5536,13 @@ void RandomWalk::DoJointEffectOfElementInitially(void) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } // Looping all over the particles to have a choice which plane to go. @@ -5631,13 +5637,13 @@ void RandomWalk::ToTheXYPlane(int idx, double* X) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* E = m_msh->ele_vector[idx]; @@ -5715,13 +5721,13 @@ void RandomWalk::ToTheRealPlane(int idx, double* X) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } MeshLib::CElem* E = m_msh->ele_vector[idx]; @@ -5769,13 +5775,13 @@ void RandomWalk::SolveAnglesOfTheElment(MeshLib::CElem* E) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } double tolerance = 1e-20, Enorm[3]; @@ -5936,13 +5942,13 @@ int RandomWalk::ReadInVelocityFieldOnNodes(string file_base_name) // m_pcs = pcs_vector[i]; // // // Select the mesh whose process name has the mesh for - //Fluid_Momentum if( - //m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = - //FEMGet("RICHARDS_FLOW"); else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = - //FEMGet("LIQUID_FLOW"); else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) m_msh = - //FEMGet("GROUNDWATER_FLOW"); + // Fluid_Momentum if( + // m_pcs->pcs_type_name.find("RICHARDS_FLOW")!=string::npos) m_msh = + // FEMGet("RICHARDS_FLOW"); else if( + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos) m_msh = + // FEMGet("LIQUID_FLOW"); else if( + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos) + // m_msh = FEMGet("GROUNDWATER_FLOW"); // } CRFProcess* m_pcs = PCSGet("FLUID_MOMENTUM"); @@ -6009,14 +6015,14 @@ void RandomWalk::buildFDMIndex(void) break; } // else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ else if (m_pcs->getProcessType() == FiniteElement::LIQUID_FLOW) { m_msh = FEMGet("LIQUID_FLOW"); break; } // else if( - //m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos){ + // m_pcs->pcs_type_name.find("GROUNDWATER_FLOW")!=string::npos){ else if (m_pcs->getProcessType() == FiniteElement::GROUNDWATER_FLOW) { m_msh = FEMGet("GROUNDWATER_FLOW"); @@ -6350,7 +6356,7 @@ void DATWriteParticleFile(int current_time_step) break; } // else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ else if (pcs_type == FiniteElement::LIQUID_FLOW) { m_msh = FEMGet("LIQUID_FLOW"); @@ -6647,7 +6653,7 @@ void DATWriteParticleVTPFile(int current_time_step) break; } // else if( - //m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ + // m_pcs->pcs_type_name.find("LIQUID_FLOW")!=string::npos){ else if (pcs_type == FiniteElement::LIQUID_FLOW) { m_msh = FEMGet("LIQUID_FLOW"); diff --git a/FEM/rf_react.cpp b/FEM/rf_react.cpp index d23c95607..aa7966c59 100644 --- a/FEM/rf_react.cpp +++ b/FEM/rf_react.cpp @@ -919,11 +919,11 @@ int REACT::WriteInputPQCString( for (i = ii; i < ii + rcml_number_of_gas_species; i++) { speciesname = this->pqc_names[i]; - // cout << "Testing index vectors: " << speciesname << ", - //With vectors: " << pqc_names[i] << ", + // cout << "Testing index vectors: " << speciesname << + //", With vectors: " << pqc_names[i] << ", //" //<< pcs_vector[pqc_process[i]]->pcs_number << ", " << - //pqc_index[i]; + // pqc_index[i]; dval = pcs_vector[pqc_process[i]]->GetNodeValue(index, pqc_index[i]); // cout << dval << "\n"; @@ -1719,7 +1719,7 @@ void REACT::InitREACT(void) { m_pcs = pcs_vector[j]; // if (m_pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if - //it is a mass transport process + // it is a mass transport process // if it is a mass transport process if (m_pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { @@ -1796,8 +1796,8 @@ void REACT::InitREACT0() for (size_t j = 0; j < np; j++) // for all processes { pcs = pcs_vector[j]; - // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if it - //is a mass transport process + // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if + // it is a mass transport process if (pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { int comp = pcs->pcs_component_number; // get component number @@ -2206,7 +2206,7 @@ int REACT::ReadReactionModel(FILE* File) m_pcs = pcs_vector[i]; // if //(m_pcs->pcs_type_name.find("HEAT_TRANSPORT") != - //string::npos) + // string::npos) //{ if (m_pcs->getProcessType() == FiniteElement::HEAT_TRANSPORT) @@ -2402,7 +2402,7 @@ int REACT::ReadReactionModelNew(ifstream* pqc_infile) m_pcs = pcs_vector[i]; // if //(m_pcs->pcs_type_name.find("HEAT_TRANSPORT") != - //string::npos) { + // string::npos) { if (m_pcs->getProcessType() == FiniteElement::HEAT_TRANSPORT) { @@ -2837,9 +2837,9 @@ int REACT::ReadInputPhreeqc(long index, FILE* fpqc, FILE* Fphinp) pe_flag = 0; break; } - /* else{ // pH in RF - input file pH_flag=0; printf("Component %s: - concentration %lf", s, val_in[j][index]); + /* else{ // pH in + RF input file pH_flag=0; printf("Component + %s: concentration %lf", s, val_in[j][index]); FilePrintDouble(f, val_in[j][index]); FilePrintString(f, " charge "); FilePrintString(f, " # comp "); @@ -2869,8 +2869,8 @@ int REACT::ReadInputPhreeqc(long index, FILE* fpqc, FILE* Fphinp) // val_in[i][index]); FilePrintDouble(f, val_in[i][index]); - // MX FilePrintString(f, " - // charge "); + // MX + // FilePrintString(f, " charge "); if (strstr(str, "charge")) FilePrintString(f, " charge "); @@ -3440,8 +3440,10 @@ int REACT::WriteInputPhreeqc(long index, *out_file << speciesname << " " << dval << " # comp " << "\n"; - // if(index <2) cout << speciesname << " " << - //dval << "\n"; + // if(index <2) cout << speciesname << + //" + //" + //<< dval << "\n"; // else // *out_file << speciesname << " " << // dval << " charge " << " # @@ -3510,7 +3512,9 @@ int REACT::WriteInputPhreeqc(long index, *out_file << "pH" << " " << dval << " # comp " << "\n"; - // SB to do screen output if(index <2) cout << " pH: " << dval + // SB to do screen output if(index <2) cout << " pH: + // " + // << dval // << ", " << pcs_vector[pqc_process[count]]->pcs_number << "\n"; // write pe count++; @@ -3519,7 +3523,9 @@ int REACT::WriteInputPhreeqc(long index, *out_file << "pe" << " " << dval << " # comp " << "\n"; - // SB to do screen output if(index <2) cout << " pe: " << dval << + // SB to do screen output if(index <2) cout << " pe: " << + // dval + // << // ", " << pcs_vector[pqc_process[count]]->pcs_number << "\n"; *out_file << line_string << "\n"; @@ -3680,11 +3686,11 @@ int REACT::WriteInputPhreeqc(long index, for (i = ii; i < ii + rcml_number_of_gas_species; i++) { speciesname = this->pqc_names[i]; - // cout << "Testing index vectors: " << speciesname << ", - //With vectors: " << pqc_names[i] << ", + // cout << "Testing index vectors: " << speciesname << + //", With vectors: " << pqc_names[i] << ", //" //<< pcs_vector[pqc_process[i]]->pcs_number << ", " << - //pqc_index[i]; + // pqc_index[i]; dval = pcs_vector[pqc_process[i]]->GetNodeValue(index, pqc_index[i]); // cout << dval << "\n"; @@ -3986,7 +3992,7 @@ int REACT::WriteInputPhreeqc(long index, } } ////m_pcs = PCSGet("MASS_TRANSPORT", speciesname);// CB HS - ///update + /// update // m_pcs = cp_vec[cp_name_2_idx[speciesname]]->getProcess(); // idx = m_pcs->GetNodeValueIndex(speciesname)+1; // new // time level dval = m_pcs->GetNodeValue(index,idx); @@ -4357,8 +4363,8 @@ int REACT::ReadOutputPhreeqcNew(void) } pcs_vector[pqc_process[j]]->SetNodeValue( index, pqc_index[j] + dix, dval); - // if(index <2) cout << " Read aqu. for " << - //pqc_names[j] << " " << dval << "\n"; + // if(index <2) cout << " Read aqu. for " + //<< pqc_names[j] << " " << dval << "\n"; } } @@ -4368,7 +4374,8 @@ int REACT::ReadOutputPhreeqcNew(void) j = n1; pcs_vector[pqc_process[j]]->SetNodeValue( index, pqc_index[j] + dix, dval); - // if(index <2) cout << " Read for pH: " << dval << ", + // if(index <2) cout << " Read for pH: " << dval << + //", //"; } if (ein >> dval) // read H+ @@ -4403,7 +4410,7 @@ int REACT::ReadOutputPhreeqcNew(void) { // speciesname = pqc_names[j]; ////m_pcs = PCSGet("MASS_TRANSPORT",speciesname);// CB HS - ///update + /// update // m_pcs = cp_vec[cp_name_2_idx[speciesname]]->getProcess(); // idx = m_pcs->GetNodeValueIndex(speciesname)+1; // m_pcs->SetNodeValue(index,idx,dval); @@ -4430,7 +4437,7 @@ int REACT::ReadOutputPhreeqcNew(void) pcs_vector[pqc_process[j]]->SetNodeValue( index, pqc_index[j] + dix, dval); // if(index <2) cout << " Read equi. for " << - //pqc_names[j] << " " << dval << "\n"; + // pqc_names[j] << " " << dval << "\n"; } } @@ -4716,8 +4723,8 @@ void REACT::GetTransportResults(void) for (size_t j = 0; j < np; j++) // for all processes { pcs = pcs_vector[j]; - // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if it - //is a mass transport process + // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if + // it is a mass transport process if (pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { int comp = pcs->pcs_component_number; // get component number @@ -4998,8 +5005,8 @@ void REACT::GetTransportResults2Element() for (size_t j = 0; j < np; j++) // for all processes { pcs = pcs_vector[j]; - // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if it - //is a mass transport process + // if (pcs->pcs_type_name.compare("MASS_TRANSPORT") == 0) { // if + // it is a mass transport process // if it is a mass transport process if (pcs->getProcessType() == FiniteElement::MASS_TRANSPORT) { diff --git a/FEM/rf_react_cap.cpp b/FEM/rf_react_cap.cpp index a66b5f946..d9917feb9 100644 --- a/FEM/rf_react_cap.cpp +++ b/FEM/rf_react_cap.cpp @@ -953,7 +953,8 @@ void REACT_CAP::InitChemApp(void) // for(ii=this->mass_num; ii<(int)pcs_mass_idx.size(); ii++){ // m_pcs = pcs_vector[pcs_mass_idx[ii]]; // if(strcmp(m_pcs->pcs_primary_function_name[0], "pH")==0 || - //strcmp(m_pcs->pcs_primary_function_name[0], "Eh")==0){ cout << " --> " + // strcmp(m_pcs->pcs_primary_function_name[0], "Eh")==0){ cout << " + // --> " //<< m_pcs->pcs_primary_function_name[0] << "\n"; // pcs_ospecies_idx.push_back(pcs_mass_idx[ii]); // } @@ -2067,7 +2068,8 @@ void REACT_CAP::LoopNodeReact(int f, int nodeflag) PP = m_rei->GetPressure(ii); } - // for(i=0;i 1.0e-8 ) //} // pass parameters from pcs-eclipse @@ -3555,7 +3557,7 @@ vector REACT_CAP::derivs(vector c) //} // for(i=0;i<(int)species_kin_idx.size();i++){ // cout << " " << setw(6) << species_kin_phase[i] << setw(6) << - //species_kin_idx[i] << species_kin_name[i] << "\n"; + // species_kin_idx[i] << species_kin_name[i] << "\n"; //} this->KinRate(); @@ -3565,7 +3567,7 @@ vector REACT_CAP::derivs(vector c) // cout << Kin_Reactions[i_re].type << " " << Kin_Reactions[i_re].rate; // for(i_resp=0;i_resp<(int)Kin_Reactions[i_re].species_name.size();i_resp++){ // cout << " " << Kin_Reactions[i_re].species_stoi[i_resp] << " " << - //Kin_Reactions[i_re].species_name[i_resp]; + // Kin_Reactions[i_re].species_name[i_resp]; //} // cout << "\n"; //} @@ -3942,7 +3944,7 @@ bool REACT_CAP::LoadHKFparam() // i_counter=0; // for(i=0;i ic_2_bc_geometry_type; // Convert eq concentrations at this gemetry to // BC there diff --git a/FEM/rf_st_new.cpp b/FEM/rf_st_new.cpp index 251497003..4e4970722 100644 --- a/FEM/rf_st_new.cpp +++ b/FEM/rf_st_new.cpp @@ -1113,8 +1113,8 @@ void CSourceTerm::Write(std::fstream* st_file) //// dis_type = 1; //////// if (dis_type_name.compare("CONSTANT_GEO") == 0) //////// dis_type = 12; //SB flux is distributed along polyline. To -///do. 4.10.06 / if (this->getProcessDistributionType() == LINEAR) / -///dis_type = 2; / if (this->getProcessDistributionType() == CONSTANT_NEUMANN) +/// do. 4.10.06 / if (this->getProcessDistributionType() == LINEAR) / +/// dis_type = 2; / if (this->getProcessDistributionType() == CONSTANT_NEUMANN) //// dis_type = 3; //// if (this->getProcessDistributionType() == LINEAR_NEUMANN) //// dis_type = 4; @@ -1471,7 +1471,7 @@ double AreaProjection(CEdge* edge, { double area_projection(0); // const double epsilon (1.0e-8); //tolerance to decide whether projection - //is used + // is used // compute edge normal vector double edge_normal[3]; // edge integration is 2 dimensional double elemNormalVector[3]; @@ -1960,7 +1960,8 @@ void CSourceTerm::FaceIntegration(CRFProcess* pcs, { k = nodes_on_sfc[i]; for (j = 0; - j < (long)msh->nod_vector[k]->getConnectedElementIDs().size(); j++) + j < (long)msh->nod_vector[k]->getConnectedElementIDs().size(); + j++) { l = msh->nod_vector[k]->getConnectedElementIDs()[j]; if (msh->ele_vector[l]->selected == 0) @@ -2571,7 +2572,7 @@ void GetCouplingNODValueNewton(double& value, CSourceTerm* m_st, cnodev->msh_node_number, cnodev->msh_node_number_conditional, gamma); ///// relative coupling interface permeability (calculate ALWAYS - ///implicitly) + /// implicitly) if (h_this_shifted > h_cond) { // flow direction from the overland compartment relPerm = m_st->GetRelativeInterfacePermeability( @@ -2616,7 +2617,8 @@ void GetCouplingNODValueNewton(double& value, CSourceTerm* m_st, z_cond; h_this_averaged = 0; for (long i = 0; - i < (long)cnodev->msh_node_numbers_averaging.size(); i++) + i < (long)cnodev->msh_node_numbers_averaging.size(); + i++) h_this_averaged += cnodev->msh_node_weights_averaging[i] * (m_pcs_this->GetNodeValue( @@ -2956,7 +2958,7 @@ void GetCouplingNODValueMixed(double& value, CSourceTerm* m_st, // //q = (RiverConductance * HRiver) - (RiverConductance * HAquifer) // value = RiverConductance * paraA; // MXInc(cnodev->msh_node_number, cnodev->msh_node_number, -//RiverConductance); +// RiverConductance); // } // if (h < paraD) { //HAquiver < BRiverBed // //q = (RiverConductance * HRiver) - (RiverConductance * BRiverBed) @@ -3709,7 +3711,7 @@ void CSourceTermGroup::SetPolylineNodeVectorConditional( pcs_type_name == "MULTI_PHASE_FLOW") { // m_msh_cond->GetNODOnPLY(m_ply, - //ply_nod_vector_cond); + // ply_nod_vector_cond); m_msh_cond->GetNODOnPLY( static_cast(st->getGeoObj()), ply_nod_vector_cond); @@ -3725,7 +3727,7 @@ void CSourceTermGroup::SetPolylineNodeVectorConditional( { number_of_nodes = ply_nod_vector.size(); // m_msh_cond->GetNODOnPLY(m_ply, - //ply_nod_vector_cond); + // ply_nod_vector_cond); m_msh_cond->GetNODOnPLY( static_cast(st->getGeoObj()), ply_nod_vector_cond); @@ -4119,7 +4121,7 @@ void CSourceTermGroup::SetSurfaceNodeValueVector( // / (double) number_of_nodes; // if (st->dis_type == 2 || st->dis_type == 4) { // Piecewise linear - //distributed, polygon-wise WW + // distributed, polygon-wise WW if (st->getProcessDistributionType() == FiniteElement::LINEAR || st->getProcessDistributionType() == FiniteElement::LINEAR_NEUMANN) { @@ -4323,7 +4325,7 @@ void CSourceTerm::SetNodeValues(const std::vector& nodes, // m_nod_val->node_parameterE = node_value_vectorE[i]; // } // if (dis_type == 6 || dis_type == 8 || dis_type == 9) // critical - //depth, normal depth, analytical + // depth, normal depth, analytical if (getProcessDistributionType() == FiniteElement::CRITICALDEPTH || getProcessDistributionType() == FiniteElement::NORMALDEPTH || getProcessDistributionType() == FiniteElement::ANALYTICAL) @@ -4571,7 +4573,8 @@ std::string CSourceTerm::assignPrecipitationDirectlyOnTopSurfaceNodes( if (m_pcs->st_node.size() > 0) { for (std::size_t i = m_pcs->number_of_steady_st_nodes; - i < m_pcs->st_node.size(); i++) + i < m_pcs->st_node.size(); + i++) { delete m_pcs->st_node_value[i]; // m_pcs->st_node contains only pointers to CSourceTerm (held by @@ -4864,7 +4867,7 @@ double CSourceTerm::GetAnalyticalSolution(long location) tflux_area += (flux_area / n); } node_area = tvol * 2.; //* 2 because the diffusion is in two - //direction perpendicular to the fracture + // direction perpendicular to the fracture mass_solute_present = tflux_area * tvol * value; } // Area for polylines @@ -5131,7 +5134,8 @@ void GetCouplingFieldVariables(CRFProcess* m_pcs_this, CRFProcess* m_pcs_cond, *z_cond; // shift overland / groundwater node to soil column *h_averaged = 0; for (long i = 0; - i < (long)cnodev->msh_node_numbers_averaging.size(); i++) + i < (long)cnodev->msh_node_numbers_averaging.size(); + i++) *h_averaged += cnodev->msh_node_weights_averaging[i] * (m_pcs_this->GetNodeValue( diff --git a/FEM/rf_st_new.h b/FEM/rf_st_new.h index f8627e983..f73daa035 100644 --- a/FEM/rf_st_new.h +++ b/FEM/rf_st_new.h @@ -55,7 +55,7 @@ typedef struct std::vector last_source_value; // double value_store[10][5000]; double** value_store; //[PCS_NUMBER_MAX*2]First ref no processes(two fields - //per process..time, value), second ref no + // per process..time, value), second ref no // values } NODE_HISTORY; diff --git a/FEM/rf_tim_new.cpp b/FEM/rf_tim_new.cpp index 53c6a34c8..f4c398ef9 100644 --- a/FEM/rf_tim_new.cpp +++ b/FEM/rf_tim_new.cpp @@ -143,8 +143,9 @@ std::ios::pos_type GetNextSubKeyword(std::ifstream* file, // Kommentarzeichens, j=-1 wenn es keines gibt. if (j < 0) j = (int)line_complete.length(); - // if(j!=i) break; //Wenn das erste nicht-leerzeichen ein - // Kommentarzeichen ist, zeile �berlesen. Sonst ist das eine Datenzeile + // if(j!=i) break; //Wenn das erste + // nicht-leerzeichen ein Kommentarzeichen ist, zeile �berlesen. Sonst + // ist das eine Datenzeile if (i != -1) *line = line_complete.substr( i, j - i); // Ab erstem nicht-Leerzeichen bis Kommentarzeichen @@ -369,9 +370,10 @@ std::ios::pos_type CTimeDiscretization::Read(std::ifstream* tim_file) double include_third_variable = -1.0; double third_variable_tolerance = -1.0; // - line >> dynamic_control_error_method; // Corresponds to - // FiniteElement::ErrorMethod. - // Defines how + line >> + dynamic_control_error_method; // Corresponds to + // FiniteElement::ErrorMethod. + // Defines how // tolerance is applied. line >> time_step_length; // initial_dt line >> min_time_step; // min_dt @@ -614,8 +616,9 @@ std::ios::pos_type CTimeDiscretization::Read(std::ifstream* tim_file) { *tim_file >> line_string; adapt_itr_type = convertIterationType(line_string); - if (line_string == "COUPLED_STABLE_ERROR") // convertIterationType() - // finds + if (line_string == + "COUPLED_STABLE_ERROR") // convertIterationType() + // finds // IterationType::COUPLED if that is part of the // name... very unpractical. adapt_itr_type = @@ -1166,7 +1169,7 @@ double CTimeDiscretization::FirstTimeStepEstimate(void) switch (m_pcs->getProcessType()) // TF { // case 'G': // kg44 groudnwater flow ---if steady state, time - //step should be greater zero...transient + // step should be greater zero...transient // flow does not work with adaptive stepping case FiniteElement::GROUNDWATER_FLOW: // TF, if steady state, time // step should be greater @@ -1180,8 +1183,8 @@ double CTimeDiscretization::FirstTimeStepEstimate(void) initial_time_step; // take min time step as conservative // best guess for testing break; - // case 'M': // kg44 Mass transport ---if steady state, time step - //should be greater zero.. + // case 'M': // kg44 Mass transport ---if steady state, time + // step should be greater zero.. case FiniteElement::HEAT_TRANSPORT: // MW copied from // MASS_TRANSPORT // TF, if // steady state, time step @@ -2072,7 +2075,7 @@ double CTimeDiscretization::AdaptiveFirstTimeStepEstimate(void) // guess for testing break; // case 'G': // kg44 groudnwater flow ---if steady state, time - //step should be greater zeor...transient + // step should be greater zeor...transient // flow does not work with adaptive stepping case FiniteElement::GROUNDWATER_FLOW: // if steady state, time step // should be greater zero ... @@ -2423,7 +2426,7 @@ double CTimeDiscretization::MaxTimeStep() melem = this_pcs->m_msh->ele_vector[i]; // cout << m_mat_mp->Porosity(i,theta) << " " << - //melem->representative_length << "\n"; + // melem->representative_length << "\n"; // KG44 attention DM needs to be multiplied with porosity! Dm = m_mat_mp->TortuosityFunction(i, g, theta) * m_mat_mp->Porosity(i, theta) * @@ -2445,7 +2448,7 @@ double CTimeDiscretization::MaxTimeStep() Dm; max_diff_time_step = std::min(max_diff_time_step, dummy); // std::cout << "Neumann criteria: " << max_diff_time_step << " i " << - //i << "\n"; + // i << "\n"; } std::cout << "GEMS3K: maximum Diffusive / Dispersive Time Step " diff --git a/FEM/rfmat_cp.cpp b/FEM/rfmat_cp.cpp index 809e206c6..3722f6662 100644 --- a/FEM/rfmat_cp.cpp +++ b/FEM/rfmat_cp.cpp @@ -458,7 +458,7 @@ ios::pos_type CompProperties::Read(ifstream* rfd_file) if (diffusion_model > 0) // read_help = (double *) - //Malloc(count_of_diffusion_model_values * sizeof(double)); + // Malloc(count_of_diffusion_model_values * sizeof(double)); for (j = 0; j < count_of_diffusion_model_values; j++) { @@ -518,7 +518,7 @@ ios::pos_type CompProperties::Read(ifstream* rfd_file) if (decay_model > 0) // read_help = (double *) - //Malloc(count_of_decay_model_values * sizeof(double)); + // Malloc(count_of_decay_model_values * sizeof(double)); for (j = 0; j < count_of_decay_model_values; j++) /* @@ -565,7 +565,7 @@ ios::pos_type CompProperties::Read(ifstream* rfd_file) if (isotherm_model > 0) // read_help = (double *) - //Malloc(count_of_isotherm_model_values * sizeof(double)); + // Malloc(count_of_isotherm_model_values * sizeof(double)); for (j = 0; j < count_of_isotherm_model_values; j++) /* @@ -992,7 +992,7 @@ double CompProperties::CalcDiffusionCoefficientCP(long index, diffusion_average += 1.0 / Dm; // cout << "debug: " << Dm << " porosity: " << - //GetNodePorosityValue_MT(m_Elem->GetNodeIndex ( i ), 0) + // GetNodePorosityValue_MT(m_Elem->GetNodeIndex ( i ), 0) //<< endl; } Dm = count_nodes / @@ -1021,7 +1021,7 @@ double CompProperties::CalcDiffusionCoefficientCP(long index, // porosities & saturations -> // Pore diffusion coefficient // cout << " CalcDiffusionCoefficientCP: De: " << - //Dm*porosity*saturation << " saturation " << + // Dm*porosity*saturation << " saturation " << // saturation << " porosity " << endl; return Dm; @@ -1084,7 +1084,7 @@ double CompProperties::CalcDiffusionCoefficientCP(long index, diffusion_average += 1.0 / Dm; // cout << "debug: " << Dm << " porosity: " << - //GetNodePorosityValue_MT(m_Elem->GetNodeIndex ( i ), 0) + // GetNodePorosityValue_MT(m_Elem->GetNodeIndex ( i ), 0) //<< "\n"; } Dm = count_nodes / @@ -1113,7 +1113,7 @@ double CompProperties::CalcDiffusionCoefficientCP(long index, // porosities & saturations -> // Pore diffusion coefficient // cout << " CalcDiffusionCoefficientCP: De: " << - //Dm*porosity*saturation << " saturation " << + // Dm*porosity*saturation << " saturation " << // saturation << " porosity " << "\n"; return Dm; @@ -1613,7 +1613,7 @@ double CompProperties::CalcElementRetardationFactorNew(long index, // case 15: /* Input by curve */ // isotherm = 0.0; // isotherm = GetCurveDerivative((int) isotherm_model_values[0], 0, - //fabs(conc), &gueltig); break; + // fabs(conc), &gueltig); break; default: DisplayMsgLn( "Unknown sorption isotherm type. Assuming no sorption"); @@ -1701,7 +1701,7 @@ double CompProperties::CalcElementMeanConcNew(long index, CRFProcess* m_pcs) /* calculate mean value */ // DisplayMsgLn(" "); DisplayMsg(" val1: "); - //DisplayDouble(val1,0,0);DisplayMsg(", val2: "); + // DisplayDouble(val1,0,0);DisplayMsg(", val2: "); // DisplayDouble(val2,0,0); DisplayMsgLn(""); val = theta * val1 + (1.0 - theta) * val2; diff --git a/FEM/rfmat_cp.h b/FEM/rfmat_cp.h index 199ec91b5..145e37d34 100644 --- a/FEM/rfmat_cp.h +++ b/FEM/rfmat_cp.h @@ -72,7 +72,7 @@ class CompProperties : public ProcessInfo */ double diffusion_model_values[10]; /* Parameter fuer das Diffusionsmodell */ double diffusion_anisotropy_ratio[3]; - /* Ratio of three diffusion coefficients */ // PCH + /* Ratio of three diffusion coefficients */ // PCH int diffusion_function_name; /* Zugriff auf Number of Parameters */ int GetNumberDiffusionValuesCompProperties(int); diff --git a/FEM/solver.cpp b/FEM/solver.cpp index d7414d4a4..9c52e3de0 100644 --- a/FEM/solver.cpp +++ b/FEM/solver.cpp @@ -3108,7 +3108,7 @@ int SpPICARD(double* b, double* x, long n, } /* Ende der Iterationsschleife ************************************************************************** - */ + */ iterations_old_timestep = k; diff --git a/FEM/tools.cpp b/FEM/tools.cpp index b45ae354e..0b0b93579 100644 --- a/FEM/tools.cpp +++ b/FEM/tools.cpp @@ -818,7 +818,7 @@ int FctCurves(char* data, int found, FILE* f) // NumberOfElements = (long)m_msh->ele_vector.size(); // //------------------------------------------------------------------------ // NumberOfElementsPerLayer = NumberOfElements / -//m_msh->getNumberOfMeshLayers(); +// m_msh->getNumberOfMeshLayers(); // // //layers // if(m_mat_mp->geo_type_name.compare("LAYER") == 0) @@ -839,7 +839,7 @@ int FctCurves(char* data, int found, FILE* f) // if(no_values < NumberOfElementsPerLayer) // DisplayMsgLn( // "Warning! Fewer element values in File for heterogeneous -//permeability field than elements in element +// permeability field than elements in element // list"); // //------------------------------------------------------------------------ // /* field (int) for helping sort */ @@ -848,7 +848,7 @@ int FctCurves(char* data, int found, FILE* f) // help[i] = 0; // // /* initialize element values in element list; this is for the case, if not -//for all elements values are given in the input file */ +// for all elements values are given in the input file */ // // //WW double test1; // //WW double test2; @@ -866,7 +866,7 @@ int FctCurves(char* data, int found, FILE* f) // //WW test2 = m_ele->mat_vector(1); // //------------------------------------------------------------------------ // //METHOD = 0: read in unsorted values for coordinates and distribute to -//corresponding elements */ if(method == 0) +// corresponding elements */ if(method == 0) // { // // allocate storage to read in file with het values and initialize // invals = (double**) Malloc((no_values) * sizeof(double*)); @@ -908,13 +908,13 @@ int FctCurves(char* data, int found, FILE* f) // else // for(j = 0; j < nof; j++) // values[j] = invals[ihet][j + 3]; -// //DisplayMsg(" Het Val for element: "); DisplayLong(i); DisplayMsg(" -//with coordinates "); +// //DisplayMsg(" Het Val for element: "); DisplayLong(i); +// DisplayMsg(" with coordinates "); // //DisplayDouble(x,0,0); DisplayMsg(", "); DisplayDouble(y,0,0); -//DisplayMsg(", "); DisplayDouble(z,0,0); +// DisplayMsg(", "); DisplayDouble(z,0,0); // DisplayMsg(" found at: "); // //DisplayDouble(invals[ihet][0],0,0); DisplayMsg(", "); -//DisplayDouble(invals[ihet][1],0,0); +// DisplayDouble(invals[ihet][1],0,0); // DisplayMsg(", //"); // DisplayDouble(invals[ihet][2],0,0); DisplayMsgLn(". "); @@ -983,7 +983,7 @@ int FctCurves(char* data, int found, FILE* f) // } /* end if (method == 0) */ // //------------------------------------------------------------------------ // //METHOD = 1: read in one sorted column, index is element number no -//conversion, no sorting if(method == 1) +// conversion, no sorting if(method == 1) // { // for(i = EleStart; i < EleEnd; i++) // { @@ -1165,10 +1165,9 @@ int GetLineFromFile(char* zeile, ifstream* ein) i); // Nach Kommentarzeichen ; suchen. j = Position des // Kommentarzeichens, j=-1 wenn es keines gibt. if (j != i) - fertig = - 1; // Wenn das erste nicht-leerzeichen ein Kommentarzeichen - // ist, zeile überlesen. Sonst ist das - // eine Datenzeile + fertig = 1; // Wenn das erste nicht-leerzeichen ein + // Kommentarzeichen ist, zeile überlesen. Sonst ist + // das eine Datenzeile } else // end of file found { @@ -1481,7 +1480,7 @@ double GetMatrixValue(double var1, // //WW anz_data = (int)matrix->variable_data_vector.size()-dim_x-dim_y; // //---------------------------------------------------------------------- // if (var1 < *matrix->variable_data_vector[0]) //is var1 smaller then the -//smallest argument? +// smallest argument? // { // x1 = x2 = *matrix->variable_data_vector[0]; // *gueltig = 0; @@ -1551,11 +1550,11 @@ double GetMatrixValue(double var1, // } // //getting the corresponding Z values for the arguments from the data vector // zx1y1 = *matrix->variable_data_vector[(j1 - dim_x) * dim_x + (i1 + dim_x + -//dim_y)]; zx2y1 = *matrix->variable_data_vector[(j1 - dim_x) * dim_x + (i2 + -//dim_x + dim_y)]; zx1y2 = *matrix->variable_data_vector[(j2 - dim_x) * dim_x + -//(i1 + dim_x + dim_y)]; zx2y2 = *matrix->variable_data_vector[(j2 - dim_x) * -//dim_x + (i2 + dim_x + dim_y)]; return interpol (y1,y2, interpol -//(x1,x2,zx1y1,zx2y1, var1),interpol (x1, y1, zx1y2, zx2y2, var1),var2); +// dim_y)]; zx2y1 = *matrix->variable_data_vector[(j1 - dim_x) * dim_x + (i2 +// + dim_x + dim_y)]; zx1y2 = *matrix->variable_data_vector[(j2 - dim_x) * +// dim_x + (i1 + dim_x + dim_y)]; zx2y2 = *matrix->variable_data_vector[(j2 - +// dim_x) * dim_x + (i2 + dim_x + dim_y)]; return interpol (y1,y2, interpol +//(x1,x2,zx1y1,zx2y1, var1),interpol (x1, y1, zx1y2, zx2y2, var1),var2); //} /**************************************************************************** diff --git a/FEM/vtk.cpp b/FEM/vtk.cpp index 942d26437..4e33c4a0a 100644 --- a/FEM/vtk.cpp +++ b/FEM/vtk.cpp @@ -520,7 +520,8 @@ bool CVTK::WriteMeshElementConnectivity(std::fstream& fin, bool output_data, { ele = msh->ele_vector[i]; for (size_t j = 0; - j < msh->ele_vector[i]->GetNodesNumber(false); j++) + j < msh->ele_vector[i]->GetNodesNumber(false); + j++) write_value_binary(fin, ele->GetNodeIndex(j)); } } diff --git a/FileIO/FEMIO/BoundaryConditionIO.cpp b/FileIO/FEMIO/BoundaryConditionIO.cpp index e75f5d04c..9b43c9155 100644 --- a/FileIO/FEMIO/BoundaryConditionIO.cpp +++ b/FileIO/FEMIO/BoundaryConditionIO.cpp @@ -59,19 +59,17 @@ namespace FileIO //// setProcessPrimaryVariable(CONCENTRATION); //// } else { //// DisplayErrorMsg( -//// "Error: In reading BC file, the input component names are not found -///in MCP file!!!"); / exit(1); / } -//// } else { -//// setProcess(PCSGet(this->getProcessType())); -//// setProcessPrimaryVariable(convertPrimaryVariable(tmp)); -//// } -//// in.clear(); -//// } +//// "Error: In reading BC file, the input component names +///are +/// not found in MCP file!!!"); / exit(1); / } / +///} else { / setProcess(PCSGet(this->getProcessType())); / +/// setProcessPrimaryVariable(convertPrimaryVariable(tmp)); / } / +/// in.clear(); / } // //// // HS, this is new. later on we should stick to COMP_NAME, -///PRIMARY_VARIABLE support will be removed. / if +/// PRIMARY_VARIABLE support will be removed. / if ///(line_string.find("$COMP_NAME") != std::string::npos) { / -///in.str(GetLineFromFile1(in_str)); / std::string tmp; +/// in.str(GetLineFromFile1(in_str)); / std::string tmp; //// in >> tmp; // _pcs_pv_name; //// if (this->_pcs_type == MASS_TRANSPORT) { //// // HS set the pointer to MCP based on component name. @@ -81,14 +79,15 @@ namespace FileIO //// setProcessPrimaryVariable(CONCENTRATION); //// } else { //// DisplayErrorMsg( -//// "Error: In reading BC file, the input component names are not found -///in MCP file!!!"); / exit(1); / } / } / -///in.clear(); / } +//// "Error: In reading BC file, the input component names +///are not found +/// in MCP file!!!"); / exit(1); / } / } / +/// in.clear(); / } // // //subkeyword found // if (line_string.find("$GEO_TYPE") != std::string::npos) { // GeoIO::readGeoInfo (geo_info, in_str, geo_name, geo_obj, -//unique_fname); +// unique_fname); // } // //// //PCH @@ -98,8 +97,8 @@ namespace FileIO //// _periodic = false; // JOD //// //// // Soure terms are assign to element nodes directly. 23.02.2009. -///WW / if (line_string.find("DIRECT") != std::string::npos) { / -///this->setProcessDistributionType(FiniteElement::DIRECT); / in +/// WW / if (line_string.find("DIRECT") != std::string::npos) { / +/// this->setProcessDistributionType(FiniteElement::DIRECT); / in ///>> fname; / fname = FilePath + fname; / in.clear(); //// } //// if (line_string.find("CONSTANT") != std::string::npos) { diff --git a/FileIO/MeshIO/LegacyVtkInterface.cpp b/FileIO/MeshIO/LegacyVtkInterface.cpp index b47998a7c..3140b08f8 100644 --- a/FileIO/MeshIO/LegacyVtkInterface.cpp +++ b/FileIO/MeshIO/LegacyVtkInterface.cpp @@ -588,15 +588,16 @@ void LegacyVtkInterface::WriteVTKDataArraysPETSC(PetscViewer viewer) const // handled elswhere if (_cellArrayNames[k].compare("VELOCITY") == 0) { - // kg44 to be done vtk_file << "VECTORS velocity double " << + // kg44 to be done vtk_file << "VECTORS velocity double " + // << // "\n"; this->WriteELEVelocity(vtk_file); //WW/OK } // PRINT CHANGING (OR CONSTANT) PERMEABILITY TENSOR? // JTARON // 2010 else if (_cellArrayNames[k].compare("PERMEABILITY") == 0) { - /* kg44 to be done vtk_file << "TENSORS permeability - double " << endl; for (long j = 0; j < (long) + /* kg44 to be done vtk_file << "TENSORS + permeability double " << endl; for (long j = 0; j < (long) _mesh->ele_vector.size(); j++) { MeshLib::CElem* ele = diff --git a/FileIO/OGSIOVer4.cpp b/FileIO/OGSIOVer4.cpp index b3a0e454b..8067d7c9a 100644 --- a/FileIO/OGSIOVer4.cpp +++ b/FileIO/OGSIOVer4.cpp @@ -92,12 +92,13 @@ std::string readPoints(std::istream& in, std::vector* pnt_vec, size_t end_pos((line.substr(pos + 6)).find(" ")); if (end_pos != std::string::npos) (*pnt_id_name_map)[line.substr(pos + 6, end_pos)] = id; - // std::cout << "* name: " << line.substr (pos+6, - //end_pos) << ", id: " << id << "\n"; + // std::cout << "* name: " << line.substr + //(pos+6, end_pos) << ", id: " << id << "\n"; else (*pnt_id_name_map)[line.substr(pos + 6)] = id; - // std::cout << "name: " << line.substr (pos+6) << ", - //id: " << id << "\n"; + // std::cout << "name: " << line.substr (pos+6) + //<< + //", id: " << id << "\n"; } size_t id_pos(line.find("$ID")); @@ -568,11 +569,12 @@ std::string readSurfaces(std::istream& in, std::vector& sfc_vec, for (size_t k(0); k < polygon_vec.size(); k++) delete polygon_vec[k]; // std::cout << "readSurfaces: number of read polygons " << - //polygon_vec.size() << "\n"; + // polygon_vec.size() << "\n"; // // subdivide all polygons in simple polygons // for (std::vector::iterator polygon_it - //(polygon_vec.begin()); polygon_it != polygon_vec.end(); polygon_it++) { + //(polygon_vec.begin()); polygon_it != polygon_vec.end(); + // polygon_it++) { // // compute list of simple polygons // (*polygon_it)->computeListOfSimplePolygons (); // } @@ -581,58 +583,64 @@ std::string readSurfaces(std::istream& in, std::vector& sfc_vec, // std::list polygon_forest; // // create polygon forest // for (std::vector::iterator polygon_it - //(polygon_vec.begin()); polygon_it != polygon_vec.end(); polygon_it++) { + //(polygon_vec.begin()); polygon_it != polygon_vec.end(); + // polygon_it++) { // // get the list and insert the elements as SimplePolygonTree items - //into the forest const std::list simple_polygon_list + // into the forest const std::list simple_polygon_list //((*polygon_it)->getListOfSimplePolygons()); for //(std::list::const_iterator simple_polygon_it //(simple_polygon_list.begin()); simple_polygon_it != - //simple_polygon_list.end(); simple_polygon_it++) { SimplePolygonTree *spt - //(new SimplePolygonTree (*simple_polygon_it)); polygon_forest.push_back - //(spt); + // simple_polygon_list.end(); simple_polygon_it++) { + // SimplePolygonTree *spt (new SimplePolygonTree (*simple_polygon_it)); + // polygon_forest.push_back (spt); // } // } // std::cout << "readSurfaces: \"Polygon forest\" consists of " << - //polygon_forest.size() << " trees" << "\n"; + // polygon_forest.size() << " trees" << "\n"; // // // create the hierarchy // createPolygonTree (polygon_forest); // std::cout << "readSurfaces: \"Polygon forest\" consists of " << - //polygon_forest.size() << " trees" << "\n"; + // polygon_forest.size() << " trees" << "\n"; // // std::string out_fname ("GMSHTest.geo"); // std::cout << "writing input file for GMSH " << out_fname << " ... " << - //std::flush; GMSHInterface gmsh_io (out_fname); + // std::flush; GMSHInterface gmsh_io (out_fname); // // writing points // gmsh_io.writeGMSHPoints(pnt_vec); // // writing simple polygon tree // for (std::list::const_iterator - //polygon_tree_it (polygon_forest.begin()); polygon_tree_it != - //polygon_forest.end(); polygon_tree_it++) { + // polygon_tree_it (polygon_forest.begin()); polygon_tree_it != + // polygon_forest.end(); polygon_tree_it++) { // (*polygon_tree_it)->visitAndProcessNodes (gmsh_io); // } // std::cout << "done" << "\n"; // create surfaces from simple polygons // for (std::vector::iterator polygon_it - //(polygon_vec.begin()); polygon_it != polygon_vec.end(); polygon_it++) { + //(polygon_vec.begin()); polygon_it != polygon_vec.end(); + // polygon_it++) + //{ // // const std::list& list_of_simple_polygons //((*polygon_it)->getListOfSimplePolygons()); // // for (std::list::const_iterator simple_polygon_it //(list_of_simple_polygons.begin()); simple_polygon_it != - //list_of_simple_polygons.end(); simple_polygon_it++) { + // list_of_simple_polygons.end(); simple_polygon_it++) { // // std::list triangles; // MathLib::earClippingTriangulationOfPolygon(*simple_polygon_it, - //triangles); std::cout << "done - " << triangles.size () << " triangles " + // triangles); std::cout << "done - " << triangles.size () << " + // triangles + // " //<< "\n"; // // Surface *sfc(new Surface(pnt_vec)); // // add Triangles to Surface // std::list::const_iterator it - //(triangles.begin()); while (it != triangles.end()) { sfc->addTriangle + //(triangles.begin()); while (it != triangles.end()) { + // sfc->addTriangle //((*it)[0], (*it)[1], (*it)[2]); it++; // } // sfc_vec.push_back (sfc); diff --git a/GCC/HKF.h b/GCC/HKF.h index 0360bdd8b..a6915fee0 100644 --- a/GCC/HKF.h +++ b/GCC/HKF.h @@ -52,8 +52,10 @@ class HKF /* Methods */ static int load_param(std::vector& spec, - std::vector name_type, - std::vector phase_type); + std::vector + name_type, + std::vector + phase_type); // species storage // name type: 0-name, 1-scform, 2-abbrev, 3-ecform, others-all // phase type: 0-5 SpeciesData.type, others- last found in database diff --git a/GCC/IO.cpp b/GCC/IO.cpp index 3a7be6582..9a5ba244d 100644 --- a/GCC/IO.cpp +++ b/GCC/IO.cpp @@ -464,8 +464,8 @@ vector IO::formula2index_total(std::string formula) return id_iz; } -vector IO::formula2index_define(std::string formula, - vector Chemical_Element) +vector IO::formula2index_define( + std::string formula, vector Chemical_Element) { // const string Chemical_Element[10]={"Li", "Na", "K", "Mg", "Ca", "Cl", // "S", "C", "H", "O"}; diff --git a/GCC/VLE.cpp b/GCC/VLE.cpp index 7eaf278fb..eb5648af6 100644 --- a/GCC/VLE.cpp +++ b/GCC/VLE.cpp @@ -611,7 +611,7 @@ double VLE::Henry_const_CO2(double T) Ps = IF97::Psat(T) * 10.0; return A / Tr + B / Tr * pow(Tau, 0.355) + C * pow(Tr, -0.41) * exp(Tau) + log(Ps) - log(55.51); //"-log(55.51)" for unit convert from mole - //fraction to mol/kg water + // fraction to mol/kg water } double VLE::Henry_const_H2(double T) @@ -627,7 +627,7 @@ double VLE::Henry_const_H2(double T) Ps = IF97::Psat(T) * 10.0; return A / Tr + B / Tr * pow(Tau, 0.355) + C * pow(Tr, -0.41) * exp(Tau) + log(Ps) - log(55.51); //"-log(55.51)" for unit convert from mole - //fraction to mol/kg water + // fraction to mol/kg water } void VLE::EoS_PR_H2(double T, double P, double& V, double& Z, double& lnphi) diff --git a/GEO/Color.cpp b/GEO/Color.cpp index a917e88ba..49a3298bc 100644 --- a/GEO/Color.cpp +++ b/GEO/Color.cpp @@ -65,7 +65,8 @@ const Color* getColor(const std::string& id, std::map& colors) { for (std::map::const_iterator it = colors.begin(); - it != colors.end(); ++it) + it != colors.end(); + ++it) if (id.compare(it->first) == 0) return it->second; std::cout << "Key \"" << id << "\" not found in color lookup table..." diff --git a/GEO/GEOObjects.cpp b/GEO/GEOObjects.cpp index cb0416b3c..00380a451 100644 --- a/GEO/GEOObjects.cpp +++ b/GEO/GEOObjects.cpp @@ -136,7 +136,8 @@ bool GEOObjects::removePointVec(const std::string& name) } for (std::vector::iterator it(_pnt_vecs.begin()); - it != _pnt_vecs.end(); it++) + it != _pnt_vecs.end(); + it++) if ((*it)->getName().compare(name) == 0) { delete *it; @@ -159,7 +160,8 @@ std::vector* GEOObjects::filterStationVec( const std::string& name, const std::vector& bounds) { for (std::vector::iterator it(_pnt_vecs.begin()); - it != _pnt_vecs.end(); it++) + it != _pnt_vecs.end(); + it++) if ((*it)->getName().compare(name) == 0 && (*it)->getType() == PointVec::STATION) return (*it)->filterStations(bounds); @@ -174,7 +176,8 @@ const std::vector* GEOObjects::getStationVec( const std::string& name) const { for (std::vector::const_iterator it(_pnt_vecs.begin()); - it != _pnt_vecs.end(); it++) + it != _pnt_vecs.end(); + it++) { if ((*it)->getName().compare(name) == 0 && (*it)->getType() == PointVec::STATION) @@ -269,7 +272,8 @@ const PolylineVec* GEOObjects::getPolylineVecObj(const std::string& name) const bool GEOObjects::removePolylineVec(const std::string& name) { for (std::vector::iterator it = _ply_vecs.begin(); - it != _ply_vecs.end(); ++it) + it != _ply_vecs.end(); + ++it) if ((*it)->getName().compare(name) == 0) { delete *it; @@ -331,7 +335,8 @@ const std::vector* GEOObjects::getSurfaceVec( bool GEOObjects::removeSurfaceVec(const std::string& name) { for (std::vector::iterator it(_sfc_vecs.begin()); - it != _sfc_vecs.end(); it++) + it != _sfc_vecs.end(); + it++) if ((*it)->getName().compare(name) == 0) { delete *it; @@ -396,14 +401,16 @@ bool GEOObjects::isPntVecUsed(const std::string& name) const { // search dependent data structures (Polyline) for (std::vector::const_iterator it(_ply_vecs.begin()); - it != _ply_vecs.end(); it++) + it != _ply_vecs.end(); + it++) { std::string a = (*it)->getName(); if (((*it)->getName()).compare(name) == 0) return true; } for (std::vector::const_iterator it(_sfc_vecs.begin()); - it != _sfc_vecs.end(); it++) + it != _sfc_vecs.end(); + it++) { std::string a = (*it)->getName(); if (((*it)->getName()).compare(name) == 0) @@ -416,7 +423,8 @@ bool GEOObjects::isPntVecUsed(const std::string& name) const void GEOObjects::getStationVectorNames(std::vector& names) const { for (std::vector::const_iterator it(_pnt_vecs.begin()); - it != _pnt_vecs.end(); it++) + it != _pnt_vecs.end(); + it++) if ((*it)->getType() == PointVec::STATION) names.push_back((*it)->getName()); } @@ -425,7 +433,8 @@ void GEOObjects::getGeometryNames(std::vector& names) const { names.clear(); for (std::vector::const_iterator it(_pnt_vecs.begin()); - it != _pnt_vecs.end(); it++) + it != _pnt_vecs.end(); + it++) if ((*it)->getType() == PointVec::POINT) names.push_back((*it)->getName()); } diff --git a/GEO/Grid.h b/GEO/Grid.h index 95edab078..e555ba59c 100644 --- a/GEO/Grid.h +++ b/GEO/Grid.h @@ -316,13 +316,16 @@ POINT const* Grid::getNearestPoint(double const* const pnt) const { size_t tmp_coords[3]; for (tmp_coords[0] = coords[0] - offset; - tmp_coords[0] < coords[0] + offset; tmp_coords[0]++) + tmp_coords[0] < coords[0] + offset; + tmp_coords[0]++) { for (tmp_coords[1] = coords[1] - offset; - tmp_coords[1] < coords[1] + offset; tmp_coords[1]++) + tmp_coords[1] < coords[1] + offset; + tmp_coords[1]++) { for (tmp_coords[2] = coords[2] - offset; - tmp_coords[2] < coords[2] + offset; tmp_coords[2]++) + tmp_coords[2] < coords[2] + offset; + tmp_coords[2]++) { // do not check the origin grid cell twice if (!(tmp_coords[0] == coords[0] && diff --git a/GEO/PointVec.cpp b/GEO/PointVec.cpp index aa69a294a..46f11d5bd 100644 --- a/GEO/PointVec.cpp +++ b/GEO/PointVec.cpp @@ -219,7 +219,7 @@ void PointVec::makePntsUnique(std::vector* pnt_vec, // reg_ids.insert(std::pair(k, cnt)); // cnt++; // } else reg_ids.insert(std::pair(k, - //reg_ids[pnt_id_map[k]])); + // reg_ids[pnt_id_map[k]])); // } // for (size_t k(0); k < n_pnts_in_file; k++) // pnt_id_map[k] = reg_ids[k]; diff --git a/GEO/Polygon.cpp b/GEO/Polygon.cpp index 90be2bd60..6b97915a5 100644 --- a/GEO/Polygon.cpp +++ b/GEO/Polygon.cpp @@ -42,7 +42,8 @@ Polygon::~Polygon() { // remove polygons from list for (std::list::iterator it(_simple_polygon_list.begin()); - it != _simple_polygon_list.end(); it++) + it != _simple_polygon_list.end(); + it++) // the first entry of the list can be a pointer the object itself if (*it != this) delete *it; @@ -234,7 +235,8 @@ void Polygon::computeListOfSimplePolygons() splitPolygonAtIntersection(_simple_polygon_list.begin()); for (std::list::iterator it(_simple_polygon_list.begin()); - it != _simple_polygon_list.end(); it++) + it != _simple_polygon_list.end(); + it++) (*it)->initialise(); } diff --git a/GEO/Polyline.cpp b/GEO/Polyline.cpp index e90fdb554..e37c223f1 100644 --- a/GEO/Polyline.cpp +++ b/GEO/Polyline.cpp @@ -206,7 +206,8 @@ Polyline* Polyline::constructPolylineFromSegments( bool ply_found(false); prox *= prox; // square distance once to save time later for (std::vector::iterator it = local_ply_vec.begin(); - it != local_ply_vec.end(); ++it) + it != local_ply_vec.end(); + ++it) { if (pnt_vec == (*it)->getPointsVec()) { diff --git a/GEO/QuadTree.h b/GEO/QuadTree.h index 690a92cc5..4e09aab70 100644 --- a/GEO/QuadTree.h +++ b/GEO/QuadTree.h @@ -64,7 +64,8 @@ class QuadTree else _ur[0] = _ll[0] + _ur[1] - _ll[1]; //#ifndef NDEBUG - // std::cerr << "lower left: " << _ll << ", upper right: " << _ur << + // std::cerr << "lower left: " << _ll << ", upper right: " << _ur + //<< //", depth " << _depth << "\n"; #endif } diff --git a/GEO/SimplePolygonTree.cpp b/GEO/SimplePolygonTree.cpp index 4969c800e..207764fb2 100644 --- a/GEO/SimplePolygonTree.cpp +++ b/GEO/SimplePolygonTree.cpp @@ -24,7 +24,8 @@ SimplePolygonTree::~SimplePolygonTree() { delete _node_polygon; for (std::list::const_iterator it(_childs.begin()); - it != _childs.end(); ++it) + it != _childs.end(); + ++it) { delete *it; } @@ -57,7 +58,8 @@ void SimplePolygonTree::insertSimplePolygonTree( const Polygon* polygon(polygon_hierarchy->getPolygon()); bool nfound(true); for (std::list::const_iterator it(_childs.begin()); - it != _childs.end() && nfound; ++it) + it != _childs.end() && nfound; + ++it) { // check all points of polygon size_t n_pnts_polygon(polygon->getNumberOfPoints()), cnt(0); diff --git a/GEO/Station.cpp b/GEO/Station.cpp index 8aa711c10..398e17b3a 100644 --- a/GEO/Station.cpp +++ b/GEO/Station.cpp @@ -226,8 +226,8 @@ int StationBorehole::addStratigraphy(const std::string& path, // borehole->_soilLayerThickness.clear(); // borehole->_soilName.clear(); // - // cout << "StationBorehole::addStratigraphy() - Profile incomplete - //(Borehole " << borehole->_name << + // cout << "StationBorehole::addStratigraphy() - Profile + // incomplete (Borehole " << borehole->_name << //", // Layer " << (i+1) << " missing).\n"; // diff --git a/GEO/Station.h b/GEO/Station.h index f26fcc271..23db9e0ad 100644 --- a/GEO/Station.h +++ b/GEO/Station.h @@ -265,7 +265,8 @@ class StationBorehole : public Station /// Adds a stratigraphy to a borehole given a vector of points of length "n" /// and a vector of soil names of length "n-1". int addStratigraphy(const std::vector& profile, - const std::vector soil_names); + const std::vector + soil_names); /// Reads the stratigraphy for a specified station from a file static int addStratigraphy(const std::string& path, diff --git a/GEO/TemplateVec.h b/GEO/TemplateVec.h index d670ec10c..be3ddcc76 100644 --- a/GEO/TemplateVec.h +++ b/GEO/TemplateVec.h @@ -183,7 +183,8 @@ class TemplateVec { for (std::map::iterator it = _name_id_map->begin(); - it != _name_id_map->end(); ++it) + it != _name_id_map->end(); + ++it) if (it->second == id) { _name_id_map->erase( diff --git a/GEO/geo_ply.cpp b/GEO/geo_ply.cpp index f20b5cb38..06ded7ade 100644 --- a/GEO/geo_ply.cpp +++ b/GEO/geo_ply.cpp @@ -891,9 +891,10 @@ void CGLPolyline::SortPointVectorByDistance() void CGLPolyline::GetPointOrderByDistance() { // std::cout << "CGLPolyline::GetPointOrderByDistance() polyline " << - //getName() << "\n"; for (size_t k(0); kgetGEOObjects()->getPolylineVecObj(*(_mesh->getProjectName()))->getNameOfElement(ply, -//ply_name)) { ply_name = "unknown-ply"; +// ply_name)) { ply_name = "unknown-ply"; // } // // std::cout << "distances of linear nodes along polyline " << ply_name << @@ -127,7 +127,7 @@ MeshNodesAlongPolyline::MeshNodesAlongPolyline( // std::cout << "number of linear nodes along polyline " << ply_name << ": " << // _dist_of_proj_node_from_ply_start.size() // << ", number of higher order nodes: " << -//msh_node_higher_order_ids.size() << +// msh_node_higher_order_ids.size() << // "\n"; #endif // assign/append higher order nodes at the end of vector _msh_node_ids diff --git a/MSH/msh_elem.cpp b/MSH/msh_elem.cpp index 5842e890f..be1ab8bee 100644 --- a/MSH/msh_elem.cpp +++ b/MSH/msh_elem.cpp @@ -1671,7 +1671,7 @@ void CElem::SetNormalVector() double const* const p0(nodes[0]->getData()); double const* const p1(nodes[1]->getData()); // double const* const p2 (nodes[2]->getData()); // TF unused - //variable + // variable double const* const p3(nodes[3]->getData()); const double v1[3] = {p1[0] - p0[0], p1[1] - p0[1], p1[2] - p0[2]}; const double v2[3] = {p3[0] - p0[0], p3[1] - p0[1], p3[2] - p0[2]}; diff --git a/MSH/msh_lib.cpp b/MSH/msh_lib.cpp index d7e367c42..6b1ccf811 100644 --- a/MSH/msh_lib.cpp +++ b/MSH/msh_lib.cpp @@ -551,7 +551,7 @@ void MSHSelectFreeSurfaceNodes(MeshLib::CFEMesh* m_msh) for (size_t j = 0; j < m_msh->getNumberOfMeshLayers(); j++) { // strang = (long*) - //Realloc(strang,(j+1)*sizeof(long)); + // Realloc(strang,(j+1)*sizeof(long)); strang[j] = nextnode; size_t startnode = nextnode; nextnode = MSHGetNextNode(startnode, m_msh); @@ -611,7 +611,7 @@ void MSHDefineMobile(CRFProcess* m_pcs) //.................................................................... // DOMAIN // if(m_mat_mp->geo_type_name.find("DOMAIN") != - //std::string::npos) + // std::string::npos) if (m_mat_mp->getGeoType() == GEOLIB::GEODOMAIN) { // CGLDomain *m_domain = NULL; diff --git a/MSH/msh_mesh.cpp b/MSH/msh_mesh.cpp index 7a9d398fd..131d8fcae 100644 --- a/MSH/msh_mesh.cpp +++ b/MSH/msh_mesh.cpp @@ -810,8 +810,8 @@ void CFEMesh::ConstructGrid() if (elem->GetElementType() == MshElemType::LINE) continue; // line element // thisElem0->GetNodeIndeces(node_index_glb0); - // const vec& node_index_glb0 (thisElem0->GetNodeIndeces()); // - //compiler said: unused variable // TF + // const vec& node_index_glb0 (thisElem0->GetNodeIndeces()); + //// compiler said: unused variable // TF elem->GetNeighbors(Neighbors0); size_t m0 = elem->GetFacesNumber(); @@ -960,7 +960,7 @@ void CFEMesh::constructMeshGrid() //#ifndef NDEBUG // clock_t end(clock()); // std::cout << "done, took " << (end-start)/(double)(CLOCKS_PER_SEC) << " - //s -- " << std::flush; #endif + // s -- " << std::flush; #endif } /************************************************************************** @@ -1479,11 +1479,11 @@ long CFEMesh::GetNODOnPNT(const GEOLIB::Point* const pnt) const // const size_t nodes_in_usage(static_cast (NodesInUsage())); // double sqr_dist(0.0), distmin(MathLib::sqrDist - //(nod_vector[0]->getData(), pnt->getData())); size_t number(0); for (size_t - //i = 1; i < nodes_in_usage; i++) + //(nod_vector[0]->getData(), pnt->getData())); size_t number(0); for + //(size_t i = 1; i < nodes_in_usage; i++) // { // sqr_dist = MathLib::sqrDist (nod_vector[i]->getData(), - //pnt->getData()); if (sqr_dist < distmin) + // pnt->getData()); if (sqr_dist < distmin) // { // distmin = sqr_dist; // number = i; @@ -1494,10 +1494,10 @@ long CFEMesh::GetNODOnPNT(const GEOLIB::Point* const pnt) const // double const*const data0(nod_vector[node_idx]->getData()); // double const*const data1(nod_vector[number]->getData()); // std::cout << "pnt: "<< *pnt << " mesh grid node " << - //nod_vector[node_idx]->GetIndex() << ": " + // nod_vector[node_idx]->GetIndex() << ": " // << data0[0] << " " << data0[1] << " " << data0[2] << // ", mesh grid node (old algorithm) " << - //nod_vector[number]->GetIndex() << ": " + // nod_vector[number]->GetIndex() << ": " // << data1[0] << " " << data1[1] << " " << data1[2] << "\n"; // std::cout << "bbx: " << _mesh_grid->getMinPoint() << " x " << //_mesh_grid->getMaxPoint() << "\n"; size_t coords[3]; @@ -1505,7 +1505,8 @@ long CFEMesh::GetNODOnPNT(const GEOLIB::Point* const pnt) const // std::cout << "grid coords: " << coords[0] << " " << coords[1] << " " //<< coords[2] << "\n"; double llf[3], urb[3]; // _mesh_grid->getGridCornerPoints(pnt->getData(), llf, urb); - // std::cout << "local bbx: " << llf[0] << " " << llf[1] << " " << llf[2] + // std::cout << "local bbx: " << llf[0] << " " << llf[1] << " " << + // llf[2] //<< " x " << urb[0] << " " << urb[1] //<< " " << urb[2] << "\n"; // } diff --git a/MSHGEOTOOLS/ExtractMeshNodes.cpp b/MSHGEOTOOLS/ExtractMeshNodes.cpp index 134c9bda3..574b1c7c7 100644 --- a/MSHGEOTOOLS/ExtractMeshNodes.cpp +++ b/MSHGEOTOOLS/ExtractMeshNodes.cpp @@ -377,7 +377,8 @@ void ExtractMeshNodes::writeMesh2DNodeIDAndArea(std::ostream& os, n_nodes = 0; gli_out.precision(14); for (std::vector::const_iterator it(node_ids.begin()); - it != node_ids.end(); it++) + it != node_ids.end(); + it++) { double const* const pnt(msh_nodes[*it]->getData()); gli_out << n_nodes + _gli_pnt_offset << " " << std::scientific << pnt[0] @@ -459,7 +460,8 @@ void ExtractMeshNodes::writeMesh2DNodeIDAndArea( n_nodes = 0; gli_out.precision(14); for (std::vector::const_iterator it(node_ids.begin()); - it != node_ids.end(); it++) + it != node_ids.end(); + it++) { double const* const pnt(msh_nodes[*it]->getData()); gli_out << n_nodes + _gli_pnt_offset << " " << std::scientific << pnt[0] diff --git a/MathLib/EarClippingTriangulation.cpp b/MathLib/EarClippingTriangulation.cpp index b9d1019d4..6efe77a32 100644 --- a/MathLib/EarClippingTriangulation.cpp +++ b/MathLib/EarClippingTriangulation.cpp @@ -136,7 +136,8 @@ void EarClippingTriangulation::ensureCWOrientation() bool EarClippingTriangulation::isEar(size_t v0, size_t v1, size_t v2) const { for (std::list::const_iterator it(_vertex_list.begin()); - it != _vertex_list.end(); ++it) + it != _vertex_list.end(); + ++it) if (*it != v0 && *it != v1 && *it != v2) if (isPointInTriangle(_pnts[*it], _pnts[v0], _pnts[v1], _pnts[v2])) return false; diff --git a/MathLib/InterpolationAlgorithms/CubicSpline.cpp b/MathLib/InterpolationAlgorithms/CubicSpline.cpp index 5b273174c..5764ec356 100644 --- a/MathLib/InterpolationAlgorithms/CubicSpline.cpp +++ b/MathLib/InterpolationAlgorithms/CubicSpline.cpp @@ -50,7 +50,7 @@ double CubicSpline::interpolation(double x) const { // 07/2010 TF // val = yy[i] + bb[i] * (x - xx[i]) + cc[i] * pow(x - - //xx[i], 2.0) + // xx[i], 2.0) // + dd[i] * pow(x - xx[i], 3.0); double t(x - xx[i]); // employing Horner-Schema in order to save multiplications diff --git a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp index c27f22f98..7dbf4b295 100644 --- a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp +++ b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp @@ -35,10 +35,11 @@ PiecewiseLinearInterpolation::PiecewiseLinearInterpolation( _values_at_supp_pnts(values_at_supp_pnts) { // std::cout << "PiecewiseLinearInterpolation::PiecewiseLinearInterpolation - //support_points, values_at_supp_pnts: " + // support_points, values_at_supp_pnts: " //<< "\n"; // for (size_t k(0); ksize()); // for (size_t k(0); kisClosed()); // if (!closed) // { - // std::cout << "converting polyline " << k << " to closed polyline" << - //std::endl; GEOLIB::Polygon* polygon(NULL); + // std::cout << "converting polyline " << k << " to closed + // polyline" + //<< std::endl; GEOLIB::Polygon* polygon(NULL); // extract_mesh_nodes.getPolygonFromPolyline(*((*plys)[k]), geo, - //unique_name, polygon); + // unique_name, polygon); //// polylines.push_back (polygon); //// geo->appendPolylineVec (polylines, unique_name); // std::string *polygon_name(new std::string); @@ -158,7 +160,7 @@ int main(int argc, char* argv[]) //*polygon_name); // (*polygon_name) += "-Polygon"; // geo->getPolylineVecObj(unique_name)->push_back(polygon, - //polygon_name); + // polygon_name); //// polylines.clear(); // } // } @@ -182,13 +184,13 @@ int main(int argc, char* argv[]) std::ofstream pnt_out(fname_gli.c_str()); pnt_out << "#POINTS" << std::endl; GEOLIB::Polygon polygon(*((*plys)[k])); - // extract_mesh_nodes.writeMesh2DNodeIDAndArea (out, pnt_out, - //polygon); + // extract_mesh_nodes.writeMesh2DNodeIDAndArea (out, + // pnt_out, polygon); extract_mesh_nodes.writeTopSurfaceMeshNodeIDs(out, pnt_out, polygon); // write all nodes - not only the surface nodes // extract_mesh_nodes.writeMeshNodeIDs (out, pnt_out, - //polygon); + // polygon); pnt_out << "#STOP" << std::endl; out.close(); pnt_out.close(); @@ -211,7 +213,7 @@ int main(int argc, char* argv[]) // } // } // extract_mesh_nodes.writeMesh2DNodeIDAndArea (out, pnt_out, - //GEOLIB::Polygon((*((*plys)[bounding_polygon_id]))), + // GEOLIB::Polygon((*((*plys)[bounding_polygon_id]))), // holes); // for (size_t k(0); kgetData()), max(1, nodes_oct_tree[0]->getData()); // GEOLIB::Point min(nodes_oct_tree[0]->getData()), - //max(nodes_oct_tree[0]->getData()); + // max(nodes_oct_tree[0]->getData()); // determine bounding box for (size_t k(0); k < n_nodes_oct_tree; k++) { @@ -500,12 +500,13 @@ int main(int argc, char* argv[]) testMeshGridAlgorithm(mesh, pnts_for_search, idx_found_nodes_mesh_grid_alg); // std::cout << "compare results of linear algorithm with MeshGrid ... " << - //std::flush; for (size_t k(0); k