diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 252444ea3e2cff9ca4a42a2fc9f6a04580d90bc1..d39ffe5a9fc6532ee19be8e76c5d295a5fc37f91 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -119,7 +119,7 @@ namespace { void readGeometry(std::string const& fname, GeoLib::GEOObjects& geo_objects) { - DBUG("Reading geometry file '{:s}'.", fname.c_str()); + DBUG("Reading geometry file '{:s}'.", fname); GeoLib::IO::BoostXmlGmlInterface gml_reader(geo_objects); gml_reader.readFile(fname); } @@ -130,14 +130,14 @@ std::unique_ptr<MeshLib::Mesh> readSingleMesh( { std::string const mesh_file = BaseLib::copyPathToFileName( mesh_config_parameter.getValue<std::string>(), project_directory); - DBUG("Reading mesh file '{:s}'.", mesh_file.c_str()); + DBUG("Reading mesh file '{:s}'.", mesh_file); auto mesh = std::unique_ptr<MeshLib::Mesh>( MeshLib::IO::readMeshFromFile(mesh_file)); if (!mesh) { OGS_FATAL("Could not read mesh from '{:s}' file. No mesh added.", - mesh_file.c_str()); + mesh_file); } #ifdef DOXYGEN_DOCU_ONLY @@ -231,7 +231,7 @@ boost::optional<ParameterLib::CoordinateSystem> parseLocalCoordinateSystem( OGS_FATAL( "Basis vector parameter '{:s}' must have two or three components, " "but it has {:d}.", - basis_vector_0.name.c_str(), dimension); + basis_vector_0.name, dimension); } // @@ -317,7 +317,7 @@ ProjectData::ProjectData(BaseLib::ConfigTree const& project_config, OGS_FATAL( "The parameter '{:s}' is using the local coordinate system " "but no local coordinate system was provided.", - parameter->name.c_str()); + parameter->name); } parameter->setCoordinateSystem(*_local_coordinate_system); } @@ -379,7 +379,7 @@ void ProjectData::parseProcessVariables( if (!names.insert(pv.getName()).second) { OGS_FATAL("A process variable with name `{:s}' already exists.", - pv.getName().c_str()); + pv.getName()); } _process_variables.push_back(std::move(pv)); @@ -403,8 +403,7 @@ std::vector<std::string> ProjectData::parseParameters( ParameterLib::createParameter(parameter_config, _mesh_vec, _curves); if (!names.insert(p->name).second) { - OGS_FATAL("A parameter with name `{:s}' already exists.", - p->name.c_str()); + OGS_FATAL("A parameter with name `{:s}' already exists.", p->name); } auto const use_local_coordinate_system = @@ -470,7 +469,7 @@ void ProjectData::parseMedia( "Could not parse material ID's from '{:s}'. Please " "separate multiple material ID's by comma only. " "Invalid character: '%c'", - m_id.c_str(), *it); + m_id, *it); } return std::stoi(m_id); }); @@ -955,7 +954,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, else #endif { - OGS_FATAL("Unknown process type: {:s}", type.c_str()); + OGS_FATAL("Unknown process type: {:s}", type); } if (BaseLib::containsIf( @@ -964,7 +963,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, return p->name == name; })) { - OGS_FATAL("The process name '{:s}' is not unique.", name.c_str()); + OGS_FATAL("The process name '{:s}' is not unique.", name); } _processes.push_back(std::move(process)); } diff --git a/Applications/ApplicationsLib/TestDefinition.cpp b/Applications/ApplicationsLib/TestDefinition.cpp index a7fcdc14147b184f1f0c4b680d27648dfa70c52f..ccf454f03d06ad38b10690703c16785984d454e3 100644 --- a/Applications/ApplicationsLib/TestDefinition.cpp +++ b/Applications/ApplicationsLib/TestDefinition.cpp @@ -35,20 +35,19 @@ bool isConvertibleToDouble(std::string const& s) } catch (...) { - OGS_FATAL("The given string '{:s}' is not convertible to double.", - s.c_str()); + OGS_FATAL("The given string '{:s}' is not convertible to double.", s); } if (pos != s.size()) { OGS_FATAL( "Only {:d} characters were used for double conversion of string " "'{:s}'", - pos, s.c_str()); + pos, s); } if (std::isnan(value)) { - OGS_FATAL("The given string '{:s}' results in a NaN value.", s.c_str()); + OGS_FATAL("The given string '{:s}' results in a NaN value.", s); } return true; } @@ -68,7 +67,7 @@ std::string findVtkdiff() std::getenv("VTKDIFF_EXE")) { std::string const vtkdiff_exe{vtkdiff_exe_environment_variable}; - DBUG("VTKDIFF_EXE set to {:s}.", vtkdiff_exe.c_str()); + DBUG("VTKDIFF_EXE set to {:s}.", vtkdiff_exe); // // Sanity checks. @@ -81,7 +80,7 @@ std::string findVtkdiff() OGS_FATAL( "The VTKDIFF_EXE environment variable does not point to " "'vtkdiff'. VTKDIFF_EXE='{:s}'", - vtkdiff_exe.c_str()); + vtkdiff_exe); } } { // vtkdiff must exist. @@ -90,7 +89,7 @@ std::string findVtkdiff() OGS_FATAL( "The VTKDIFF_EXE points to a non-existing file. " "VTKDIFF_EXE='{:s}'", - vtkdiff_exe.c_str()); + vtkdiff_exe); } } @@ -114,7 +113,7 @@ std::string findVtkdiff() "Calling {:s} from the VTKDIFF_EXE environment variable didn't " "work " "as expected. Return value was {:d}.", - vtkdiff_exe.c_str(), return_value); + vtkdiff_exe, return_value); } std::string const vtkdiff_exe{"vtkdiff"}; @@ -162,7 +161,7 @@ TestDefinition::TestDefinition(BaseLib::ConfigTree const& config_tree, std::string const& field_name = //! \ogs_file_param{prj__test_definition__vtkdiff__field} vtkdiff_config.getConfigParameter<std::string>("field"); - DBUG("vtkdiff will compare field '{:s}'.", field_name.c_str()); + DBUG("vtkdiff will compare field '{:s}'.", field_name); #ifdef USE_PETSC int rank; @@ -196,7 +195,7 @@ TestDefinition::TestDefinition(BaseLib::ConfigTree const& config_tree, OGS_FATAL( "The absolute tolerance value '{:s}' is not convertible to " "double.", - absolute_tolerance.c_str()); + absolute_tolerance); } std::string const absolute_tolerance_parameter = "--abs " + absolute_tolerance; @@ -211,7 +210,7 @@ TestDefinition::TestDefinition(BaseLib::ConfigTree const& config_tree, OGS_FATAL( "The relative tolerance value '{:s}' is not convertible to " "double.", - relative_tolerance.c_str()); + relative_tolerance); } std::string const relative_tolerance_parameter = "--rel " + relative_tolerance; @@ -224,7 +223,7 @@ TestDefinition::TestDefinition(BaseLib::ConfigTree const& config_tree, safeString(field_name) + " " + safeString(reference_filename) + " " + safeString(output_filename) + " " + absolute_tolerance_parameter + " " + relative_tolerance_parameter; - INFO("Will run '{:s}'", command_line.c_str()); + INFO("Will run '{:s}'", command_line); _command_lines.emplace_back(std::move(command_line)); } } @@ -239,7 +238,7 @@ bool TestDefinition::runTests() const if (return_value != 0) { WARN("Return value {:d} was returned by '{:s}'.", - return_value, command_line.c_str()); + return_value, command_line); } return return_value; }); diff --git a/Applications/DataExplorer/DataView/DataExplorerSettingsDialog.cpp b/Applications/DataExplorer/DataView/DataExplorerSettingsDialog.cpp index 135088a8892ba17d16765896e9cc70dfcc80dceb..77698adff5fffde973fe773d29fe12d8aa45f68a 100644 --- a/Applications/DataExplorer/DataView/DataExplorerSettingsDialog.cpp +++ b/Applications/DataExplorer/DataView/DataExplorerSettingsDialog.cpp @@ -17,7 +17,6 @@ #include <QFileDialog> #include <QSettings> -#include "BaseLib/Logging.h" #include "OGSError.h" diff --git a/Applications/DataExplorer/DataView/GEOModels.cpp b/Applications/DataExplorer/DataView/GEOModels.cpp index 77dca677f6b3963899bdcc00e501ca9a1b5d8b74..a98999944c32c817a03624ca3672a6a1f460861b 100644 --- a/Applications/DataExplorer/DataView/GEOModels.cpp +++ b/Applications/DataExplorer/DataView/GEOModels.cpp @@ -71,7 +71,7 @@ void GEOModels::updateGeometry(const std::string &geo_name) } else ERR("GEOModels::updateGeometry() - Geometry '{:s}' not found.", - geo_name.c_str()); + geo_name); } void GEOModels::removeGeometry(std::string const& geo_name, @@ -251,7 +251,7 @@ void GEOModels::addNameForElement(std::string const& geometry_name, } else ERR("GEOModels::addNameForElement() - Unknown GEOTYPE {:s}.", - GeoLib::convertGeoTypeToString(object_type).c_str()); + GeoLib::convertGeoTypeToString(object_type)); } void GEOModels::addNameForObjectPoints(const std::string &geometry_name, @@ -291,5 +291,5 @@ void GEOModels::addNameForObjectPoints(const std::string &geometry_name, } else ERR("GEOModels::addNameForObjectPoints() - Unknown GEOTYPE {:s}.", - GeoLib::convertGeoTypeToString(object_type).c_str()); + GeoLib::convertGeoTypeToString(object_type)); } diff --git a/Applications/DataExplorer/DataView/GeoOnMeshMappingDialog.cpp b/Applications/DataExplorer/DataView/GeoOnMeshMappingDialog.cpp index 0b0a506ab74ba2f43ecea2b7ba72df0293d2b1fa..6a2296ded164227826fb363d579b7b15625aefc6 100644 --- a/Applications/DataExplorer/DataView/GeoOnMeshMappingDialog.cpp +++ b/Applications/DataExplorer/DataView/GeoOnMeshMappingDialog.cpp @@ -15,7 +15,6 @@ #include "GeoOnMeshMappingDialog.h" #include "Mesh.h" -#include "BaseLib/Logging.h" #include "OGSError.h" diff --git a/Applications/DataExplorer/DataView/GeoTreeModel.cpp b/Applications/DataExplorer/DataView/GeoTreeModel.cpp index f22a2418fb290fc335e8861b872a75616f802f9c..f99d8d675fb64140ace0d233ea8a4c64533c6857 100644 --- a/Applications/DataExplorer/DataView/GeoTreeModel.cpp +++ b/Applications/DataExplorer/DataView/GeoTreeModel.cpp @@ -78,8 +78,8 @@ void GeoTreeModel::addPointList(QString geoName, GeoLib::PointVec const& pointVe ->setData(4, QString::fromStdString(pnt->first))); } - INFO("Geometry '{:s}' built. {:d} points added.", - geoName.toStdString().c_str(), nPoints); + INFO("Geometry '{:s}' built. {:d} points added.", geoName.toStdString(), + nPoints); endResetModel(); } @@ -102,7 +102,7 @@ void GeoTreeModel::addPolylineList(QString geoName, GeoLib::PolylineVec const& p { ERR("GeoTreeModel::addPolylineList(): No corresponding geometry for " "'{:s}' found.", - geoName.toStdString().c_str()); + geoName.toStdString()); return; } @@ -203,7 +203,7 @@ void GeoTreeModel::addSurfaceList(QString geoName, GeoLib::SurfaceVec const& sur { ERR("GeoTreeModel::addSurfaceList(): No corresponding geometry for " "'{:s}' found.", - geoName.toStdString().c_str()); + geoName.toStdString()); return; } @@ -316,7 +316,7 @@ void GeoTreeModel::renameGeometry(std::string const& old_name, { if (new_name == tree_item_entry->data(0).toString().toStdString()) { - INFO("Found tree_item_entry with name '{:s}'.", new_name.c_str()); + INFO("Found tree_item_entry with name '{:s}'.", new_name); } } } diff --git a/Applications/DataExplorer/DataView/MeshAnalysisDialog.cpp b/Applications/DataExplorer/DataView/MeshAnalysisDialog.cpp index 0df2ceb519e605a3114f0993e3828d887913b9d3..2e1c368239a317a29f1c08fb2219e365135f54dd 100644 --- a/Applications/DataExplorer/DataView/MeshAnalysisDialog.cpp +++ b/Applications/DataExplorer/DataView/MeshAnalysisDialog.cpp @@ -20,7 +20,6 @@ #include "StrictDoubleValidator.h" -#include "BaseLib/Logging.h" MeshAnalysisDialog::MeshAnalysisDialog( std::vector<std::unique_ptr<MeshLib::Mesh>> const& mesh_vec, diff --git a/Applications/DataExplorer/DataView/MeshModel.cpp b/Applications/DataExplorer/DataView/MeshModel.cpp index 6aeaf947a437cc74b3b7f2a0cf1d4836274bdc51..f995533b7d1495f3121cc298f934427d3c4d982c 100644 --- a/Applications/DataExplorer/DataView/MeshModel.cpp +++ b/Applications/DataExplorer/DataView/MeshModel.cpp @@ -65,7 +65,7 @@ void MeshModel::addMeshObject(const MeshLib::Mesh* mesh) { beginResetModel(); - INFO("name: {:s}", mesh->getName().c_str()); + INFO("name: {:s}", mesh->getName()); QVariant const display_name (QString::fromStdString(mesh->getName())); QList<QVariant> meshData; meshData << display_name << "" << ""; @@ -115,8 +115,7 @@ const MeshLib::Mesh* MeshModel::getMesh(const std::string &name) const } } - INFO("MeshModel::getMesh(): No entry found with name \"{:s}\".", - name.c_str()); + INFO("MeshModel::getMesh(): No entry found with name \"{:s}\".", name); return nullptr; } @@ -149,8 +148,7 @@ bool MeshModel::removeMesh(const std::string &name) } } - INFO("MeshModel::removeMesh(): No entry found with name \"{:s}\".", - name.c_str()); + INFO("MeshModel::removeMesh(): No entry found with name \"{:s}\".", name); return false; } @@ -216,7 +214,6 @@ vtkUnstructuredGridAlgorithm* MeshModel::vtkSource(const std::string &name) cons } } - INFO("MeshModel::vtkSource(): No entry found with name \"{:s}\".", - name.c_str()); + INFO("MeshModel::vtkSource(): No entry found with name \"{:s}\".", name); return nullptr; } diff --git a/Applications/DataExplorer/DataView/ProcessModel.cpp b/Applications/DataExplorer/DataView/ProcessModel.cpp index 2a5738fbbb908dbe8365a205661319c6ff37e75f..b52ee1cb76adcc8f57079eaa409eedee085ae646 100644 --- a/Applications/DataExplorer/DataView/ProcessModel.cpp +++ b/Applications/DataExplorer/DataView/ProcessModel.cpp @@ -15,7 +15,6 @@ #include <QFileInfo> #include "Applications/DataHolderLib/FemCondition.h" -#include "BaseLib/Logging.h" #include "CondItem.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/GeoObject.h" diff --git a/Applications/DataExplorer/DataView/SaveMeshDialog.cpp b/Applications/DataExplorer/DataView/SaveMeshDialog.cpp index 345d9b5c6f220e64ef3b1adcfb6fa9368447e6b1..9df5fca9fa16e7bdbe5cd7901996ee9f3aa8ee5e 100644 --- a/Applications/DataExplorer/DataView/SaveMeshDialog.cpp +++ b/Applications/DataExplorer/DataView/SaveMeshDialog.cpp @@ -17,7 +17,6 @@ #include <QFileDialog> #include <QSettings> -#include "BaseLib/Logging.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "MeshLib/IO/Legacy/MeshIO.h" diff --git a/Applications/DataExplorer/DataView/StationTreeModel.cpp b/Applications/DataExplorer/DataView/StationTreeModel.cpp index dd7a40ab23d26650c818fd07570ef315d7e9354b..c3ccb786830c0b5a11a7b90e3b6818a31f0d4b21 100644 --- a/Applications/DataExplorer/DataView/StationTreeModel.cpp +++ b/Applications/DataExplorer/DataView/StationTreeModel.cpp @@ -14,7 +14,6 @@ #include "StationTreeModel.h" -#include "BaseLib/Logging.h" #include "BaseItem.h" #include "OGSError.h" diff --git a/Applications/DataExplorer/VtkVis/VtkAddFilterDialog.cpp b/Applications/DataExplorer/VtkVis/VtkAddFilterDialog.cpp index 6a39bc2d8cd63bcb6eb6d9ded30d0422450ae92b..39f2d6cb52cea1e8ae8af9e001f83c26675dc028 100644 --- a/Applications/DataExplorer/VtkVis/VtkAddFilterDialog.cpp +++ b/Applications/DataExplorer/VtkVis/VtkAddFilterDialog.cpp @@ -114,7 +114,7 @@ void VtkAddFilterDialog::on_buttonBox_accepted() else { ERR("VtkFilterFactory cannot create {:s}.", - filterName.toStdString().c_str()); + filterName.toStdString()); return; } } diff --git a/Applications/DataExplorer/VtkVis/VtkAlgorithmProperties.cpp b/Applications/DataExplorer/VtkVis/VtkAlgorithmProperties.cpp index 30641b492d636ac72305bd1c87d62d21ecda881d..dc572c4239f29c0279d1ad115a2e355c233771fb 100644 --- a/Applications/DataExplorer/VtkVis/VtkAlgorithmProperties.cpp +++ b/Applications/DataExplorer/VtkVis/VtkAlgorithmProperties.cpp @@ -111,7 +111,7 @@ QVariant VtkAlgorithmProperties::GetUserProperty(QString name) const return this->_algorithmUserProperties->value(name); } - ERR("Not a valid property: {:s}", name.toStdString().c_str()); + ERR("Not a valid property: {:s}", name.toStdString()); return QVariant(); } @@ -122,7 +122,7 @@ QList<QVariant> VtkAlgorithmProperties::GetUserVectorProperty(QString name) cons return this->_algorithmUserVectorProperties->value(name); } - ERR("Not a valid property: {:s}", name.toStdString().c_str()); + ERR("Not a valid property: {:s}", name.toStdString()); return QList<QVariant>(); } diff --git a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp index 00e7535337dd741238d9c4a799e44f7e2a29cf71..4d332370f6f5bcc4475cb457e5a3c99dd3dc3831 100644 --- a/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp +++ b/Applications/DataExplorer/VtkVis/VtkColorLookupTable.cpp @@ -149,7 +149,7 @@ void VtkColorLookupTable::writeToFile(const std::string &filename) } strout << " done." << std::endl; - INFO("{:s}", strout.str().c_str()); + INFO("{:s}", strout.str()); out.close(); } diff --git a/Applications/DataExplorer/VtkVis/VtkRaster.cpp b/Applications/DataExplorer/VtkVis/VtkRaster.cpp index 592cea37641c7981d956bf5cdc3e2aa074451f79..0426b6b00df1a7af4ee8a6d68edcb5224a827eac 100644 --- a/Applications/DataExplorer/VtkVis/VtkRaster.cpp +++ b/Applications/DataExplorer/VtkVis/VtkRaster.cpp @@ -344,8 +344,7 @@ bool VtkRaster::readWorldFile(std::string const& filename, std::ifstream in(world_file.c_str()); if (!in.is_open()) { - ERR("VtkRaster::readWorldFile(): Could not open file {:s}.", - filename.c_str()); + ERR("VtkRaster::readWorldFile(): Could not open file {:s}.", filename); return false; } diff --git a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp index 0324a0ba4f722d8ff9ff03a22102c5df4a3f793e..8576b97f9a3841ae4b0ca7eb191477f7b0661e7b 100644 --- a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp +++ b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp @@ -235,7 +235,7 @@ std::size_t VtkStationSource::GetIndexByName( std::string const& name ) } vtkIdType new_index = (_id_map.empty()) ? 0 : (max_key+1); - INFO("Key '{:s}' has been assigned index {:d}.", name.c_str(), new_index); + INFO("Key '{:s}' has been assigned index {:d}.", name, new_index); _id_map.insert(std::pair<std::string, vtkIdType>(name, new_index)); return new_index; } diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp b/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp index ff323044c9fff31a15ee3ceeb3deb3f02cde652d..7dcf9fb86551ee22edb962c9f6f5390a15f31f7f 100644 --- a/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp +++ b/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp @@ -178,7 +178,7 @@ void VtkVisPipeline::loadFromFile(QString filename) #ifndef NDEBUG QTime myTimer; myTimer.start(); - INFO("VTK Read: {:s}.", filename.toStdString().c_str()); + INFO("VTK Read: {:s}.", filename.toStdString()); #endif if (filename.size() > 0) diff --git a/Applications/DataExplorer/main.cpp b/Applications/DataExplorer/main.cpp index 6e96e570563966ce3a90cbd95ead434f2db6fd1c..c229736a7b9d33c23870f8e190822d42f3bda81b 100644 --- a/Applications/DataExplorer/main.cpp +++ b/Applications/DataExplorer/main.cpp @@ -4,7 +4,6 @@ #include <QSurfaceFormat> #include <QVTKOpenGLWidget.h> #include <memory> -#include "BaseLib/Logging.h" #ifdef VTKFBXCONVERTER_FOUND #include <fbxsdk.h> @@ -16,7 +15,6 @@ FbxScene* lScene = nullptr; #include <vtkSmartPointer.h> #include "InfoLib/GitInfo.h" -#include "BaseLib/Logging.h" #include "VtkVis/VtkConsoleOutputWindow.h" int main(int argc, char* argv[]) diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index d609239d3910c049e457edf29c28613c8812c8c5..f10af35ac684e648d73554056b3aace139e177bd 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -1130,7 +1130,7 @@ void MainWindow::callGMSH(std::vector<std::string> & selectedGeometries, remove_command = "del "; #endif remove_command += fileName.toStdString(); - INFO("remove command: {:s}", remove_command.c_str()); + INFO("remove command: {:s}", remove_command); auto const return_value = system(remove_command.c_str()); if (return_value != 0) { diff --git a/Applications/DataHolderLib/Color.cpp b/Applications/DataHolderLib/Color.cpp index 7feeba80fa3dceba2f1ef1202d242baa2f736142..392bb313c7ac89cc90810e619b3f6702bee98b17 100644 --- a/Applications/DataHolderLib/Color.cpp +++ b/Applications/DataHolderLib/Color.cpp @@ -36,7 +36,7 @@ Color getColor(const std::string& id, std::map<std::string, Color>& colors) if (it == end(colors)) { - WARN("Key '{:s}' not found in color lookup table.", id.c_str()); + WARN("Key '{:s}' not found in color lookup table.", id); it = colors.insert({id, getRandomColor()}).first; } diff --git a/Applications/DataHolderLib/Project.cpp b/Applications/DataHolderLib/Project.cpp index a090d0e2be5147bb9f007ac25f6eb493e0d5b706..0e7fa62fee873d02f3e30aed80ac7b7dad515675 100644 --- a/Applications/DataHolderLib/Project.cpp +++ b/Applications/DataHolderLib/Project.cpp @@ -11,7 +11,6 @@ #include "Project.h" #include <algorithm> -#include "BaseLib/Logging.h" #include "BaseLib/Algorithm.h" #include "BaseLib/FileTools.h" diff --git a/Applications/FileIO/AsciiRasterInterface.cpp b/Applications/FileIO/AsciiRasterInterface.cpp index 7dbf9aff0e226e188092f8333c4b644f517dd4b5..e955fa28729fc8dad6c72f2a591117e513b3bc84 100644 --- a/Applications/FileIO/AsciiRasterInterface.cpp +++ b/Applications/FileIO/AsciiRasterInterface.cpp @@ -45,7 +45,7 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromASCFile(std::string const& fn if (!in.is_open()) { WARN("Raster::getRasterFromASCFile(): Could not open file {:s}.", - fname.c_str()); + fname); return nullptr; } @@ -70,7 +70,7 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromASCFile(std::string const& fn return raster; } WARN("Raster::getRasterFromASCFile(): Could not read header of file {:s}", - fname.c_str()); + fname); return nullptr; } @@ -161,7 +161,7 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromSurferFile(std::string const& if (!in.is_open()) { ERR("Raster::getRasterFromSurferFile() - Could not open file {:s}", - fname.c_str()); + fname); return nullptr; } @@ -194,7 +194,7 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromSurferFile(std::string const& return raster; } ERR("Raster::getRasterFromASCFile() - could not read header of file {:s}", - fname.c_str()); + fname); return nullptr; } diff --git a/Applications/FileIO/CsvInterface.cpp b/Applications/FileIO/CsvInterface.cpp index f81125650e504b117f9c49a1a0459d334119e868..62ee47902bdb17f6bb925f2d35ccc5ff463fb136 100644 --- a/Applications/FileIO/CsvInterface.cpp +++ b/Applications/FileIO/CsvInterface.cpp @@ -29,8 +29,7 @@ std::vector<std::string> CsvInterface::getColumnNames(std::string const& fname, if (!in.is_open()) { - ERR("CsvInterface::readPoints(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readPoints(): Could not open file {:s}.", fname); return std::vector<std::string>(); } std::string line; @@ -65,8 +64,7 @@ int CsvInterface::readPoints(std::string const& fname, char delim, std::ifstream in(fname.c_str()); if (!in.is_open()) { - ERR("CsvInterface::readPoints(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readPoints(): Could not open file {:s}.", fname); return -1; } @@ -114,8 +112,7 @@ int CsvInterface::readPoints(std::string const& fname, char delim, std::array<std::string, 3> const column_names = {{x_column_name, y_column_name, z_column_name}}; if (!in.is_open()) { - ERR("CsvInterface::readPoints(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readPoints(): Could not open file {:s}.", fname); return -1; } @@ -131,8 +128,7 @@ int CsvInterface::readPoints(std::string const& fname, char delim, { if (column_idx[i] == std::numeric_limits<std::size_t>::max()) { - ERR("Column '{:s}' not found in file header.", - column_names[i].c_str()); + ERR("Column '{:s}' not found in file header.", column_names[i]); return -1; } } @@ -149,8 +145,7 @@ int CsvInterface::readPoints(std::string const& fname, char delim, std::ifstream in(fname.c_str()); if (!in.is_open()) { - ERR("CsvInterface::readPoints(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readPoints(): Could not open file {:s}.", fname); return -1; } diff --git a/Applications/FileIO/CsvInterface.h b/Applications/FileIO/CsvInterface.h index 069942d74aef039ab48ae0cb04191c424aa3ab57..bb057fb42f7b240dcdcd133fd736ff240e8e12aa 100644 --- a/Applications/FileIO/CsvInterface.h +++ b/Applications/FileIO/CsvInterface.h @@ -155,8 +155,7 @@ public: { std::ifstream in(fname.c_str()); if (!in.is_open()) { - ERR("CsvInterface::readColumn(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readColumn(): Could not open file {:s}.", fname); return -1; } @@ -165,7 +164,7 @@ public: std::size_t const column_idx = CsvInterface::findColumn(line, delim, column_name); if (column_idx == std::numeric_limits<std::size_t>::max()) { - ERR("Column '{:s}' not found in file header.", column_name.c_str()); + ERR("Column '{:s}' not found in file header.", column_name); return -1; } return readColumn<T>(in, delim, data_array, column_idx); @@ -178,8 +177,7 @@ public: { std::ifstream in(fname.c_str()); if (!in.is_open()) { - ERR("CsvInterface::readColumn(): Could not open file {:s}.", - fname.c_str()); + ERR("CsvInterface::readColumn(): Could not open file {:s}.", fname); return -1; } return readColumn<T>(in, delim, data_array, column_idx); diff --git a/Applications/FileIO/FEFLOW/FEFLOWGeoInterface.cpp b/Applications/FileIO/FEFLOW/FEFLOWGeoInterface.cpp index 9c5174961fcab355aaedb207ebc2767680ad6caf..f89bde4db7c6f5e04cd6b1dc126c93e2369571df 100644 --- a/Applications/FileIO/FEFLOW/FEFLOWGeoInterface.cpp +++ b/Applications/FileIO/FEFLOW/FEFLOWGeoInterface.cpp @@ -35,7 +35,7 @@ void FEFLOWGeoInterface::readFEFLOWFile(const std::string& filename, if (!in) { ERR("FEFLOWGeoInterface::readFEFLOWFile(): Could not open file {:s}.", - filename.c_str()); + filename); return; } diff --git a/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp b/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp index 273c94078a3ae8c674e436c85dbc4db5bd66dd9c..67630e67782b7bdaca41113a619daea706e8257e 100644 --- a/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp +++ b/Applications/FileIO/FEFLOW/FEFLOWMeshInterface.cpp @@ -34,7 +34,7 @@ MeshLib::Mesh* FEFLOWMeshInterface::readFEFLOWFile(const std::string& filename) if (!in) { ERR("FEFLOWMeshInterface::readFEFLOWFile(): Could not open file {:s}.", - filename.c_str()); + filename); return nullptr; } diff --git a/Applications/FileIO/GMSInterface.cpp b/Applications/FileIO/GMSInterface.cpp index cb9a9e165fab5ea2feab00f88c135f0dc6d411b5..032dce2872af0d58ea89301ee5fd97f786488267 100644 --- a/Applications/FileIO/GMSInterface.cpp +++ b/Applications/FileIO/GMSInterface.cpp @@ -51,7 +51,7 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes, if (!in.is_open()) { ERR("GMSInterface::readBoreholeFromGMS(): Could not open file {:s}.", - filename.c_str()); + filename); return 0; } @@ -93,7 +93,7 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes, WARN( "GMSInterface::readBoreholeFromGMS(): Skipped layer " "'{:s}' in borehole '{:s}' because of thickness 0.0.", - sName.c_str(), cName.c_str()); + sName, cName); } else // add new borehole { @@ -187,7 +187,7 @@ MeshLib::Mesh* GMSInterface::readGMS3DMMesh(const std::string& filename) if (!in.is_open()) { ERR("GMSInterface::readGMS3DMMesh(): Could not open file {:s}.", - filename.c_str()); + filename); return nullptr; } @@ -284,7 +284,7 @@ MeshLib::Mesh* GMSInterface::readGMS3DMMesh(const std::string& filename) WARN( "GMSInterface::readGMS3DMMesh() - Element type '{:s}' not " "recognised.", - element_id.c_str()); + element_id); return nullptr; } } diff --git a/Applications/FileIO/Gmsh/GmshReader.cpp b/Applications/FileIO/Gmsh/GmshReader.cpp index 8d415c5e8d473da07a8739a95ea0c6c7f3b66b30..34468a78a62c3836beddf840751d333d1f564f84 100644 --- a/Applications/FileIO/Gmsh/GmshReader.cpp +++ b/Applications/FileIO/Gmsh/GmshReader.cpp @@ -39,7 +39,7 @@ bool isGMSHMeshFile(const std::string& fname) std::ifstream input(fname.c_str()); if (!input) { - ERR("isGMSHMeshFile(): Could not open file {:s}.", fname.c_str()); + ERR("isGMSHMeshFile(): Could not open file {:s}.", fname); return false; } @@ -50,8 +50,7 @@ bool isGMSHMeshFile(const std::string& fname) std::string version; getline(input, version); getline(input, version); - INFO("isGMSHMeshFile(): Found GMSH mesh file version: {:s}.", - version.c_str()); + INFO("isGMSHMeshFile(): Found GMSH mesh file version: {:s}.", version); input.close(); return true; } @@ -168,7 +167,7 @@ MeshLib::Mesh* readGMSHMesh(std::string const& fname) std::ifstream in(fname.c_str(), std::ios::in); if (!in.is_open()) { - WARN("readGMSHMesh() - Could not open file {:s}.", fname.c_str()); + WARN("readGMSHMesh() - Could not open file {:s}.", fname); return nullptr; } @@ -183,8 +182,7 @@ MeshLib::Mesh* readGMSHMesh(std::string const& fname) getline(in, line); // version-number file-type data-size if (line.substr(0, 3) != "2.2") { - WARN("Wrong gmsh file format version '{:s}'.", - line.substr(0, 3).c_str()); + WARN("Wrong gmsh file format version '{:s}'.", line.substr(0, 3)); return nullptr; } diff --git a/Applications/FileIO/GocadIO/CoordinateSystem.cpp b/Applications/FileIO/GocadIO/CoordinateSystem.cpp index b314c28ee5dad00d381ce31aa1d493f95451c40b..05e874daec8037a53b837a6a72c2ef2427a5673e 100644 --- a/Applications/FileIO/GocadIO/CoordinateSystem.cpp +++ b/Applications/FileIO/GocadIO/CoordinateSystem.cpp @@ -101,7 +101,7 @@ bool CoordinateSystem::parse(std::istream& in) } else WARN("CoordinateSystem::parse() - Unknown keyword found: {:s}", - line.c_str()); + line); } ERR ("Error: Unexpected end of file."); return false; diff --git a/Applications/FileIO/GocadIO/GenerateFaceSetMeshes.cpp b/Applications/FileIO/GocadIO/GenerateFaceSetMeshes.cpp index f69ae0feed64334434a3c2e761c6592c876aad43..f8dcd1bf9fb0d5ded0448edb4db94700bb195d3a 100644 --- a/Applications/FileIO/GocadIO/GenerateFaceSetMeshes.cpp +++ b/Applications/FileIO/GocadIO/GenerateFaceSetMeshes.cpp @@ -31,7 +31,7 @@ void generateFaceSets(GocadSGridReader const& reader, std::string const& path) face_set->getNumberOfElements()); std::string const mesh_out_fname(path + face_set->getName() + ".vtu"); - INFO("Writing face set mesh to '{:s}'.", mesh_out_fname.c_str()); + INFO("Writing face set mesh to '{:s}'.", mesh_out_fname); MeshLib::IO::writeMeshToFile(*face_set, mesh_out_fname); } } diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp index 7dc709fcf57007b824f2fe42a55cba1704e4963d..a0f020830f49bd62a6db7019a65787063d911028 100644 --- a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp +++ b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp @@ -89,7 +89,7 @@ bool skipToEND(std::ifstream& in) return true; } } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -150,7 +150,7 @@ bool parseHeader(std::ifstream& in, std::string& mesh_name) } // ignore all other header parameters } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -166,7 +166,7 @@ bool parsePropertyClass(std::ifstream& in) return true; } } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -237,7 +237,7 @@ bool parseProperties(std::ifstream& in, // Remember current position in case the properties black ends now. pos = in.tellg(); } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -284,7 +284,7 @@ bool parseNodes(std::ifstream& in, line.substr(0, 4) == "ATOM")) { WARN("GocadAsciiReader::parseNodes() - Unknown keyword found: {:s}", - line.c_str()); + line); continue; } @@ -321,7 +321,7 @@ bool parseNodes(std::ifstream& in, node_id_map[nodes.back()->getID()] = nodes.size() - 1; pos = in.tellg(); } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -376,7 +376,7 @@ bool parseLineSegments(std::ifstream& in, } pos = in.tellg(); } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -410,9 +410,9 @@ bool parseLine(std::ifstream& in, return true; } WARN("GocadAsciiReader::parseLine() - Unknown keyword found: {:s}", - line.c_str()); + line); } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -467,7 +467,7 @@ bool parseElements(std::ifstream& in, } pos = in.tellg(); } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -513,10 +513,10 @@ bool parseSurface(std::ifstream& in, WARN( "GocadAsciiReader::parseSurface() - Unknown keyword found: " "{:s}", - line.c_str()); + line); } } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return false; } @@ -529,8 +529,7 @@ MeshLib::Mesh* createMesh(std::ifstream& in, DataType type, std::vector<MeshLib::Node*> nodes; std::vector<MeshLib::Element*> elems; std::map<std::size_t, std::size_t> node_id_map; - INFO("Parsing {:s} {:s}.", dataType2ShortString(type).c_str(), - mesh_name.c_str()); + INFO("Parsing {:s} {:s}.", dataType2ShortString(type), mesh_name); bool return_val; return_val = parser(in, nodes, elems, node_id_map, mesh_prop); @@ -538,8 +537,7 @@ MeshLib::Mesh* createMesh(std::ifstream& in, DataType type, { return new MeshLib::Mesh(mesh_name, nodes, elems, mesh_prop); } - ERR("Error parsing {:s} {:s}.", dataType2ShortString(type).c_str(), - mesh_name.c_str()); + ERR("Error parsing {:s} {:s}.", dataType2ShortString(type), mesh_name); clearData(nodes, elems); return nullptr; } @@ -607,10 +605,10 @@ MeshLib::Mesh* readData(std::ifstream& in, else { WARN("GocadAsciiReader::readData() - Unknown keyword found: {:s}", - line.c_str()); + line); } } - ERR("{:s}", eof_error.c_str()); + ERR("{:s}", eof_error); return nullptr; } @@ -618,11 +616,11 @@ bool readFile(std::string const& file_name, std::vector<std::unique_ptr<MeshLib::Mesh>>& meshes, DataType const export_type) { - std::ifstream in(file_name.c_str()); + std::ifstream in(file_name); if (!in.is_open()) { ERR("GocadAsciiReader::readFile(): Could not open file {:s}.", - file_name.c_str()); + file_name); return false; } @@ -641,7 +639,7 @@ bool readFile(std::string const& file_name, { ERR("Parsing of type {:s} is not implemented. Skipping " "section.", - dataType2String(type).c_str()); + dataType2String(type)); return false; } continue; diff --git a/Applications/FileIO/GocadIO/GocadSGridReader.cpp b/Applications/FileIO/GocadIO/GocadSGridReader.cpp index b7787bc7d28bd0aabfc55124604c200a24b6e6d4..9b5d4f5f12e1c3d9be11537a8bba4bd92f748847 100644 --- a/Applications/FileIO/GocadIO/GocadSGridReader.cpp +++ b/Applications/FileIO/GocadIO/GocadSGridReader.cpp @@ -38,7 +38,7 @@ GocadSGridReader::GocadSGridReader(std::string const& fname) std::ifstream in(_fname.c_str()); if (!in) { - ERR("Could not open '{:s}'.", _fname.c_str()); + ERR("Could not open '{:s}'.", _fname); in.close(); return; } @@ -131,20 +131,20 @@ GocadSGridReader::GocadSGridReader(std::string const& fname) regions_ss << regions.size() << " regions read:\n"; std::copy(regions.begin(), regions.end(), std::ostream_iterator<Gocad::Region>(regions_ss, "\t")); - DBUG("{:s}", regions_ss.str().c_str()); + DBUG("{:s}", regions_ss.str()); std::stringstream layers_ss; layers_ss << layers.size() << " layers read:\n"; std::copy(layers.begin(), layers.end(), std::ostream_iterator<Gocad::Layer>(layers_ss, "\n")); - DBUG("{:s}", layers_ss.str().c_str()); + DBUG("{:s}", layers_ss.str()); std::stringstream properties_ss; properties_ss << "meta data for " << _property_meta_data_vecs.size() << " properties read:\n"; std::copy(_property_meta_data_vecs.begin(), _property_meta_data_vecs.end(), std::ostream_iterator<Gocad::Property>(properties_ss, "\n")); - DBUG("{:s}", properties_ss.str().c_str()); + DBUG("{:s}", properties_ss.str()); #endif // if not done already read the points @@ -204,14 +204,14 @@ void GocadSGridReader::addGocadPropertiesToMesh(MeshLib::Mesh& mesh) const continue; } - DBUG("Adding Gocad property '{:s}' with {:d} values.", name.c_str(), + DBUG("Adding Gocad property '{:s}' with {:d} values.", name, prop->_property_data.size()); auto pv = MeshLib::getOrCreateMeshProperty<double>( mesh, name, MeshLib::MeshItemType::Cell, 1); if (pv == nullptr) { - ERR("Could not create mesh property '{:s}'.", name.c_str()); + ERR("Could not create mesh property '{:s}'.", name); continue; } @@ -403,7 +403,7 @@ void GocadSGridReader::readNodesBinary() std::ifstream in(_pnts_fname.c_str(), std::ios::binary); if (!in) { - ERR("Could not open points file '{:s}'.", _pnts_fname.c_str()); + ERR("Could not open points file '{:s}'.", _pnts_fname); throw std::runtime_error("Could not open points file."); } @@ -488,15 +488,12 @@ void GocadSGridReader::mapRegionFlagsToCellProperties( void GocadSGridReader::readElementPropertiesBinary() { - for (auto prop_it(_property_meta_data_vecs.begin()); - prop_it != _property_meta_data_vecs.end(); - prop_it++) + for (auto& property : _property_meta_data_vecs) { - std::string const& fname(prop_it->_property_data_fname); - if (prop_it->_property_data_fname.empty()) + std::string const& fname(property._property_data_fname); + if (property._property_data_fname.empty()) { - WARN("Empty filename for property {:s}.", - prop_it->_property_name.c_str()); + WARN("Empty filename for property {:s}.", property._property_name); continue; } std::vector<float> float_properties = @@ -511,13 +508,12 @@ void GocadSGridReader::readElementPropertiesBinary() return BaseLib::swapEndianness(val); }); - prop_it->_property_data.resize(float_properties.size()); + property._property_data.resize(float_properties.size()); std::copy(float_properties.begin(), float_properties.end(), - prop_it->_property_data.begin()); - if (prop_it->_property_data.empty()) + property._property_data.begin()); + if (property._property_data.empty()) { - ERR("Reading of element properties file '{:s}' failed.", - fname.c_str()); + ERR("Reading of element properties file '{:s}' failed.", fname); } } } @@ -530,7 +526,7 @@ std::vector<Bitset> GocadSGridReader::readRegionFlagsBinary() const if (!in) { ERR("readRegionFlagsBinary(): Could not open file '{:s}' for input.\n", - _region_flags_fname.c_str()); + _region_flags_fname); in.close(); return result; } @@ -585,7 +581,7 @@ void GocadSGridReader::readSplitInformation() std::ifstream in(_fname.c_str()); if (!in) { - ERR("Could not open '{:s}'.", _fname.c_str()); + ERR("Could not open '{:s}'.", _fname); in.close(); return; } diff --git a/Applications/FileIO/Legacy/OGSIOVer4.cpp b/Applications/FileIO/Legacy/OGSIOVer4.cpp index 16022edd32a8e81e1da589b97ce9280f905fe88e..bc7fa4b6b0e89377654dc4a590d79ac90100ddaf 100644 --- a/Applications/FileIO/Legacy/OGSIOVer4.cpp +++ b/Applications/FileIO/Legacy/OGSIOVer4.cpp @@ -124,7 +124,7 @@ void readPolylinePointVector(const std::string &fname, std::ifstream in((path + fname).c_str()); if (!in) { WARN("readPolylinePointVector(): error opening stream from {:s}", - fname.c_str()); + fname); errors.push_back ("[readPolylinePointVector] error opening stream from " + fname); return; } @@ -417,7 +417,7 @@ std::string readSurface(std::istream& in, WARN( "readSurface(): cannot create surface {:s} from polyline " "{:d} since polyline is not closed.", - name.c_str(), ply_id); + name, ply_id); } } } @@ -488,10 +488,10 @@ bool readGLIFileV4(const std::string& fname, std::vector<std::string>& errors, std::string const& gmsh_path) { - INFO("GeoLib::readGLIFile(): open stream from file {:s}.", fname.c_str()); + INFO("GeoLib::readGLIFile(): open stream from file {:s}.", fname); std::ifstream in(fname.c_str()); if (!in) { - WARN("GeoLib::readGLIFile(): could not open file {:s}.", fname.c_str()); + WARN("GeoLib::readGLIFile(): could not open file {:s}.", fname); errors.push_back("[readGLIFileV4] error opening stream from " + fname); return false; } @@ -621,7 +621,7 @@ void writeGLIFileV4 (const std::string& fname, if (pnts) { const std::size_t n_pnts(pnts->size()); INFO("GeoLib::writeGLIFileV4(): writing {:d} points to file {:s}.", - n_pnts, fname.c_str()); + n_pnts, fname); os << "#POINTS" << "\n"; os.precision(std::numeric_limits<double>::digits10); for (std::size_t k(0); k < n_pnts; k++) { @@ -639,7 +639,7 @@ void writeGLIFileV4 (const std::string& fname, { const std::vector<GeoLib::Polyline*>* plys (plys_vec->getVector()); INFO("GeoLib::writeGLIFileV4(): {:d} polylines to file {:s}.", - plys->size(), fname.c_str()); + plys->size(), fname); for (auto ply : *plys) { os << "#POLYLINE" << "\n"; diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp index ff5b4f858dbeaab535d20ccddf070987c5637645..8368168e46a6526b779f38a9202b84bbead44001 100644 --- a/Applications/FileIO/Legacy/createSurface.cpp +++ b/Applications/FileIO/Legacy/createSurface.cpp @@ -95,8 +95,8 @@ bool createSurface(GeoLib::Polyline const& ply, int const gmsh_return_value = std::system(gmsh_command.c_str()); if (gmsh_return_value != 0) { - WARN("Call to '{:s}' returned non-zero value {:d}.", - gmsh_command.c_str(), gmsh_return_value); + WARN("Call to '{:s}' returned non-zero value {:d}.", gmsh_command, + gmsh_return_value); } auto surface_mesh = FileIO::GMSH::readGMSHMesh(msh_file.string()); diff --git a/Applications/FileIO/PetrelInterface.cpp b/Applications/FileIO/PetrelInterface.cpp index 89007cf36bf450c61738395042bbf7a57752b0e3..a4bc66044f4254e4d29569829dd995016be0e864 100644 --- a/Applications/FileIO/PetrelInterface.cpp +++ b/Applications/FileIO/PetrelInterface.cpp @@ -128,7 +128,7 @@ void PetrelInterface::readPetrelSurface(std::istream &in) WARN( "PetrelInterface::readPetrelSurface(): problem reading petrel " "points from line\n'{:s}'.", - line.c_str()); + line); } void PetrelInterface::readPetrelWellTrace(std::istream &in) diff --git a/Applications/FileIO/SHPInterface.cpp b/Applications/FileIO/SHPInterface.cpp index 0cccda5eeb41732b44a3459a7fd397d86b3da617..03c638330c761a73c89505d07458e409a81e41e8 100644 --- a/Applications/FileIO/SHPInterface.cpp +++ b/Applications/FileIO/SHPInterface.cpp @@ -294,7 +294,7 @@ bool SHPInterface::write2dMeshToSHP(const std::string &file_name, const MeshLib: } } DBFClose(hDBF); - INFO("Shape export of 2D mesh '{:s}' finished.", mesh.getName().c_str()); + INFO("Shape export of 2D mesh '{:s}' finished.", mesh.getName()); return true; } diff --git a/Applications/FileIO/SWMM/SWMMInterface.cpp b/Applications/FileIO/SWMM/SWMMInterface.cpp index d5eb64e5368e89d14ffe124a6f2f5a51460e2e3c..7c3712919d00f0e6aee7739e30a4f15b6b66ab75 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.cpp +++ b/Applications/FileIO/SWMM/SWMMInterface.cpp @@ -129,16 +129,14 @@ bool SwmmInterface::isSwmmInputFile(std::string const& inp_file_name) { if (!boost::iequals(BaseLib::getFileExtension(inp_file_name), "inp")) { - ERR("SWMMInterface: {:s} is not a SWMM input file.", - inp_file_name.c_str()); + ERR("SWMMInterface: {:s} is not a SWMM input file.", inp_file_name); return false; } std::ifstream in ( inp_file_name.c_str() ); if (!in.is_open()) { - ERR("SWMMInterface: Could not open input file {:s}.", - inp_file_name.c_str()); + ERR("SWMMInterface: Could not open input file {:s}.", inp_file_name); return false; } @@ -162,7 +160,7 @@ bool SwmmInterface::isSwmmInputFile(std::string const& inp_file_name) else { INFO("SWMMInterface: input file type {:s} not recognised.", - BaseLib::getFileExtension(inp_file_name).c_str()); + BaseLib::getFileExtension(inp_file_name)); return false; } } @@ -293,7 +291,7 @@ bool SwmmInterface::addPointElevation(std::ifstream &in, { ERR("SwmmInterface::addPointElevation(): Name {:s} not found in " "coordinates map.", - current_name.c_str()); + current_name); return false; } std::size_t const id = it->second; @@ -329,7 +327,7 @@ bool SwmmInterface::readLinksAsPolylines(std::ifstream &in, { ERR("SwmmInterface::readLineElements(): Inlet node {:s} not found " "in coordinates map.", - inlet.c_str()); + inlet); return false; } @@ -339,7 +337,7 @@ bool SwmmInterface::readLinksAsPolylines(std::ifstream &in, { ERR("SwmmInterface::readLineElements(): Outlet node {:s} not found " "in coordinates map.", - outlet.c_str()); + outlet); return false; } GeoLib::Polyline* ply = new GeoLib::Polyline(points); @@ -371,8 +369,7 @@ bool SwmmInterface::convertSwmmInputToGeometry(std::string const& inp_file_name, std::ifstream in ( inp_file_name.c_str() ); if (!in.is_open()) { - ERR("SWMMInterface: Could not open input file {:s}.", - inp_file_name.c_str()); + ERR("SWMMInterface: Could not open input file {:s}.", inp_file_name); return false; } @@ -529,7 +526,7 @@ bool SwmmInterface::readNodeData(std::ifstream &in, std::vector<MeshLib::Node*> { ERR("SwmmInterface::readNodeData(): Name {:s} not found in " "coordinates map.", - current_name.c_str()); + current_name); return false; } std::size_t const id = it->second; @@ -569,7 +566,7 @@ bool SwmmInterface::readLineElements(std::ifstream &in, std::vector<MeshLib::Ele { ERR("SwmmInterface::readLineElements(): Inlet node {:s} not found " "in coordinates map.", - inlet.c_str()); + inlet); return false; } @@ -579,7 +576,7 @@ bool SwmmInterface::readLineElements(std::ifstream &in, std::vector<MeshLib::Ele { ERR("SwmmInterface::readLineElements(): Outlet node {:s} not found " "in coordinates map.", - outlet.c_str()); + outlet); return false; } @@ -622,16 +619,14 @@ bool SwmmInterface::readSubcatchments(std::ifstream &in, std::map< std::string, } if (sc.rain_gauge == std::numeric_limits<std::size_t>::max()) { - ERR("Rain gauge for subcatchment '{:s}' not found.", - split_str[0].c_str()); + ERR("Rain gauge for subcatchment '{:s}' not found.", split_str[0]); return false; } auto const it = name_id_map.find(split_str[2]); if (it == name_id_map.end()) { - ERR("Outlet node for subcatchment '{:s}' not found.", - split_str[0].c_str()); + ERR("Outlet node for subcatchment '{:s}' not found.", split_str[0]); return false; } sc.outlet = it->second; @@ -657,8 +652,7 @@ bool SwmmInterface::readSwmmInputToLineMesh() std::ifstream in ( inp_file_name.c_str() ); if (!in.is_open()) { - ERR("SWMMInterface: Could not open input file {:s}.", - inp_file_name.c_str()); + ERR("SWMMInterface: Could not open input file {:s}.", inp_file_name); return false; } @@ -846,8 +840,7 @@ bool SwmmInterface::matchSubcatchmentsWithPolygons(std::vector<GeoLib::Polyline* } if (found == false) { - ERR("No match in subcatcments for outline '{:s}'.", - names[i].c_str()); + ERR("No match in subcatcments for outline '{:s}'.", names[i]); return false; } } @@ -1003,7 +996,7 @@ bool SwmmInterface::addResultsToMesh(MeshLib::Mesh &mesh, SwmmObject const swmm_ MeshLib::getOrCreateMeshProperty<double>(mesh, vec_name, item_type, 1); if (!prop) { - ERR("Error fetching array '{:s}'.", vec_name.c_str()); + ERR("Error fetching array '{:s}'.", vec_name); return false; } std::copy(data.cbegin(), data.cend(), prop->begin()); @@ -1067,7 +1060,7 @@ std::vector<double> SwmmInterface::getArrayAtTimeStep(SwmmObject obj_type, std:: } INFO("Fetching '{:s}'-data for time step {:d}...", - getArrayName(obj_type, var_idx, SWMM_Npolluts).c_str(), time_step); + getArrayName(obj_type, var_idx, SWMM_Npolluts), time_step); for (std::size_t i=0; i<n_objects; ++i) { @@ -1224,7 +1217,7 @@ bool SwmmInterface::addRainGaugeTimeSeriesLocations(std::ifstream &in) for (auto const& stn : _rain_gauges) if (stn.second.empty()) WARN("No associated time series found for rain gauge '{:s}'.", - stn.first.getName().c_str()); + stn.first.getName()); return true; } @@ -1333,8 +1326,8 @@ bool SwmmInterface::writeCsvForTimestep(std::string const& file_name, SwmmObject bool SwmmInterface::writeCsvForObject(std::string const& file_name, SwmmObject obj_type, std::size_t obj_idx) const { FileIO::CsvInterface csv; - INFO("Writing data for {:s} {:d}.", - swmmObjectTypeToString(obj_type).c_str(), obj_idx); + INFO("Writing data for {:s} {:d}.", swmmObjectTypeToString(obj_type), + obj_idx); csv.addIndexVectorForWriting(getNumberOfTimeSteps()); std::size_t const n_params (getNumberOfParameters(obj_type)); for (std::size_t i=0; i<n_params; ++i) diff --git a/Applications/FileIO/SWMM/SWMMInterface.h b/Applications/FileIO/SWMM/SWMMInterface.h index be93dc3de9af9cf813e4fd2e87ec73d84186993e..e0de525d2c98d9946146b5918a1e6161295e0b36 100644 --- a/Applications/FileIO/SWMM/SWMMInterface.h +++ b/Applications/FileIO/SWMM/SWMMInterface.h @@ -12,7 +12,6 @@ #include <string> #include <vector> -#include "BaseLib/Logging.h" #include "GeoLib/Station.h" diff --git a/Applications/FileIO/TetGenInterface.cpp b/Applications/FileIO/TetGenInterface.cpp index 7283b127f536bfd12e289ba2919eca5ff1fc46fb..c117f81b0f9f54ac9abf160ef1a1ce62cbb6a44d 100644 --- a/Applications/FileIO/TetGenInterface.cpp +++ b/Applications/FileIO/TetGenInterface.cpp @@ -43,7 +43,7 @@ bool TetGenInterface::readTetGenGeometry (std::string const& geo_fname, if (!poly_stream) { ERR("TetGenInterface::readTetGenGeometry() failed to open {:s}", - geo_fname.c_str()); + geo_fname); return false; } std::string ext (BaseLib::getFileExtension(geo_fname)); @@ -216,10 +216,10 @@ MeshLib::Mesh* TetGenInterface::readTetGenMesh (std::string const& nodes_fname, { if (!ins_nodes) ERR("TetGenInterface::readTetGenMesh failed to open {:s}", - nodes_fname.c_str()); + nodes_fname); if (!ins_ele) ERR("TetGenInterface::readTetGenMesh failed to open {:s}", - ele_fname.c_str()); + ele_fname); return nullptr; } @@ -587,12 +587,12 @@ bool TetGenInterface::writeTetGenSmesh(const std::string &file_name, if (points==nullptr) { - ERR("Geometry {:s} not found.", geo_name.c_str()); + ERR("Geometry {:s} not found.", geo_name); return false; } if (surfaces==nullptr) WARN("No surfaces found for geometry {:s}. Writing points only.", - geo_name.c_str()); + geo_name); std::ofstream out( file_name.c_str(), std::ios::out ); out.precision(std::numeric_limits<double>::digits10); diff --git a/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp b/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp index e6e2776e8f27af18c35c6c049847a971fe67ef09..19dd30b492e05883ca068606b6249e20013d108b 100644 --- a/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp +++ b/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp @@ -50,7 +50,7 @@ int XmlNumInterface::readFile(QString const& fileName) if (num_node.nodeName().compare("Type") == 0) { std::string const solver_type = num_node.toElement().text().toStdString(); - INFO("Non-linear solver type: {:s}.", solver_type.c_str()); + INFO("Non-linear solver type: {:s}.", solver_type); } else if (num_node.nodeName().compare("LinearSolver") == 0) { @@ -92,7 +92,7 @@ void XmlNumInterface::readLinearSolverConfiguration(QDomElement const& lin_root) linear_solver_node = linear_solver_node.nextSiblingElement(); } INFO("Using {:s}-library with solver {:s} and {:s} preconditioner.", - library.c_str(), lin_solver_type.c_str(), precond_type.c_str()); + library, lin_solver_type, precond_type); } @@ -139,7 +139,7 @@ void XmlNumInterface::readConvergenceCriteria(QDomElement const& convergence_roo conv_node = conv_node.nextSiblingElement(); } INFO("Convergence reached when error below {:f} using {:s}.", - error_threshold, error_method.c_str()); + error_threshold, error_method); } bool XmlNumInterface::write() diff --git a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp index 3495d40d8482a67327c52c2ffc064aefe2c83ceb..40ebb28a922e409c7f5a02cdbb53b65ea5cc39db 100644 --- a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp +++ b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp @@ -390,7 +390,7 @@ bool XmlPrjInterface::write() } else ERR("XmlGmlInterface::writeFile(): Error writing gml-file '{:s}'.", - name.c_str()); + name); } // stations @@ -413,7 +413,7 @@ bool XmlPrjInterface::write() } else ERR("XmlStnInterface::writeFile(): Error writing stn-file '{:s}'.", - name.c_str()); + name); } if (!_project.getBoundaryConditions().empty() || diff --git a/Applications/InSituLib/Adaptor.cpp b/Applications/InSituLib/Adaptor.cpp index 8e487cc9fcd7f06b7967f90e0ca2409a33db9281..f5d7a6473614813afc01fcf3d6b2a88d4d5944db 100644 --- a/Applications/InSituLib/Adaptor.cpp +++ b/Applications/InSituLib/Adaptor.cpp @@ -40,7 +40,7 @@ void Initialize(BaseLib::ConfigTree const& scripts_config, { //! \ogs_file_param{prj__insitu__scripts__script__name} auto scriptName = script_config.getConfigParameter<std::string>("name"); - INFO("Initializing in-situ script: {:s}", scriptName.c_str()); + INFO("Initializing in-situ script: {:s}", scriptName); std::stringstream ss; ss << path << scriptName; vtkNew<vtkCPPythonScriptPipeline> pipeline; diff --git a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp index 620b56983dfbec2c100b3e2fc589144d472ab24e..773f77b2a188fb431b24700eee75f2239647ff26 100644 --- a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp +++ b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp @@ -146,7 +146,7 @@ void printFieldInformationTable(DBFHandle const& dbf_handle, std::size_t n_field } delete[] field_name; out << "************************************************" << std::endl; - INFO("{:s}", out.str().c_str()); + INFO("{:s}", out.str()); } int main (int argc, char* argv[]) @@ -190,7 +190,7 @@ int main (int argc, char* argv[]) } SHPClose(hSHP); } else { - ERR("Could not open shapefile {:s}.", fname.c_str()); + ERR("Could not open shapefile {:s}.", fname); } DBFHandle dbf_handle = DBFOpen(fname.c_str(),"rb"); @@ -250,7 +250,7 @@ int main (int argc, char* argv[]) fname += ".gml"; } - INFO("Writing to {:s}.", fname.c_str()); + INFO("Writing to {:s}.", fname); convertPoints(dbf_handle, fname, x_id, diff --git a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp index d8005ccc8329ed625ea29b4a4a4c300b98bcd1fc..e8569b1d9ccc7b54e4e477b83b58029a0bad3e54 100644 --- a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp +++ b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp @@ -63,7 +63,7 @@ int main (int argc, char* argv[]) cmd.parse(argc, argv); // *** read mesh - INFO("Reading {:s}.", feflow_mesh_arg.getValue().c_str()); + INFO("Reading {:s}.", feflow_mesh_arg.getValue()); #ifndef WIN32 BaseLib::MemWatch mem_watch; unsigned long mem_without_mesh (mem_watch.getVirtMemUsage()); @@ -75,8 +75,7 @@ int main (int argc, char* argv[]) feflowIO.readFEFLOWFile(feflow_mesh_arg.getValue())); if (mesh == nullptr) { - INFO("Could not read mesh from {:s}.", - feflow_mesh_arg.getValue().c_str()); + INFO("Could not read mesh from {:s}.", feflow_mesh_arg.getValue()); return EXIT_FAILURE; } #ifndef WIN32 @@ -89,7 +88,7 @@ int main (int argc, char* argv[]) mesh->getNumberOfElements()); std::string ogs_mesh_fname(ogs_mesh_arg.getValue()); - INFO("Writing {:s}.", ogs_mesh_fname.c_str()); + INFO("Writing {:s}.", ogs_mesh_fname); MeshLib::IO::writeMeshToFile(*mesh, ogs_mesh_fname); INFO("\tDone."); return EXIT_SUCCESS; diff --git a/Applications/Utils/FileConverter/GMSH2OGS.cpp b/Applications/Utils/FileConverter/GMSH2OGS.cpp index f1bbf5e256ba021cda272d97970175c7900dcfee..e31a5f9584806d0da4364079831b69ec44639226 100644 --- a/Applications/Utils/FileConverter/GMSH2OGS.cpp +++ b/Applications/Utils/FileConverter/GMSH2OGS.cpp @@ -77,7 +77,7 @@ int main (int argc, char* argv[]) cmd.parse(argc, argv); // *** read mesh - INFO("Reading {:s}.", gmsh_mesh_arg.getValue().c_str()); + INFO("Reading {:s}.", gmsh_mesh_arg.getValue()); #ifndef WIN32 BaseLib::MemWatch mem_watch; unsigned long mem_without_mesh (mem_watch.getVirtMemUsage()); @@ -88,8 +88,7 @@ int main (int argc, char* argv[]) FileIO::GMSH::readGMSHMesh(gmsh_mesh_arg.getValue())); if (mesh == nullptr) { - INFO("Could not read mesh from {:s}.", - gmsh_mesh_arg.getValue().c_str()); + INFO("Could not read mesh from {:s}.", gmsh_mesh_arg.getValue()); return -1; } #ifndef WIN32 diff --git a/Applications/Utils/FileConverter/GocadSGridReader.cpp b/Applications/Utils/FileConverter/GocadSGridReader.cpp index 5c8197056b5abbd008b7d1069a1cb7a6592fd8d8..ee78af3906b0135b6151ddfc85261f894ba0e05c 100644 --- a/Applications/Utils/FileConverter/GocadSGridReader.cpp +++ b/Applications/Utils/FileConverter/GocadSGridReader.cpp @@ -75,7 +75,7 @@ int main(int argc, char* argv[]) auto property_names(mesh->getProperties().getPropertyVectorNames()); for (auto const& property_name : property_names) { - INFO("- {:s} (#values: {:d})", property_name.c_str(), + INFO("- {:s} (#values: {:d})", property_name, mesh->getProperties() .getPropertyVector<double>(property_name) ->size()); @@ -90,7 +90,7 @@ int main(int argc, char* argv[]) *(bounds.second)); } - INFO("Writing mesh to '{:s}'.", mesh_output_arg.getValue().c_str()); + INFO("Writing mesh to '{:s}'.", mesh_output_arg.getValue()); MeshLib::IO::writeMeshToFile(*mesh, mesh_output_arg.getValue()); return 0; diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp index e402dbfd5dc48ead7241f72c21e798f9502006f1..77cf0dcf26367ccb7aae3c74f9ab1d6b7ce82bf5 100644 --- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp +++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) { continue; } - INFO("Writing mesh \"{:s}\"", mesh->getName().c_str()); + INFO("Writing mesh \"{:s}\"", mesh->getName()); int data_mode = (write_binary) ? 2 : 0; bool compressed = (write_binary); MeshLib::IO::VtuInterface vtu(mesh.get(), data_mode, compressed); diff --git a/Applications/Utils/FileConverter/Mesh2Raster.cpp b/Applications/Utils/FileConverter/Mesh2Raster.cpp index d8506ed5c9aba29be8619735d959595aa88d72ae..59dd86c476e750a6f5a2734c2ddd9ef213ddacc0 100644 --- a/Applications/Utils/FileConverter/Mesh2Raster.cpp +++ b/Applications/Utils/FileConverter/Mesh2Raster.cpp @@ -151,6 +151,6 @@ int main(int argc, char* argv[]) out << "\n"; } out.close(); - INFO("Result written to {:s}", output_arg.getValue().c_str()); + INFO("Result written to {:s}", output_arg.getValue()); return 0; } diff --git a/Applications/Utils/FileConverter/NetCdfConverter.cpp b/Applications/Utils/FileConverter/NetCdfConverter.cpp index 9f7ae02b9af1522b92331314d52f81b0046bec14..5edb2380119c15c67fc3b7fbb69f23fc010dca26 100644 --- a/Applications/Utils/FileConverter/NetCdfConverter.cpp +++ b/Applications/Utils/FileConverter/NetCdfConverter.cpp @@ -447,7 +447,7 @@ static bool assignDimParams(NcVar const& var, arg_dim2.getValue() >= n_dims || arg_dim3.getValue() >= n_dims) { ERR("Maximum allowed dimension for variable \"{:s}\" is {:d}.", - var.getName().c_str(), n_dims - 1); + var.getName(), n_dims - 1); return false; } @@ -674,8 +674,7 @@ int main(int argc, char* argv[]) NcVar const& var = dataset.getVar(var_name); if (var.isNull()) { - ERR("Variable \"{:s}\" not found in file.", - arg_varname.getValue().c_str()); + ERR("Variable \"{:s}\" not found in file.", arg_varname.getValue()); return EXIT_FAILURE; } diff --git a/Applications/Utils/FileConverter/TecPlotTools.cpp b/Applications/Utils/FileConverter/TecPlotTools.cpp index 2ac3c338a707e82fcd18ea9c0093acb6cb7599c7..fef83141f3da0f6fe1f4f5a1966f0df1d80cd1b4 100644 --- a/Applications/Utils/FileConverter/TecPlotTools.cpp +++ b/Applications/Utils/FileConverter/TecPlotTools.cpp @@ -112,7 +112,7 @@ bool dataCountError(std::string const& name, { ERR("Data rows found do not fit specified dimensions for section " "'{:s}'.", - name.c_str()); + name); return true; } return false; @@ -207,7 +207,7 @@ int writeDataToMesh(std::string const& file_name, vec_names[i], MeshLib::MeshItemType::Cell, 1); if (!prop) { - ERR("Error creating array '{:s}'.", vec_names[i].c_str()); + ERR("Error creating array '{:s}'.", vec_names[i]); return -5; } prop->reserve(scalars[i].size()); @@ -444,7 +444,7 @@ int main(int argc, char* argv[]) std::ifstream in(input_arg.getValue().c_str()); if (!in.is_open()) { - ERR("Could not open file {:s}.", input_arg.getValue().c_str()); + ERR("Could not open file {:s}.", input_arg.getValue()); return -2; } diff --git a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp index 866430351beeb76d56bec40901561b5a2ae458c8..ffb3ed9aa4059995d61c498018f489178d250139 100644 --- a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp +++ b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp @@ -53,8 +53,7 @@ int main (int argc, char* argv[]) if (!mesh) { - INFO("Could not read mesh from file '{:s}'.", - mesh_arg.getValue().c_str()); + INFO("Could not read mesh from file '{:s}'.", mesh_arg.getValue()); return EXIT_FAILURE; } @@ -82,18 +81,17 @@ int main (int argc, char* argv[]) } else { - ERR("Could not create property '{:s}' file.", new_matname.c_str()); + ERR("Could not create property '{:s}' file.", new_matname); return EXIT_FAILURE; } mesh->getProperties().removePropertyVector("MaterialIDs"); std::string const new_mshname(name + "_new.vtu"); - INFO("Writing mesh to file '{:s}'.", new_mshname.c_str()); + INFO("Writing mesh to file '{:s}'.", new_mshname); MeshLib::IO::writeMeshToFile(*mesh, new_mshname); - INFO("New files '{:s}' and '{:s}' written.", new_mshname.c_str(), - new_matname.c_str()); + INFO("New files '{:s}' and '{:s}' written.", new_mshname, new_matname); return EXIT_SUCCESS; } diff --git a/Applications/Utils/GeoTools/MoveGeometry.cpp b/Applications/Utils/GeoTools/MoveGeometry.cpp index dadedf8a0eb1f32a1898465afadee58eb4ed5790..6dc6d6e17bd0f3d877d5e7c55d4e5fed95198618 100644 --- a/Applications/Utils/GeoTools/MoveGeometry.cpp +++ b/Applications/Utils/GeoTools/MoveGeometry.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) } catch (std::runtime_error const& err) { - ERR("Failed to read file `{:s}'.", geo_input_arg.getValue().c_str()); + ERR("Failed to read file `{:s}'.", geo_input_arg.getValue()); ERR("{:s}", err.what()); return EXIT_FAILURE; } diff --git a/Applications/Utils/GeoTools/TriangulatePolyline.cpp b/Applications/Utils/GeoTools/TriangulatePolyline.cpp index 7d0870dac1ec1bafc8f5e2185e68526216469856..6c9ed4959465ec5737599db3639bfe9a8427cd4f 100644 --- a/Applications/Utils/GeoTools/TriangulatePolyline.cpp +++ b/Applications/Utils/GeoTools/TriangulatePolyline.cpp @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) } catch (std::runtime_error const& err) { - ERR("Failed to read file `{:s}'.", file_name.c_str()); + ERR("Failed to read file `{:s}'.", file_name); ERR("{:s}", err.what()); return EXIT_FAILURE; } @@ -87,8 +87,7 @@ int main(int argc, char *argv[]) // check if line exists if (line == nullptr) { - ERR("No polyline found with name '{:s}'. Aborting...", - polyline_name.c_str()); + ERR("No polyline found with name '{:s}'. Aborting...", polyline_name); return EXIT_FAILURE; } diff --git a/Applications/Utils/MeshEdit/AddTopLayer.cpp b/Applications/Utils/MeshEdit/AddTopLayer.cpp index b16ad59223e62db4b1e495e7490d7e9f7e2a6113..3c2b38651d5cebf99b2d5740153ca8215249aafe 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -48,11 +48,11 @@ int main (int argc, char* argv[]) cmd.parse(argc, argv); - INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue().c_str()); + INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue()); auto subsfc_mesh = std::unique_ptr<MeshLib::Mesh>( MeshLib::IO::readMeshFromFile(mesh_arg.getValue())); if (!subsfc_mesh) { - ERR("Error reading mesh '{:s}'.", mesh_arg.getValue().c_str()); + ERR("Error reading mesh '{:s}'.", mesh_arg.getValue()); return EXIT_FAILURE; } INFO("done."); @@ -64,7 +64,7 @@ int main (int argc, char* argv[]) return EXIT_FAILURE; } - INFO("Writing mesh '{:s}' ... ", mesh_out_arg.getValue().c_str()); + INFO("Writing mesh '{:s}' ... ", mesh_out_arg.getValue()); MeshLib::IO::writeMeshToFile(*result, mesh_out_arg.getValue()); INFO("done."); diff --git a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp index 7cb24fa42a772224263881d5ab9b78e7d55db61f..c57c9c65dac93b97b86681a4378c045b8fa6cd93 100644 --- a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp +++ b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp @@ -89,7 +89,7 @@ void writeBCsAndGeometry(GeoLib::GEOObjects& geometry_sets, std::string const& bc_type, bool write_gml) { if (write_gml) { - INFO("write points to '{:s}.gml'.", geo_name.c_str()); + INFO("write points to '{:s}.gml'.", geo_name); FileIO::writeGeometryToFile(geo_name, geometry_sets, out_fname+".gml"); } FileIO::writeGeometryToFile(geo_name, geometry_sets, out_fname+".gli"); @@ -175,12 +175,11 @@ int main (int argc, char* argv[]) cmd.parse(argc, argv); // *** read mesh - INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue().c_str()); + INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue()); std::unique_ptr<MeshLib::Mesh> subsurface_mesh( MeshLib::IO::readMeshFromFile(mesh_arg.getValue())); INFO("done."); - INFO("Extracting top surface of mesh '{:s}' ... ", - mesh_arg.getValue().c_str()); + INFO("Extracting top surface of mesh '{:s}' ... ", mesh_arg.getValue()); const MathLib::Vector3 dir(0,0,-1); double const angle(90); std::unique_ptr<MeshLib::Mesh> surface_mesh( @@ -206,7 +205,7 @@ int main (int argc, char* argv[]) std::vector<GeoLib::Polyline*> const* plys(geometries.getPolylineVec(geo_name)); if (!plys) { ERR("Could not get vector of polylines out of geometry '{:s}'.", - geo_name.c_str()); + geo_name); return EXIT_FAILURE; } diff --git a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp index 1da6f421b44bbc18ae8bfe2c177e2a872d9fbd32..64613f47c9af1d926a97b792137516b4ac7d0885 100644 --- a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp +++ b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp @@ -59,7 +59,7 @@ int main (int argc, char* argv[]) GeoLib::IO::BoostXmlGmlInterface xml_io(geometries); if (xml_io.readFile(input_geometry_fname.getValue())) { INFO("Read geometry from file '{:s}'.", - input_geometry_fname.getValue().c_str()); + input_geometry_fname.getValue()); } else { return EXIT_FAILURE; } diff --git a/Applications/Utils/MeshEdit/MoveMesh.cpp b/Applications/Utils/MeshEdit/MoveMesh.cpp index 22b86853355b6c3cce019bde5cb234a565ed3fb9..c29de817e1dd57ba3fb513e1a299c3fee6804c7a 100644 --- a/Applications/Utils/MeshEdit/MoveMesh.cpp +++ b/Applications/Utils/MeshEdit/MoveMesh.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) std::unique_ptr<MeshLib::Mesh> mesh(MeshLib::IO::readMeshFromFile(fname)); if (!mesh) { - ERR("Could not read mesh from file '{:s}'.", fname.c_str()); + ERR("Could not read mesh from file '{:s}'.", fname); return EXIT_FAILURE; } diff --git a/Applications/Utils/MeshEdit/RemoveGhostData.cpp b/Applications/Utils/MeshEdit/RemoveGhostData.cpp index 602cc6809ff1306997b16dd0cad5581ee9215bb2..14b602c869580fe56593b81724063c7aa183b023 100644 --- a/Applications/Utils/MeshEdit/RemoveGhostData.cpp +++ b/Applications/Utils/MeshEdit/RemoveGhostData.cpp @@ -44,7 +44,6 @@ int main (int argc, char* argv[]) vtkSmartPointer<vtkXMLPUnstructuredGridReader> reader = vtkSmartPointer<vtkXMLPUnstructuredGridReader>::New(); reader->SetFileName(input_arg.getValue().c_str()); - vtkSmartPointer<vtkUnstructuredGrid> mesh = reader->GetOutput(); vtkSmartPointer<vtkRemoveGhosts> ghosts = vtkSmartPointer<vtkRemoveGhosts>::New(); diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp index 40e0bec8ec41fe594e055efabc86c7eeac10f123..92280dfe29b6de5f84c560b3652b73a85db40988 100644 --- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp +++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp @@ -104,7 +104,7 @@ int main(int argc, char* argv[]) if (!plys) { ERR("Could not get vector of polylines out of geometry '{:s}'.", - geo_name.c_str()); + geo_name); return EXIT_FAILURE; } @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) plys->getElementByName(polygon_name_arg.getValue())); if (!ply) { - ERR("Polyline '{:s}' not found.", polygon_name_arg.getValue().c_str()); + ERR("Polyline '{:s}' not found.", polygon_name_arg.getValue()); return EXIT_FAILURE; } @@ -122,7 +122,7 @@ int main(int argc, char* argv[]) if (!closed) { ERR("Polyline '{:s}' is not closed, i.e. does not describe a region.", - polygon_name_arg.getValue().c_str()); + polygon_name_arg.getValue()); return EXIT_FAILURE; } @@ -164,7 +164,7 @@ int main(int argc, char* argv[]) INFO("Mesh contains {:d} property vectors:", property_names.size()); for (const auto& name : property_names) { - INFO("- {:s}", name.c_str()); + INFO("- {:s}", name); } MeshLib::IO::writeMeshToFile(*mesh, mesh_out.getValue()); diff --git a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp index 09504fcf599ede4678e659796d79fdb8bca8d517..a19ed789bf6045f3503322fd8b32f776803a1606 100644 --- a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp +++ b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp @@ -65,7 +65,7 @@ bool fillPropVec(MeshLib::Properties const& props, MeshLib::PropertyVector<T> const*const vec = props.getPropertyVector<T>(name); if (vec->getNumberOfComponents() != 1) { - INFO("Ignoring array '{:s}' (more than one component).", name.c_str()); + INFO("Ignoring array '{:s}' (more than one component).", name); return false; } @@ -74,8 +74,7 @@ bool fillPropVec(MeshLib::Properties const& props, new_vec->resize(total_nodes); if (vec->getMeshItemType() == MeshLib::MeshItemType::Node) { - INFO("Migrating node array '{:s}' to new mesh structure...", - name.c_str()); + INFO("Migrating node array '{:s}' to new mesh structure...", name); std::size_t const n_nodes (node_map.size()); for (std::size_t i = 0; i<n_nodes; ++i) { @@ -88,7 +87,7 @@ bool fillPropVec(MeshLib::Properties const& props, } else if (vec->getMeshItemType() == MeshLib::MeshItemType::Cell) { - INFO("Transforming cell array '{:s}' into node array...", name.c_str()); + INFO("Transforming cell array '{:s}' into node array...", name); std::size_t const n_elems (vec->size()); for (std::size_t i = 0; i<n_elems; ++i) { @@ -201,7 +200,7 @@ int main (int argc, char* argv[]) cmd.parse(argc, argv); - INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue().c_str()); + INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue()); std::unique_ptr<MeshLib::Mesh> mesh {MeshLib::IO::readMeshFromFile(mesh_arg.getValue())}; if (!mesh) { @@ -240,7 +239,7 @@ int main (int argc, char* argv[]) else INFO("No cell arrays found, keeping mesh structure.\n"); - INFO("Writing mesh '{:s}' ... ", mesh_out_arg.getValue().c_str()); + INFO("Writing mesh '{:s}' ... ", mesh_out_arg.getValue()); MeshLib::IO::VtuInterface writer(result.get(), vtkXMLWriter::Ascii, false); writer.writeToFile(mesh_out_arg.getValue()); INFO("done."); diff --git a/Applications/Utils/MeshEdit/Vtu2Grid.cpp b/Applications/Utils/MeshEdit/Vtu2Grid.cpp index 3e60d23c74b420e629de95f35a066873a2e1290b..7bbfd98801a5ff600f981468fe096f30cb08c767 100644 --- a/Applications/Utils/MeshEdit/Vtu2Grid.cpp +++ b/Applications/Utils/MeshEdit/Vtu2Grid.cpp @@ -130,8 +130,7 @@ void mapMeshArraysOntoGrid(vtkSmartPointer<vtkUnstructuredGrid> const& mesh, mapArray<int, vtkSmartPointer<vtkIntArray>>(*grid, int_arr, name); continue; } - WARN("Ignoring array '{:s}', array type not implemented...", - name.c_str()); + WARN("Ignoring array '{:s}', array type not implemented...", name); } } diff --git a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp index 84a9ee0c7297d5526ad6a0015d07790debb3b18f..b8538b41c19997ab392e300979686f643d5e02da 100644 --- a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp +++ b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp @@ -67,8 +67,7 @@ int main (int argc, char* argv[]) const GeoLib::PolylineVec* ply_vec (geo_objs.getPolylineVecObj(geo_names[0])); if (!ply_vec) { - ERR("Could not find polylines in geometry '{:s}'.", - geo_names.front().c_str()); + ERR("Could not find polylines in geometry '{:s}'.", geo_names.front()); return EXIT_FAILURE; } @@ -76,7 +75,7 @@ int main (int argc, char* argv[]) MeshLib::Mesh const*const mesh (MeshLib::IO::readMeshFromFile(mesh_in.getValue())); if (!mesh) { - ERR("Mesh file '{:s}' not found", mesh_in.getValue().c_str()); + ERR("Mesh file '{:s}' not found", mesh_in.getValue()); return EXIT_FAILURE; } INFO("Mesh read: {:d} nodes, {:d} elements.", mesh->getNumberOfNodes(), diff --git a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp index 43149b3518dc6eb6f8591d2101721f7b0cace76d..010cfdeefe4b5ee26b7def7e6d337d78ed99a628 100644 --- a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp +++ b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp @@ -33,7 +33,7 @@ int readRasterPaths(std::string const& raster_list_file, std::vector<std::string std::ifstream in (raster_list_file.c_str()); if (in.fail()) { - ERR("Could not open file {:s}.", raster_list_file.c_str()); + ERR("Could not open file {:s}.", raster_list_file); return -1; } std::string line; @@ -113,12 +113,12 @@ int main (int argc, char* argv[]) } } - INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue().c_str()); + INFO("Reading mesh '{:s}' ... ", mesh_arg.getValue()); std::unique_ptr<MeshLib::Mesh> const sfc_mesh( MeshLib::IO::readMeshFromFile(mesh_arg.getValue())); if (!sfc_mesh) { - ERR("Error reading mesh '{:s}'.", mesh_arg.getValue().c_str()); + ERR("Error reading mesh '{:s}'.", mesh_arg.getValue()); return EXIT_FAILURE; } if (sfc_mesh->getDimension() != 2) @@ -153,7 +153,7 @@ int main (int argc, char* argv[]) output_name.append(".vtu"); } - INFO("Writing mesh '{:s}' ... ", output_name.c_str()); + INFO("Writing mesh '{:s}' ... ", output_name); auto result_mesh = std::make_unique<MeshLib::Mesh>( *(mapper.getMesh("SubsurfaceMesh").release())); diff --git a/Applications/Utils/MeshEdit/moveMeshNodes.cpp b/Applications/Utils/MeshEdit/moveMeshNodes.cpp index 9946c7307897df4a63d56cd4799bbe50887eb7f8..1e32466b0a8f373dc8134fcd8825baab9ca1a4a6 100644 --- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp +++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp @@ -93,7 +93,7 @@ int main (int argc, char* argv[]) { ERR("Keyword not recognised. Available keywords:"); for (auto const& keyword : keywords) - INFO("\t{:s}", keyword.c_str()); + INFO("\t{:s}", keyword); return EXIT_FAILURE; } @@ -118,7 +118,7 @@ int main (int argc, char* argv[]) unsigned idx = (dir == "x") ? 0 : (dir == "y") ? 1 : 2; const double value(strtod(argv[4],0)); INFO("Moving all mesh nodes by {:g} in direction {:d} ({:s})...", value, - idx, dir.c_str()); + idx, dir); //double value(-10); const std::size_t nNodes(mesh->getNumberOfNodes()); std::vector<MeshLib::Node*> nodes (mesh->getNodes()); diff --git a/Applications/Utils/MeshEdit/queryMesh.cpp b/Applications/Utils/MeshEdit/queryMesh.cpp index bb81f98f0de971038a7db7b77a28efeced9bfd29..b8d0229a0800e05f42a5b9c7d51a42fe81ffdd33 100644 --- a/Applications/Utils/MeshEdit/queryMesh.cpp +++ b/Applications/Utils/MeshEdit/queryMesh.cpp @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) } } out << std::endl; - INFO("{:s}", out.str().c_str()); + INFO("{:s}", out.str()); } for (auto node_id : selected_node_ids) @@ -124,6 +124,6 @@ int main(int argc, char *argv[]) out << nd->getID() << " "; } out << std::endl; - INFO("{:s}", out.str().c_str()); + INFO("{:s}", out.str()); } } diff --git a/Applications/Utils/MeshEdit/removeMeshElements.cpp b/Applications/Utils/MeshEdit/removeMeshElements.cpp index ce366d7a0a2b59f2e863f6f8967e0d2823ca5fb6..da72a3beb51df87be247f82e092d41d1aa91e605 100644 --- a/Applications/Utils/MeshEdit/removeMeshElements.cpp +++ b/Applications/Utils/MeshEdit/removeMeshElements.cpp @@ -41,7 +41,7 @@ void searchByPropertyValue(std::string const& property_name, } INFO("{:d} elements with property value {:s} found.", n_marked_elements, - std::to_string(property_value).c_str()); + std::to_string(property_value)); } } @@ -63,7 +63,7 @@ void searchByPropertyRange(std::string const& property_name, // add checks for other data types here (if n_marked_elements remains 0) INFO("{:d} elements in range [{:s}, {:s}] found.", n_marked_elements, - std::to_string(min_value).c_str(), std::to_string(max_value).c_str()); + std::to_string(min_value), std::to_string(max_value)); } int main (int argc, char* argv[]) @@ -167,7 +167,7 @@ int main (int argc, char* argv[]) continue; } INFO("{:d} {:s} elements found.", - searcher.searchByElementType(type), typeName.c_str()); + searcher.searchByElementType(type), typeName); } } diff --git a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp index bc496bf000a6aa6a0b26187d0a0db07ffefec56a..4970be0d4d5462555b0e33ed3996ef578172ea94 100644 --- a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp +++ b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp @@ -35,13 +35,11 @@ void writeToFile(std::string const& id_area_fname, std::string const& csv_fname, { std::ofstream ids_and_area_out(id_area_fname); if (!ids_and_area_out) { - OGS_FATAL("Unable to open the file '{:s}' - aborting.", - id_area_fname.c_str()); + OGS_FATAL("Unable to open the file '{:s}' - aborting.", id_area_fname); } std::ofstream csv_out(csv_fname); if (!csv_out) { - OGS_FATAL("Unable to open the file '{:s}' - aborting.", - csv_fname.c_str()); + OGS_FATAL("Unable to open the file '{:s}' - aborting.", csv_fname); } ids_and_area_out << std::setprecision(20); @@ -101,7 +99,7 @@ int main (int argc, char* argv[]) std::vector<std::string> geo_names; geo_objs.getGeometryNames(geo_names); INFO("Geometry '{:s}' read: {:d} points, {:d} polylines.", - geo_names[0].c_str(), + geo_names[0], geo_objs.getPointVec(geo_names[0])->size(), geo_objs.getPolylineVec(geo_names[0])->size()); @@ -154,7 +152,7 @@ int main (int argc, char* argv[]) if (ids_and_areas.empty()) { ERR("Polygonal part of surface '{:s}' doesn't contains nodes. No " "output will be generated.", - polygon_name.c_str()); + polygon_name); continue; } @@ -166,10 +164,10 @@ int main (int argc, char* argv[]) INFO( "Polygonal part of surface '{:s}' contains %{ul} nodes. Writting to" " files '{:s}' and '{:s}'.", - polygon_name.c_str(), + polygon_name, ids_and_areas.size(), - id_and_area_fname.c_str(), - csv_fname.c_str()); + id_and_area_fname, + csv_fname); writeToFile(id_and_area_fname, csv_fname, ids_and_areas, mesh_nodes); } diff --git a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp index b85795c864f75c6f65cf90c0d597cf2543974971..2e9d0fc399dabe59fd3de65e5dc45389062c2c6e 100644 --- a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp +++ b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp @@ -23,7 +23,7 @@ std::unique_ptr<GeoLib::GEOObjects> readGeometry(std::string const& filename) auto geo_objects = std::make_unique<GeoLib::GEOObjects>(); GeoLib::IO::BoostXmlGmlInterface gml_reader(*geo_objects); - DBUG("Reading geometry file '{:s}'.", filename.c_str()); + DBUG("Reading geometry file '{:s}'.", filename); gml_reader.readFile(filename); return geo_objects; } @@ -106,7 +106,7 @@ int main(int argc, char* argv[]) WARN( "The created mesh '{:s}' hasn't any nodes or elements and thus " "it isn't written to file.", - m_ptr->getName().c_str()); + m_ptr->getName()); continue; } MeshLib::IO::writeMeshToFile(*m_ptr, m_ptr->getName() + ".vtu"); diff --git a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp index cabcd263bb176563edabd37d6a0afb313d5faa52..3f31acc0f6b531dca405e32ca63e98cbe4ea5fa9 100644 --- a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp +++ b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp @@ -28,8 +28,7 @@ std::vector<std::unique_ptr<MeshLib::Mesh>> readMeshes( auto mesh = MeshLib::IO::readMeshFromFile(filename); if (mesh == nullptr) { - OGS_FATAL("Could not read mesh from '{:s}' file.", - filename.c_str()); + OGS_FATAL("Could not read mesh from '{:s}' file.", filename); } meshes.emplace_back(mesh); } @@ -104,7 +103,7 @@ int main(int argc, char* argv[]) if (bulk_mesh == nullptr) { OGS_FATAL("Could not read bulk mesh from '{:s}'", - bulk_mesh_arg.getValue().c_str()); + bulk_mesh_arg.getValue()); } // diff --git a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp index 1e8e43fe1a14604b22a3cb783f5af0f29cb1d4f5..a25f6ca6d1275a132d0ffbd2772ac649f5efc3f0 100644 --- a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp +++ b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp @@ -31,13 +31,11 @@ void writeToFile(std::string const& id_area_fname, std::string const& csv_fname, { std::ofstream ids_and_area_out(id_area_fname); if (!ids_and_area_out) { - OGS_FATAL("Unable to open the file '{:s}' - aborting.", - id_area_fname.c_str()); + OGS_FATAL("Unable to open the file '{:s}' - aborting.", id_area_fname); } std::ofstream csv_out(csv_fname); if (!csv_out) { - OGS_FATAL("Unable to open the file '{:s}' - aborting.", - csv_fname.c_str()); + OGS_FATAL("Unable to open the file '{:s}' - aborting.", csv_fname); } ids_and_area_out.precision(std::numeric_limits<double>::digits10); diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp index ef0ee9fbe9a0d0ceb10ce66f25328461d2ea41f4..7c86dd8bb00169e1c053a3981b5a17e759ae3009 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp @@ -438,7 +438,7 @@ void applyToPropertyVectors(std::vector<std::string> const& property_names, if (!success) { OGS_FATAL("Could not apply function to PropertyVector '{:s}'.", - name.c_str()); + name); } } } @@ -740,8 +740,7 @@ void writePropertiesBinary(const std::string& file_name_base, std::ofstream out(file_name_cfg, std::ios::binary); if (!out) { - OGS_FATAL("Could not open file '{:s}' for output.", - file_name_cfg.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name_cfg); } auto const file_name_val = file_name_base + "_partitioned_" + @@ -750,8 +749,7 @@ void writePropertiesBinary(const std::string& file_name_base, std::ofstream out_val(file_name_val, std::ios::binary); if (!out_val) { - OGS_FATAL("Could not open file '{:s}' for output.", - file_name_val.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name_val); } std::size_t const number_of_properties(property_names.size()); @@ -845,8 +843,7 @@ std::tuple<std::vector<long>, std::vector<long>> writeConfigDataBinary( std::ofstream of_bin_cfg(file_name_cfg, std::ios::binary); if (!of_bin_cfg) { - OGS_FATAL("Could not open file '{:s}' for output.", - file_name_cfg.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name_cfg); } std::vector<long> num_elem_integers; @@ -929,8 +926,7 @@ void writeElementsBinary(std::string const& file_name_base, std::ofstream element_info_os(file_name_ele, std::ios::binary); if (!element_info_os) { - OGS_FATAL("Could not open file '{:s}' for output.", - file_name_ele.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name_ele); } auto const file_name_ele_g = @@ -938,8 +934,7 @@ void writeElementsBinary(std::string const& file_name_base, std::ofstream ghost_element_info_os(file_name_ele_g, std::ios::binary); if (!ghost_element_info_os) { - OGS_FATAL("Could not open file '{:s}' for output.", - file_name_ele_g.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name_ele_g); } for (std::size_t i = 0; i < partitions.size(); i++) @@ -997,7 +992,7 @@ void writeNodesBinary(const std::string& file_name_base, std::ofstream os(file_name, std::ios::binary); if (!os) { - OGS_FATAL("Could not open file '{:s}' for output.", file_name.c_str()); + OGS_FATAL("Could not open file '{:s}' for output.", file_name); } for (const auto& partition : partitions) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp index 9068d19cbc83113c526ce078343e1dbbeb86426e..1825e767e15aae9ac13595f737ae38729bee9cff 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) std::unique_ptr<MeshLib::Mesh> mesh_ptr( MeshLib::IO::readMeshFromFile(input_file_name_wo_extension + ".vtu")); INFO("Mesh '{:s}' read: {:d} nodes, {:d} elements.", - mesh_ptr->getName().c_str(), + mesh_ptr->getName(), mesh_ptr->getNumberOfNodes(), mesh_ptr->getNumberOfElements()); @@ -135,7 +135,7 @@ int main(int argc, char* argv[]) INFO("METIS is running ..."); const std::string exe_name = argv[0]; const std::string exe_path = BaseLib::extractPath(exe_name); - INFO("Path to mpmetis is: \n\t{:s}", exe_path.c_str()); + INFO("Path to mpmetis is: \n\t{:s}", exe_path); const std::string mpmetis_com = BaseLib::joinPaths(exe_path, "mpmetis") + " -gtype=nodal " + "'" + @@ -166,8 +166,8 @@ int main(int argc, char* argv[]) std::unique_ptr<MeshLib::Mesh> mesh( MeshLib::IO::readMeshFromFile(filename)); INFO("Mesh '{:s}' from file '{:s}' read: {:d} nodes, {:d} elements.", - mesh->getName().c_str(), filename.c_str(), - mesh->getNumberOfNodes(), mesh->getNumberOfElements()); + mesh->getName(), filename, mesh->getNumberOfNodes(), + mesh->getNumberOfElements()); std::string const other_mesh_output_file_name_wo_extension = BaseLib::joinPaths( diff --git a/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp b/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp index 3353c2838da9fcc9a6baf71af1bd4b2780fc1102..56df9c8948a66debd70ffaf1d75c8982a4bd77c6 100644 --- a/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp +++ b/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) if (!success) { - ERR("{:s}", err_msg.c_str()); + ERR("{:s}", err_msg); return -1; } diff --git a/Applications/Utils/ModelPreparation/createNeumannBc.cpp b/Applications/Utils/ModelPreparation/createNeumannBc.cpp index d1d00e853d93b3f5353d494af1c9d9460d0b16fe..c59515baf59c6e8a4e4378eedd5cdf39c36657fd 100644 --- a/Applications/Utils/ModelPreparation/createNeumannBc.cpp +++ b/Applications/Utils/ModelPreparation/createNeumannBc.cpp @@ -41,7 +41,7 @@ std::vector<double> getSurfaceIntegratedValuesForNodes( { ERR("Need element property, but the property '{:s}' is not " "available.", - prop_name.c_str()); + prop_name); return std::vector<double>(); } auto const* const elem_pv = mesh.getProperties().getPropertyVector<double>( diff --git a/Applications/Utils/PostProcessing/postLIE.cpp b/Applications/Utils/PostProcessing/postLIE.cpp index 6befe24640c001ca249d98cd078e1d21123fa9c4..22f84a4e28237d0fcbbc1cadde5bdafb2e467b38 100644 --- a/Applications/Utils/PostProcessing/postLIE.cpp +++ b/Applications/Utils/PostProcessing/postLIE.cpp @@ -60,7 +60,7 @@ void postVTU(std::string const& int_vtu_filename, vec_junction_nodeID_matIDs); // create a new VTU file - INFO("create {:s}", out_vtu_filename.c_str()); + INFO("create {:s}", out_vtu_filename); MeshLib::IO::writeMeshToFile(post.getOutputMesh(), out_vtu_filename); } @@ -69,7 +69,7 @@ void postPVD(std::string const& in_pvd_filename, { auto const in_pvd_file_dir = BaseLib::extractPath(in_pvd_filename); auto const out_pvd_file_dir = BaseLib::extractPath(out_pvd_filename); - INFO("start reading the PVD file {:s}", in_pvd_filename.c_str()); + INFO("start reading the PVD file {:s}", in_pvd_filename); boost::property_tree::ptree pt; read_xml(in_pvd_filename, pt, boost::property_tree::xml_parser::trim_whitespace); @@ -93,7 +93,7 @@ void postPVD(std::string const& in_pvd_filename, } auto const org_vtu_filepath = BaseLib::joinPaths(org_vtu_dir, org_vtu_filebasename); - INFO("processing {:s}...", org_vtu_filepath.c_str()); + INFO("processing {:s}...", org_vtu_filepath); // post-process the VTU and save into the new file auto const dest_vtu_filename = "post_" + org_vtu_filebasename; @@ -106,7 +106,7 @@ void postPVD(std::string const& in_pvd_filename, } // save into the new PVD file - INFO("save into the new PVD file {:s}", out_pvd_filename.c_str()); + INFO("save into the new PVD file {:s}", out_pvd_filename); boost::property_tree::xml_writer_settings<std::string> settings('\t', 1); write_xml(out_pvd_filename, pt, std::locale(), settings); } @@ -145,8 +145,7 @@ int main(int argc, char* argv[]) } else { - OGS_FATAL("The given file type ({:s}) is not supported.", - in_file_ext.c_str()); + OGS_FATAL("The given file type ({:s}) is not supported.", in_file_ext); } return EXIT_SUCCESS; diff --git a/BaseLib/Algorithm.h b/BaseLib/Algorithm.h index 38461a984ccb67928d67026f848e8e4021a45d98..62a47c1dc849201021cf2e99b2de22784dc08a05 100644 --- a/BaseLib/Algorithm.h +++ b/BaseLib/Algorithm.h @@ -74,7 +74,7 @@ typename std::iterator_traits<InputIt>::reference findElementOrError( auto it = std::find_if(begin, end, predicate); if (it == end) { - OGS_FATAL("Element not found in the input range; {:s}", error.c_str()); + OGS_FATAL("Element not found in the input range; {:s}", error); } return *it; } @@ -93,8 +93,8 @@ void insertIfTypeIndexKeyUniqueElseError(Map& map, Key const& key, auto const inserted = map.emplace(key, std::forward<Value>(value)); if (!inserted.second) { // insertion failed, i.e., key already exists - OGS_FATAL("{:s} Key `{:s}' already exists.", error_message.c_str(), - tostring(key.hash_code()).c_str()); + OGS_FATAL("{:s} Key `{:s}' already exists.", error_message, + tostring(key.hash_code())); } } @@ -110,8 +110,8 @@ void insertIfKeyUniqueElseError(Map& map, Key const& key, Value&& value, auto const inserted = map.emplace(key, std::forward<Value>(value)); if (!inserted.second) { // insertion failed, i.e., key already exists - OGS_FATAL("{:s} Key `{:s}' already exists.", error_message.c_str(), - tostring(key).c_str()); + OGS_FATAL("{:s} Key `{:s}' already exists.", error_message, + tostring(key)); } } @@ -129,15 +129,15 @@ void insertIfKeyValueUniqueElseError(Map& map, Key const& key, Value&& value, if (std::find_if(map.cbegin(), map.cend(), value_compare) != map.cend()) { - OGS_FATAL("{:s} Value `{:s}' already exists.", error_message.c_str(), - tostring(value).c_str()); + OGS_FATAL("{:s} Value `{:s}' already exists.", error_message, + tostring(value)); } auto const inserted = map.emplace(key, std::forward<Value>(value)); if (!inserted.second) { // insertion failed, i.e., key already exists - OGS_FATAL("{:s} Key `{:s}' already exists.", error_message.c_str(), - tostring(key).c_str()); + OGS_FATAL("{:s} Key `{:s}' already exists.", error_message, + tostring(key)); } } @@ -153,8 +153,8 @@ typename Map::mapped_type& getOrError(Map& map, Key const& key, auto it = map.find(key); if (it == map.end()) { - OGS_FATAL("{:s} Key `{:s}' does not exist.", error_message.c_str(), - tostring(key).c_str()); + OGS_FATAL("{:s} Key `{:s}' does not exist.", error_message, + tostring(key)); } return it->second; @@ -167,8 +167,8 @@ typename Map::mapped_type const& getOrError(Map const& map, Key const& key, auto it = map.find(key); if (it == map.end()) { - OGS_FATAL("{:s} Key `{:s}' does not exist.", error_message.c_str(), - tostring(key).c_str()); + OGS_FATAL("{:s} Key `{:s}' does not exist.", error_message, + tostring(key)); } return it->second; @@ -187,7 +187,7 @@ typename Container::value_type const& getIfOrError( if (it == end(container)) { OGS_FATAL("Could not find element matching the predicate: {:s}", - error_message.c_str()); + error_message); } return *it; } diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp index a5c52150ca6c394095eb48f1ebd7d9fb8545bad2..bfe48a9274ea093156a7c6f8aef259a8bd90de24 100644 --- a/BaseLib/ConfigTree.cpp +++ b/BaseLib/ConfigTree.cpp @@ -232,15 +232,15 @@ void ConfigTree::warning(const std::string& message) const void ConfigTree::onerror(const std::string& filename, const std::string& path, const std::string& message) { - OGS_FATAL("ConfigTree: In file `{:s}' at path <{:s}>: {:s}", - filename.c_str(), path.c_str(), message.c_str()); + OGS_FATAL("ConfigTree: In file `{:s}' at path <{:s}>: {:s}", filename, path, + message); } void ConfigTree::onwarning(const std::string& filename, const std::string& path, const std::string& message) { - WARN("ConfigTree: In file `{:s}' at path <{:s}>: {:s}", filename.c_str(), - path.c_str(), message.c_str()); + WARN("ConfigTree: In file `{:s}' at path <{:s}>: {:s}", filename, path, + message); } void ConfigTree::assertNoSwallowedErrors() @@ -254,7 +254,7 @@ void ConfigTree::assertNoSwallowedErrors() "file(s):"); for (auto const& msg : configtree_destructor_error_messages) { - ERR("{:s}", msg.c_str()); + ERR("{:s}", msg); } OGS_FATAL("There have been errors when parsing the configuration file(s)."); diff --git a/BaseLib/ConfigTreeUtil.cpp b/BaseLib/ConfigTreeUtil.cpp index 3e41ee6fb251afb9978651c90a82789b5d60353e..f617f746793ec37d0d632f6d39c84c0f58a5b849 100644 --- a/BaseLib/ConfigTreeUtil.cpp +++ b/BaseLib/ConfigTreeUtil.cpp @@ -64,16 +64,16 @@ makeConfigTree(const std::string& filepath, const bool be_ruthless, catch (boost::property_tree::xml_parser_error const& e) { OGS_FATAL("Error while parsing XML file `{:s}' at line {:d}: {:s}.", - e.filename().c_str(), e.line(), e.message().c_str()); + e.filename(), e.line(), e.message()); } - DBUG("Project configuration from file '{:s}' read.", filepath.c_str()); + DBUG("Project configuration from file '{:s}' read.", filepath); if (auto child = ptree.get_child_optional(toplevel_tag)) { return ConfigTreeTopLevel(filepath, be_ruthless, std::move(*child)); } - OGS_FATAL("Tag <{:s}> has not been found in file `{:s}'.", - toplevel_tag.c_str(), filepath.c_str()); + OGS_FATAL("Tag <{:s}> has not been found in file `{:s}'.", toplevel_tag, + filepath); } } // namespace BaseLib diff --git a/BaseLib/FileFinder.cpp b/BaseLib/FileFinder.cpp index fb697517306ef6ef0e03890faeaa194a67f24699..b714a0eeffbec6b7a73b07c606a7b77fc03f48d0 100644 --- a/BaseLib/FileFinder.cpp +++ b/BaseLib/FileFinder.cpp @@ -16,7 +16,6 @@ #include <fstream> -#include "Logging.h" namespace BaseLib { diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp index 3f881e8c30291d5dc82bf7542e4e2afa64a95bf5..f27747ffd3829449aa1b62e92a6c26166f433f92 100644 --- a/BaseLib/FileTools.cpp +++ b/BaseLib/FileTools.cpp @@ -228,7 +228,7 @@ void removeFiles(std::vector<std::string> const& files) int const success = std::remove(file.c_str()); if (success == 0) { - DBUG("Removed '{:s}'", file.c_str()); + DBUG("Removed '{:s}'", file); } else { @@ -236,8 +236,7 @@ void removeFiles(std::vector<std::string> const& files) { continue; } - ERR("Removing file '{:s}' failed with error {:d}.", file.c_str(), - errno); + ERR("Removing file '{:s}' failed with error {:d}.", file, errno); std::perror("Error: "); OGS_FATAL("Unrecoverable error happened while removing a file."); } diff --git a/BaseLib/FileTools.h b/BaseLib/FileTools.h index 008d40ac399bea5ba45ba7486f7ba1a77e0e66d4..7240acef54c4e12f24603c4dfdcc6ddd080a94ce 100644 --- a/BaseLib/FileTools.h +++ b/BaseLib/FileTools.h @@ -76,8 +76,8 @@ std::vector<T> readBinaryArray(std::string const& filename, std::size_t const n) std::ifstream in(filename.c_str()); if (!in) { ERR("readBinaryArray(): Error while reading from file '{:s}'.", - filename.c_str()); - ERR("Could not open file '{:s}' for input.", filename.c_str()); + filename); + ERR("Could not open file '{:s}' for input.", filename); in.close(); return std::vector<T>(); } @@ -95,8 +95,7 @@ std::vector<T> readBinaryArray(std::string const& filename, std::size_t const n) return result; } - ERR("readBinaryArray(): Error while reading from file '{:s}'.", - filename.c_str()); + ERR("readBinaryArray(): Error while reading from file '{:s}'.", filename); ERR("Read different number of values. Expected {:d}, got {:d}.", n, result.size()); diff --git a/BaseLib/IO/Writer.cpp b/BaseLib/IO/Writer.cpp index bd597a1e367d965623c0ad331da98ddcec48d436..a9d63b552ddf9d4df357cd8a007da606ca86905d 100644 --- a/BaseLib/IO/Writer.cpp +++ b/BaseLib/IO/Writer.cpp @@ -54,7 +54,7 @@ int Writer::writeToFile(std::string const& filename) // check file stream if (!fileStream) { - ERR("Could not open file '{:s}'!", filename.c_str()); + ERR("Could not open file '{:s}'!", filename); return 0; } diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp index f9b4a3b10fff958fcd5f6260736fb52de225f1a6..95ed78d9f9450dcd09b6ca7bc4e6e838327535a1 100644 --- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp +++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp @@ -41,7 +41,7 @@ int XMLQtInterface::readFile(const QString &fileName) if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { ERR("XMLQtInterface::readFile(): Can't open xml-file {:s}.", - fileName.toStdString().c_str()); + fileName.toStdString()); return 0; } _fileData = file.readAll(); @@ -75,7 +75,7 @@ int XMLQtInterface::isValid() const INFO( "XMLQtInterface::isValid(): XML file {:s} is invalid (in reference " "to schema {:s}).", - _fileName.toStdString().c_str(), _schemaFile.toStdString().c_str()); + _fileName.toStdString(), _schemaFile.toStdString()); } else { @@ -90,7 +90,7 @@ int XMLQtInterface::isValid() const INFO( "XMLQtInterface::isValid(): XML file {:s} is invalid (in reference " "to its schema).", - _fileName.toStdString().c_str()); + _fileName.toStdString()); } return 0; } diff --git a/BaseLib/StringTools.cpp b/BaseLib/StringTools.cpp index d420900d1407bbee2ff467c8746face319cb5164..6f2118640e5f6e632a47d34b711b32a367d96a63 100644 --- a/BaseLib/StringTools.cpp +++ b/BaseLib/StringTools.cpp @@ -22,7 +22,6 @@ #include <cstdio> #include <iomanip> #include <random> -#include "Logging.h" namespace BaseLib { diff --git a/ChemistryLib/CreateChemicalSolverInterface.cpp b/ChemistryLib/CreateChemicalSolverInterface.cpp index a69a5f0d481504dcc06a953ab81befd0d242ba31..415b69dbd1017b42ba440d3af127a89045aef2f0 100644 --- a/ChemistryLib/CreateChemicalSolverInterface.cpp +++ b/ChemistryLib/CreateChemicalSolverInterface.cpp @@ -51,11 +51,10 @@ std::string parseDatabasePath(BaseLib::ConfigTree const& config) if (!BaseLib::IsFileExisting(path_to_database)) { OGS_FATAL("Not found the specified thermodynamicdatabase: {:s}", - path_to_database.c_str()); + path_to_database); } - INFO("Found the specified thermodynamic database: {:s}", - path_to_database.c_str()); + INFO("Found the specified thermodynamic database: {:s}", path_to_database); return path_to_database; } @@ -85,8 +84,7 @@ createChemicalSolverInterface<ChemicalSolver::Phreeqc>( "Required mesh with name '" + mesh_name + "' not found."); assert(mesh.getID() != 0); - DBUG("Found mesh '{:s}' with id {:d}.", mesh.getName().c_str(), - mesh.getID()); + DBUG("Found mesh '{:s}' with id {:d}.", mesh.getName(), mesh.getID()); auto path_to_database = parseDatabasePath(config); diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp index c196dc4238087b835f68ec144737b777439bbe5f..1735c5f6104d2e184a425189429292daebaaad3c 100644 --- a/ChemistryLib/PhreeqcIO.cpp +++ b/ChemistryLib/PhreeqcIO.cpp @@ -86,7 +86,7 @@ PhreeqcIO::PhreeqcIO(std::string const project_file_name, OGS_FATAL( "Failed in loading the specified thermodynamic database file: " "{:s}.", - _database.c_str()); + _database); } if (SetSelectedOutputFileOn(phreeqc_instance_id, 1) != IPQ_OK) @@ -94,7 +94,7 @@ PhreeqcIO::PhreeqcIO(std::string const project_file_name, OGS_FATAL( "Failed to fly the flag for the specified file {:s} where phreeqc " "will write output.", - _output->basic_output_setups.output_file.c_str()); + _output->basic_output_setups.output_file); } if (_dump) @@ -230,8 +230,7 @@ void PhreeqcIO::setAqueousSolutionsPrevFromDumpFile() std::ifstream in(dump_file); if (!in) { - OGS_FATAL("Could not open phreeqc dump file '{:s}'.", - dump_file.c_str()); + OGS_FATAL("Could not open phreeqc dump file '{:s}'.", dump_file); } std::size_t const num_chemical_systems = _mesh.getNumberOfBaseNodes(); @@ -239,8 +238,7 @@ void PhreeqcIO::setAqueousSolutionsPrevFromDumpFile() if (!in) { - OGS_FATAL("Error when reading phreeqc dump file '{:s}'", - dump_file.c_str()); + OGS_FATAL("Error when reading phreeqc dump file '{:s}'", dump_file); } in.close(); @@ -248,14 +246,13 @@ void PhreeqcIO::setAqueousSolutionsPrevFromDumpFile() void PhreeqcIO::writeInputsToFile(double const dt) { - DBUG("Writing phreeqc inputs into file '{:s}'.", - _phreeqc_input_file.c_str()); + DBUG("Writing phreeqc inputs into file '{:s}'.", _phreeqc_input_file); std::ofstream out(_phreeqc_input_file, std::ofstream::out); if (!out) { OGS_FATAL("Could not open file '{:s}' for writing phreeqc inputs.", - _phreeqc_input_file.c_str()); + _phreeqc_input_file); } out << (*this << dt); @@ -263,7 +260,7 @@ void PhreeqcIO::writeInputsToFile(double const dt) if (!out) { OGS_FATAL("Failed in generating phreeqc input file '{:s}'.", - _phreeqc_input_file.c_str()); + _phreeqc_input_file); } out.close(); @@ -377,7 +374,7 @@ void PhreeqcIO::execute() OGS_FATAL( "Failed in performing speciation calculation with the generated " "phreeqc input file '{:s}'.", - _phreeqc_input_file.c_str()); + _phreeqc_input_file); } } @@ -385,14 +382,13 @@ void PhreeqcIO::readOutputsFromFile() { auto const& basic_output_setups = _output->basic_output_setups; auto const& phreeqc_result_file = basic_output_setups.output_file; - DBUG("Reading phreeqc results from file '{:s}'.", - phreeqc_result_file.c_str()); + DBUG("Reading phreeqc results from file '{:s}'.", phreeqc_result_file); std::ifstream in(phreeqc_result_file); if (!in) { OGS_FATAL("Could not open phreeqc result file '{:s}'.", - phreeqc_result_file.c_str()); + phreeqc_result_file); } in >> *this; @@ -400,7 +396,7 @@ void PhreeqcIO::readOutputsFromFile() if (!in) { OGS_FATAL("Error when reading phreeqc result file '{:s}'", - phreeqc_result_file.c_str()); + phreeqc_result_file); } in.close(); @@ -467,7 +463,7 @@ std::istream& operator>>(std::istream& in, PhreeqcIO& phreeqc_io) "double for chemical system {:d}, column {:d}. " "Exception " "'{:s}' was thrown.", - items[item_id].c_str(), global_id, item_id, e.what()); + items[item_id], global_id, item_id, e.what()); } catch (const std::out_of_range& e) { @@ -477,7 +473,7 @@ std::istream& operator>>(std::istream& in, PhreeqcIO& phreeqc_io) "double for chemical system {:d}, column {:d}. " "Exception " "'{:s}' was thrown.", - items[item_id].c_str(), global_id, item_id, e.what()); + items[item_id], global_id, item_id, e.what()); } accepted_items.push_back(value); } diff --git a/ChemistryLib/PhreeqcIOData/CreateSolutionComponent.cpp b/ChemistryLib/PhreeqcIOData/CreateSolutionComponent.cpp index 45b01d8e8696403e887ee6c5ef9e3e9022db3832..66430c61ddb53168b54df85db3b10b331d9747e2 100644 --- a/ChemistryLib/PhreeqcIOData/CreateSolutionComponent.cpp +++ b/ChemistryLib/PhreeqcIOData/CreateSolutionComponent.cpp @@ -50,7 +50,7 @@ std::vector<Component> createSolutionComponents( "in " "specified coupled processes (see " "<process>/<process_variables>/<concentration>).", - component.name.c_str()); + component.name); } } if (components.size() + 1 != process_id_to_component_name_map.size()) diff --git a/ChemistryLib/PhreeqcKernel.cpp b/ChemistryLib/PhreeqcKernel.cpp index 5648119467f8249c8a0d51fab6026b9d8bb4351d..ee69c846d3550a70948f941c113315dd1509a660 100644 --- a/ChemistryLib/PhreeqcKernel.cpp +++ b/ChemistryLib/PhreeqcKernel.cpp @@ -26,7 +26,7 @@ PhreeqcKernel::PhreeqcKernel( std::size_t const num_chemical_systems, std::vector<std::pair<int, std::string>> const& process_id_to_component_name_map, - std::string const database, + std::string const& database, AqueousSolution aqueous_solution, std::unique_ptr<EquilibriumReactants>&& equilibrium_reactants, std::unique_ptr<Kinetics>&& kinetic_reactants, @@ -131,7 +131,7 @@ void PhreeqcKernel::loadDatabase(std::string const& database) std::ifstream in(database); if (!in) { - OGS_FATAL("Unable to open database file '{:s}'.", database.c_str()); + OGS_FATAL("Unable to open database file '{:s}'.", database); } assert(phrq_io->get_istream() == nullptr); phrq_io->push_istream(&in, false); diff --git a/ChemistryLib/PhreeqcKernel.h b/ChemistryLib/PhreeqcKernel.h index c7b62005b806f640687f5f6a6259399f000a8f16..de5ed34a844dce581ef8ed52d7413731bfbc21de 100644 --- a/ChemistryLib/PhreeqcKernel.h +++ b/ChemistryLib/PhreeqcKernel.h @@ -35,7 +35,7 @@ public: PhreeqcKernel(std::size_t const num_chemical_systems, std::vector<std::pair<int, std::string>> const& process_id_to_component_name_map, - std::string const database, + std::string const& database, AqueousSolution aqueous_solution, std::unique_ptr<EquilibriumReactants>&& equilibrium_reactants, std::unique_ptr<Kinetics>&& kinetic_reactants, diff --git a/ChemistryLib/PhreeqcKernelData/CreateInitialAqueousSolution.cpp b/ChemistryLib/PhreeqcKernelData/CreateInitialAqueousSolution.cpp index 2afda65161f70ec86d64835f59065dee85c9f6aa..7e66fa138889a657eb139c1898574be2285013a1 100644 --- a/ChemistryLib/PhreeqcKernelData/CreateInitialAqueousSolution.cpp +++ b/ChemistryLib/PhreeqcKernelData/CreateInitialAqueousSolution.cpp @@ -53,7 +53,7 @@ InitialAqueousSolution createInitialAqueousSolution( "in " "specified coupled processes (see " "<process>/<process_variables>/<concentration>).", - component.first.c_str()); + component.first); } } diff --git a/GeoLib/AnalyticalGeometry.cpp b/GeoLib/AnalyticalGeometry.cpp index 51d13a3740753eda8887c344c716b7d9d96eec5a..2fb60f12740adf53c3f7cb7a1f278ba2e6fd661a 100644 --- a/GeoLib/AnalyticalGeometry.cpp +++ b/GeoLib/AnalyticalGeometry.cpp @@ -18,7 +18,6 @@ #include <cmath> #include <limits> -#include "BaseLib/Logging.h" #include <Eigen/Dense> @@ -442,7 +441,7 @@ std::vector<MathLib::Point3d> lineSegmentIntersect2d( OGS_FATAL( "The case of parallel line segments ({:s}) is not handled yet. " "Aborting.", - err.str().c_str()); + err.str()); } // check if d in (ab) @@ -470,7 +469,7 @@ std::vector<MathLib::Point3d> lineSegmentIntersect2d( OGS_FATAL( "The case of parallel line segments ({:s}) " "is not handled yet. Aborting.", - err.str().c_str()); + err.str()); } return std::vector<MathLib::Point3d>(); } diff --git a/GeoLib/DuplicateGeometry.cpp b/GeoLib/DuplicateGeometry.cpp index 85e1fd7db0450fdf914dd25efa8a53f19119b54f..fe7d1c5a1cc0d09d034847059b8e7106355a6939 100644 --- a/GeoLib/DuplicateGeometry.cpp +++ b/GeoLib/DuplicateGeometry.cpp @@ -35,7 +35,7 @@ void DuplicateGeometry::duplicate(std::string const& input_name) std::vector<GeoLib::Point*> const*const pnts (_geo_objects.getPointVec(input_name)); if (pnts == nullptr) { - ERR("Geometry '{:s}' not found.", input_name.c_str()); + ERR("Geometry '{:s}' not found.", input_name); return; } diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index b9dc4335b3128f0b9dfc929f96ebcf3e6dbfda3c..0bb1ff59ce1f64b11987df2015f7973a094e5e48 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -68,8 +68,7 @@ const std::vector<Point*>* GEOObjects::getPointVec(const std::string &name) cons return _pnt_vecs[idx]->getVector(); } - DBUG("GEOObjects::getPointVec() - No entry found with name '{:s}'.", - name.c_str()); + DBUG("GEOObjects::getPointVec() - No entry found with name '{:s}'.", name); return nullptr; } @@ -82,7 +81,7 @@ const PointVec* GEOObjects::getPointVecObj(const std::string &name) const } DBUG("GEOObjects::getPointVecObj() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -105,7 +104,7 @@ bool GEOObjects::removePointVec(std::string const& name) } } DBUG("GEOObjects::removePointVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return false; } @@ -130,7 +129,7 @@ const std::vector<GeoLib::Point*>* GEOObjects::getStationVec( return (*it)->getVector(); } DBUG("GEOObjects::getStationVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -206,7 +205,7 @@ const std::vector<Polyline*>* GEOObjects::getPolylineVec(const std::string &name } DBUG("GEOObjects::getPolylineVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -222,7 +221,7 @@ const PolylineVec* GEOObjects::getPolylineVecObj(const std::string &name) const } DBUG("GEOObjects::getPolylineVecObj() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -240,7 +239,7 @@ bool GEOObjects::removePolylineVec(std::string const& name) } DBUG("GEOObjects::removePolylineVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return false; } @@ -301,7 +300,7 @@ const std::vector<Surface*>* GEOObjects::getSurfaceVec(const std::string &name) } } DBUG("GEOObjects::getSurfaceVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -319,7 +318,7 @@ bool GEOObjects::removeSurfaceVec(const std::string &name) } DBUG("GEOObjects::removeSurfaceVec() - No entry found with name '{:s}'.", - name.c_str()); + name); return false; } @@ -334,7 +333,7 @@ const SurfaceVec* GEOObjects::getSurfaceVecObj(const std::string &name) const } } DBUG("GEOObjects::getSurfaceVecObj() - No entry found with name '{:s}'.", - name.c_str()); + name); return nullptr; } @@ -667,13 +666,13 @@ int GEOObjects::geoPointsToStations(std::string const& geo_name, GeoLib::PointVec const* const pnt_obj(getPointVecObj(geo_name)); if (pnt_obj == nullptr) { - ERR("Point vector {:s} not found.", geo_name.c_str()); + ERR("Point vector {:s} not found.", geo_name); return -1; } std::vector<GeoLib::Point*> const& pnts = *pnt_obj->getVector(); if (pnts.empty()) { - ERR("Point vector {:s} is empty.", geo_name.c_str()); + ERR("Point vector {:s} is empty.", geo_name); return -1; } std::size_t const n_pnts(pnts.size()); @@ -755,8 +754,8 @@ const GeoLib::GeoObject* GEOObjects::getGeoObject( DBUG( "GEOObjects::getGeoObject(): Could not find {:s} '{:s}' in " "geometry.", - GeoLib::convertGeoTypeToString(type).c_str(), - geo_obj_name.c_str()); + GeoLib::convertGeoTypeToString(type), + geo_obj_name); } return geo_obj; } @@ -785,7 +784,7 @@ GeoLib::GeoObject const* GEOObjects::getGeoObject( DBUG( "GEOObjects::getGeoObject(): Could not find '{:s}' in geometry " "{:s}.", - geo_obj_name.c_str(), geo_name.c_str()); + geo_obj_name, geo_name); } return geo_obj; } diff --git a/GeoLib/IO/TINInterface.cpp b/GeoLib/IO/TINInterface.cpp index 5b109b3f7277dbff392a1aa335440e073c8a2752..4f67fe73f455cea11beab264325ef01a13d6f6f1 100644 --- a/GeoLib/IO/TINInterface.cpp +++ b/GeoLib/IO/TINInterface.cpp @@ -34,7 +34,7 @@ GeoLib::Surface* TINInterface::readTIN(std::string const& fname, // open file std::ifstream in(fname.c_str()); if (!in) { - WARN("readTIN(): could not open stream from {:s}.", fname.c_str()); + WARN("readTIN(): could not open stream from {:s}.", fname); if (errors) { errors->push_back("readTINFile error opening stream from " + fname); @@ -140,7 +140,7 @@ GeoLib::Surface* TINInterface::readTIN(std::string const& fname, } if (sfc->getNumberOfTriangles() == 0) { - WARN("readTIN(): No triangle found.", fname.c_str()); + WARN("readTIN(): No triangle found.", fname); if (errors) { errors->push_back("readTIN error because of no triangle found"); @@ -156,8 +156,7 @@ void TINInterface::writeSurfaceAsTIN(GeoLib::Surface const& surface, std::string { std::ofstream os (file_name.c_str()); if (!os) { - WARN("writeSurfaceAsTIN(): could not open stream to {:s}.", - file_name.c_str()); + WARN("writeSurfaceAsTIN(): could not open stream to {:s}.", file_name); return; } os.precision(std::numeric_limits<double>::digits10); diff --git a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp index b035188374e928f9f847943c0c5c8ba3975b64ba..f24722bd472dcde4e7e676b6415b7bbfdb64c234 100644 --- a/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.cpp @@ -45,12 +45,10 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) doc->ignoreConfigAttribute("xsi:noNamespaceSchemaLocation"); doc->ignoreConfigAttribute("xmlns:ogs"); - auto points = std::make_unique<std::vector<GeoLib::Point*>>(); auto polylines = std::make_unique<std::vector<GeoLib::Polyline*>>(); auto surfaces = std::make_unique<std::vector<GeoLib::Surface*>>(); using MapNameId = std::map<std::string, std::size_t>; - auto pnt_names = std::make_unique<MapNameId>(); auto ply_names = std::make_unique<MapNameId>(); auto sfc_names = std::make_unique<MapNameId>(); @@ -64,6 +62,8 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) //! \ogs_file_param{gml__points} for (auto st : doc->getConfigSubtreeList("points")) { + auto points = std::make_unique<std::vector<GeoLib::Point*>>(); + auto pnt_names = std::make_unique<MapNameId>(); readPoints(st, *points, *pnt_names); _geo_objects.addPointVec(std::move(points), geo_name, std::move(pnt_names)); @@ -264,7 +264,7 @@ bool BoostXmlGmlInterface::write() if (! pnt_vec) { ERR("BoostXmlGmlInterface::write(): No PointVec within the geometry " "'{:s}'.", - _exportName.c_str()); + _exportName); return false; } @@ -272,13 +272,13 @@ bool BoostXmlGmlInterface::write() if (! pnts) { ERR("BoostXmlGmlInterface::write(): No vector of points within the " "geometry '{:s}'.", - _exportName.c_str()); + _exportName); return false; } if (pnts->empty()) { ERR("BoostXmlGmlInterface::write(): No points within the geometry " "'{:s}'.", - _exportName.c_str()); + _exportName); return false; } @@ -322,7 +322,7 @@ void BoostXmlGmlInterface::addSurfacesToPropertyTree( INFO( "BoostXmlGmlInterface::addSurfacesToPropertyTree(): " "No surfaces within the geometry '{:s}'.", - _exportName.c_str()); + _exportName); return; } @@ -332,7 +332,7 @@ void BoostXmlGmlInterface::addSurfacesToPropertyTree( INFO( "BoostXmlGmlInterface::addSurfacesToPropertyTree(): " "No surfaces within the geometry '{:s}'.", - _exportName.c_str()); + _exportName); return; } @@ -364,7 +364,7 @@ void BoostXmlGmlInterface::addPolylinesToPropertyTree( INFO( "BoostXmlGmlInterface::addPolylinesToPropertyTree(): " "No polylines within the geometry '{:s}'.", - _exportName.c_str()); + _exportName); return; } @@ -374,7 +374,7 @@ void BoostXmlGmlInterface::addPolylinesToPropertyTree( INFO( "BoostXmlGmlInterface::addPolylinesToPropertyTree(): " "No polylines within the geometry '{:s}'.", - _exportName.c_str()); + _exportName); return; } diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index aff68e29f5a7d7299c4510f1065692eef7977bbb..bf16c1ab19d7b58e3bec1909b3a814ede440f36e 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -231,7 +231,7 @@ void XmlGmlInterface::readPolylines( WARN( "Polyline '{:s}' exists already. Polyline {:d} will be " "inserted without a name.", - ply_name.c_str(), idx); + ply_name, idx); } } @@ -250,7 +250,7 @@ void XmlGmlInterface::readPolylines( OGS_FATAL( "Polyline `{:s}' contains the point id `{:d}' which is " "not in the point list.", - polyline_name.c_str(), pt_idx); + polyline_name, pt_idx); } return search->second; }; @@ -297,7 +297,7 @@ void XmlGmlInterface::readSurfaces( OGS_FATAL( "Surface `{:s}' contains the point id `{:d}', which is " "not in the point list.", - surface_name.c_str(), pt_idx); + surface_name, pt_idx); } return search->second; }; diff --git a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp index bb8a33f9d517c6dc037a43af2be27027d060091c..ff493674190e846a203ee869fe42b14c07fd5426 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp @@ -219,7 +219,7 @@ void XmlStnInterface::readStratigraphy( const QDomNode &stratRoot, WARN( "XmlStnInterface::readStratigraphy(): Skipped layer '{:s}' " "in borehole '{:s}' because of thickness 0.0.", - horizonName.c_str(), borehole->getName().c_str()); + horizonName, borehole->getName()); } else WARN("XmlStnInterface::readStratigraphy(): Attribute missing in <horizon> tag."); diff --git a/GeoLib/SensorData.cpp b/GeoLib/SensorData.cpp index e254f5cf21f1675406b1a097ea640281882191ee..4cf64928fb40347614cd9ea8871f7ecd34d08cb1 100644 --- a/GeoLib/SensorData.cpp +++ b/GeoLib/SensorData.cpp @@ -97,7 +97,7 @@ int SensorData::readDataFromFile(const std::string &file_name) if (!in.is_open()) { INFO("SensorData::readDataFromFile() - Could not open file {:s}.", - file_name.c_str()); + file_name); return 0; } diff --git a/Jenkinsfile b/Jenkinsfile index 14d3a838e7065be092f728d20d43cbf5c0da730d..e05b7c26571084dcc3e50d36551612697b6879f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -438,7 +438,7 @@ pipeline { excludeFile('.*\\.conan.*'), excludeFile('.*thread.hpp')], tools: [msBuild(name: 'MSVC', pattern: 'build/build*.log')], - qualityGates: [[threshold: 10, type: 'TOTAL', unstable: true]] + qualityGates: [[threshold: 7, type: 'TOTAL', unstable: true]] } success { archiveArtifacts 'build/*.zip,build/conaninfo.txt' @@ -530,7 +530,7 @@ pipeline { excludeFile('.*qrc_icons\\.cpp.*'), excludeMessage('.*QVTKWidget.*'), excludeMessage('.*tmpnam.*')], tools: [clang(name: 'Clang (macOS, GUI)', pattern: 'build/build.log', - id: 'clang-mac-gui')], unstableTotalAll: 3 + id: 'clang-mac-gui')], unstableTotalAll: 1 } success { archiveArtifacts 'build/*.tar.gz,build/*.dmg,build/conaninfo.txt' @@ -570,7 +570,7 @@ pipeline { recordIssues enabledForFailure: true, filters: [ excludeFile('.*\\.conan.*')], tools: [clangTidy(name: 'Clang-Tidy', pattern: 'build/build.log')], - qualityGates: [[threshold: 260, type: 'TOTAL', unstable: true]] + qualityGates: [[threshold: 165, type: 'TOTAL', unstable: true]] } } } diff --git a/MaterialLib/Adsorption/Reaction.cpp b/MaterialLib/Adsorption/Reaction.cpp index 3ee1739c8923327ef78927950a4f6f92c18c4f66..4eea4e2fa2c215ab788770740fb18ea902d807ba 100644 --- a/MaterialLib/Adsorption/Reaction.cpp +++ b/MaterialLib/Adsorption/Reaction.cpp @@ -7,7 +7,6 @@ * http://www.opengeosys.org/project/license */ -#include "BaseLib/Logging.h" #include "BaseLib/StringTools.h" @@ -82,7 +81,7 @@ newInstance(BaseLib::ConfigTree const& conf) return std::make_unique<ReactionCaOH2>(conf); } - OGS_FATAL("Unknown reactive system: {:s}.", type.c_str()); + OGS_FATAL("Unknown reactive system: {:s}.", type); return nullptr; } diff --git a/MaterialLib/Adsorption/ReactionCaOH2.cpp b/MaterialLib/Adsorption/ReactionCaOH2.cpp index 9bd1f3564974319ae7a350bfe64b748a0ce60b62..5cc9a6623e5d7c01832ea2116ebe30b2c5cdcaaf 100644 --- a/MaterialLib/Adsorption/ReactionCaOH2.cpp +++ b/MaterialLib/Adsorption/ReactionCaOH2.cpp @@ -11,7 +11,6 @@ #include <cassert> #include "Adsorption.h" #include "BaseLib/Error.h" -#include "BaseLib/Logging.h" #include "MaterialLib/PhysicalConstant.h" namespace Adsorption diff --git a/MaterialLib/Adsorption/ReactionSinusoidal.h b/MaterialLib/Adsorption/ReactionSinusoidal.h index 0282d81370a3ea50c529c7b32f7754bb518d369d..eb5c7b5bc01959abe13d87255bbfc39a3c58fe0a 100644 --- a/MaterialLib/Adsorption/ReactionSinusoidal.h +++ b/MaterialLib/Adsorption/ReactionSinusoidal.h @@ -9,7 +9,6 @@ #pragma once -#include "BaseLib/Logging.h" #include "Reaction.h" #include "BaseLib/ConfigTree.h" diff --git a/MaterialLib/Fluid/Density/LiquidDensity.h b/MaterialLib/Fluid/Density/LiquidDensity.h index 32b58cbd68bfa845666e628237b7432a57eb8307..d8fb8eb6e7633412e113a0f8a2796663ba8cdcca 100644 --- a/MaterialLib/Fluid/Density/LiquidDensity.h +++ b/MaterialLib/Fluid/Density/LiquidDensity.h @@ -15,7 +15,6 @@ #include <vector> -#include "BaseLib/Error.h" #include "BaseLib/ConfigTree.h" diff --git a/MaterialLib/FractureModels/CohesiveZoneModeI.cpp b/MaterialLib/FractureModels/CohesiveZoneModeI.cpp index 57eb517d9d2e86c6b3ad817d91d14ae8e023ddef..fa926a2029452cb4f9f43710de6b9dc414e305c1 100644 --- a/MaterialLib/FractureModels/CohesiveZoneModeI.cpp +++ b/MaterialLib/FractureModels/CohesiveZoneModeI.cpp @@ -12,7 +12,6 @@ #include "CohesiveZoneModeI.h" #include "LogPenalty.h" -#include "BaseLib/Error.h" #include "MathLib/MathTools.h" namespace MaterialLib diff --git a/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp index 55b26532630a442f831f8871c9812c8aba63e6a0..74c932fd9bf9e76d544b2a620a6b5db21df0be5c 100644 --- a/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp +++ b/MaterialLib/FractureModels/Permeability/CreatePermeabilityModel.cpp @@ -33,6 +33,6 @@ std::unique_ptr<Permeability> createPermeabilityModel( return MaterialLib::Fracture::Permeability::createCubicLaw(config); } OGS_FATAL("Unknown fracture permeability model type \"{:s}\".", - permeability_model_type.c_str()); + permeability_model_type); } } // namespace MaterialLib::Fracture::Permeability diff --git a/MaterialLib/MPL/Component.h b/MaterialLib/MPL/Component.h index 3305b0facb836dd08f31d503a7b537d46ad6a712..733ef53201380192ded090e260e59bdc4eedf1e0 100644 --- a/MaterialLib/MPL/Component.h +++ b/MaterialLib/MPL/Component.h @@ -94,7 +94,7 @@ void checkRequiredProperties(Component const& c, if (!c.hasProperty(p)) { OGS_FATAL("The property '{:s}' is missing in the component '{:s}'.", - property_enum_to_string[p].c_str(), c.name.c_str()); + property_enum_to_string[p], c.name); } } } diff --git a/MaterialLib/MPL/CreateComponent.cpp b/MaterialLib/MPL/CreateComponent.cpp index e41d46f8db6ccc2963c9f2b58e101ab38c2c6231..2b580c524da832fdc3bbbc5587617acfccc1b52c 100644 --- a/MaterialLib/MPL/CreateComponent.cpp +++ b/MaterialLib/MPL/CreateComponent.cpp @@ -99,7 +99,7 @@ std::vector<std::unique_ptr<Component>> createComponents( { OGS_FATAL( "Found duplicates with the same component name tag '{:s}'.", - component->name.c_str()); + component->name); } components.push_back(std::move(component)); diff --git a/MaterialLib/MPL/CreatePhase.cpp b/MaterialLib/MPL/CreatePhase.cpp index 2cb89190c327b2eba33d858b125bf1de98036553..ccbf7668aaf7cd890c6de18b64f44b1bb313ae4f 100644 --- a/MaterialLib/MPL/CreatePhase.cpp +++ b/MaterialLib/MPL/CreatePhase.cpp @@ -54,9 +54,9 @@ std::unique_ptr<MaterialPropertyLib::Phase> createPhase( ERR("Phase type should be one of:"); for (auto const type : allowed_phase_types) { - ERR(type.c_str()); + ERR("{:s}", type); } - OGS_FATAL("Wrong phase type '{:s}' given.", phase_type.c_str()); + OGS_FATAL("Wrong phase type '{:s}' given.", phase_type); } // Parsing of optional components. @@ -76,7 +76,7 @@ std::unique_ptr<MaterialPropertyLib::Phase> createPhase( OGS_FATAL( "Neither tag <components> nor tag <properties> has been set for " "the phase '{:s}'.", - phase_type.c_str()); + phase_type); } return std::make_unique<Phase>( @@ -115,7 +115,7 @@ std::vector<std::unique_ptr<Phase>> createPhases( }) != phases.end()) { OGS_FATAL("Found duplicates with the same phase name tag '{:s}'.", - phase->name.c_str()); + phase->name); } phases.push_back(std::move(phase)); diff --git a/MaterialLib/MPL/CreateProperty.cpp b/MaterialLib/MPL/CreateProperty.cpp index 85458e860943babf28e7f02147d1385bd448506d..3e39e02951a87a75f9fd63fde91a928bc7f4dfc1 100644 --- a/MaterialLib/MPL/CreateProperty.cpp +++ b/MaterialLib/MPL/CreateProperty.cpp @@ -136,7 +136,7 @@ std::unique_ptr<MaterialPropertyLib::Property> createProperty( // If none of the above property types are found, OGS throws an error. OGS_FATAL("The specified component property type '{:s}' was not recognized", - property_type.c_str()); + property_type); } } // namespace diff --git a/MaterialLib/MPL/Medium.h b/MaterialLib/MPL/Medium.h index 58355279ce2745a34c47d51cd9e4bf001e207fd6..fc7da58643bd4c5903458fcf2243b293640d7558 100644 --- a/MaterialLib/MPL/Medium.h +++ b/MaterialLib/MPL/Medium.h @@ -99,7 +99,7 @@ void checkRequiredProperties(Medium const& medium, { OGS_FATAL( "The property '{:s}' is missing in the medium definition.", - property_enum_to_string[p].c_str()); + property_enum_to_string[p]); } } } diff --git a/MaterialLib/MPL/Phase.h b/MaterialLib/MPL/Phase.h index feba1546d5f1579ae3342f0ab28d49a661933a80..576e7d2d47d03a86e251d248d4bb20123f047677 100644 --- a/MaterialLib/MPL/Phase.h +++ b/MaterialLib/MPL/Phase.h @@ -73,7 +73,7 @@ void checkRequiredProperties(Phase const& phase, Container const& required_prope if (!phase.hasProperty(p)) { OGS_FATAL("The property '{:s}' is missing in the {:s} phase.", - property_enum_to_string[p].c_str(), phase.name.c_str()); + property_enum_to_string[p], phase.name); } } } diff --git a/MaterialLib/MPL/Properties/CreateCurveProperty.cpp b/MaterialLib/MPL/Properties/CreateCurveProperty.cpp index 337a22fba0a75980d279f142a1f6963a4ffad7f4..695120e4fd140e4e0656825b3ca19e3db032d1f7 100644 --- a/MaterialLib/MPL/Properties/CreateCurveProperty.cpp +++ b/MaterialLib/MPL/Properties/CreateCurveProperty.cpp @@ -30,7 +30,7 @@ std::unique_ptr<CurveProperty> createCurveProperty( //! \ogs_file_param{properties__property__Curve__curve} auto curve_name = config.getConfigParameter<std::string>("curve"); - DBUG("Using curve '{:s}'", curve_name.c_str()); + DBUG("Using curve '{:s}'", curve_name); auto const& curve = *BaseLib::getOrError(curves, curve_name, "Could not find curve."); @@ -38,8 +38,7 @@ std::unique_ptr<CurveProperty> createCurveProperty( auto const independent_variable_string = //! \ogs_file_param{properties__property__Curve__independent_variable} config.getConfigParameter<std::string>("independent_variable"); - DBUG("Using independent_variable '{:s}'", - independent_variable_string.c_str()); + DBUG("Using independent_variable '{:s}'", independent_variable_string); auto const independent_variable = MaterialPropertyLib::convertStringToVariable( independent_variable_string); @@ -47,4 +46,4 @@ std::unique_ptr<CurveProperty> createCurveProperty( return std::make_unique<CurveProperty>(independent_variable, curve); } -} // namespace ParameterLib +} // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/DupuitPermeability.h b/MaterialLib/MPL/Properties/DupuitPermeability.h index a2b9ab4ed564ff2df4e39fdb2ab9040f4147b3ee..2cc576c665541d41df3a34c0d4bfddc457b95c71 100644 --- a/MaterialLib/MPL/Properties/DupuitPermeability.h +++ b/MaterialLib/MPL/Properties/DupuitPermeability.h @@ -20,7 +20,8 @@ class DupuitPermeability final : public Property { public: /// This constructor accepts two parameters. - DupuitPermeability(ParameterLib::Parameter<double> const& parameter); + explicit DupuitPermeability( + ParameterLib::Parameter<double> const& parameter); /// This method computes the value of a property depending linearly on /// the value of the given primary variable. diff --git a/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.cpp b/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.cpp index 25abb24255c9c96767b57d092f6bd6ae7576fe11..9d87529f4f59225cf4311e968c399c7af496debb 100644 --- a/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.cpp +++ b/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.cpp @@ -43,7 +43,7 @@ void PermeabilityOrthotropicPowerLaw<DisplacementDim>::setScale( OGS_FATAL( "The property 'PermeabilityOrthotropicPowerLaw' must be " "given in the 'Solid' phase, not in '{:s}' phase.", - _phase->name.c_str()); + _phase->name); } } else diff --git a/MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp b/MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp index 4b7a31d83247b7d54afffa1440fcd8622f4c41a1..552683140c4633ecbf1e7a4ae2ba0f375b79176b 100644 --- a/MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp +++ b/MaterialLib/MPL/Properties/PorosityFromMassBalance.cpp @@ -27,7 +27,7 @@ void PorosityFromMassBalance::setScale( OGS_FATAL( "The property 'PorosityFromMassBalance' must be " "given in the 'Solid' phase, not in '{:s}' phase.", - _phase->name.c_str()); + _phase->name); } } else diff --git a/MaterialLib/MPL/Properties/RelativePermeability/RelPermBrooksCorey.cpp b/MaterialLib/MPL/Properties/RelativePermeability/RelPermBrooksCorey.cpp index 136b54bf8272dca748ec52317f64a3ac2c0565fe..eca986d0748ec80af4919e76b9e582379561a71a 100644 --- a/MaterialLib/MPL/Properties/RelativePermeability/RelPermBrooksCorey.cpp +++ b/MaterialLib/MPL/Properties/RelativePermeability/RelPermBrooksCorey.cpp @@ -5,7 +5,7 @@ * \brief * * \copyright - * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license diff --git a/MaterialLib/MPL/Properties/RelativePermeability/RelPermLiakopoulos.cpp b/MaterialLib/MPL/Properties/RelativePermeability/RelPermLiakopoulos.cpp index db6677073e267850bb24ac798bcacb8018cec5f5..359524a25da7188c2cb8698f4ddfe4c01c94a4a5 100644 --- a/MaterialLib/MPL/Properties/RelativePermeability/RelPermLiakopoulos.cpp +++ b/MaterialLib/MPL/Properties/RelativePermeability/RelPermLiakopoulos.cpp @@ -4,7 +4,7 @@ * \brief * * \copyright - * Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org) + * Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license diff --git a/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp b/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp index 3c89e83b674c606e32381f7418cd5d307bee631c..5f7eb5802724bf774ac289c6a2f3e49fafe2f0c5 100644 --- a/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp +++ b/MaterialLib/MPL/Properties/SaturationDependentSwelling.cpp @@ -43,7 +43,7 @@ void SaturationDependentSwelling::setScale( OGS_FATAL( "The property 'SaturationDependentSwelling' must be " "given in the 'Solid' phase, not in '{:s}' phase.", - _phase->name.c_str()); + _phase->name); } } else diff --git a/MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp b/MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp index 25e06ce87cc20c00cf7466fd8640aaaf100e4642..8d5459dccc33f1c31d9486cbb35bed02229f675c 100644 --- a/MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp +++ b/MaterialLib/MPL/Properties/TransportPorosityFromMassBalance.cpp @@ -27,7 +27,7 @@ void TransportPorosityFromMassBalance::setScale( OGS_FATAL( "The property 'TransportPorosityFromMassBalance' must be " "given in the 'Solid' phase, not in '{:s}' phase.", - _phase->name.c_str()); + _phase->name); } } else diff --git a/MaterialLib/MPL/PropertyType.h b/MaterialLib/MPL/PropertyType.h index 3b44b4c59182101648139173558e2d6c67cd09a0..be5be139d31053f764f8ffbe52445fa64169b674 100644 --- a/MaterialLib/MPL/PropertyType.h +++ b/MaterialLib/MPL/PropertyType.h @@ -271,7 +271,7 @@ inline PropertyType convertStringToProperty(std::string const& inString) OGS_FATAL( "The property name '{:s}' does not correspond to any known property", - inString.c_str()); + inString); return PropertyType::number_of_properties; // to avoid the 'no return' // warning diff --git a/MaterialLib/MPL/VariableType.cpp b/MaterialLib/MPL/VariableType.cpp index a93a464ef6cacef0e914769466186237ab4b0d43..1b42626469a7dfcc15697c77196c35c0efd6a65d 100644 --- a/MaterialLib/MPL/VariableType.cpp +++ b/MaterialLib/MPL/VariableType.cpp @@ -47,7 +47,7 @@ Variable convertStringToVariable(std::string const& input) OGS_FATAL( "The variable name '{:s}' does not correspond to any known variable", - input.c_str()); + input); return Variable::number_of_variables; // to avoid the 'no return' warning } diff --git a/MaterialLib/PorousMedium/Permeability/DupuitPermeability.h b/MaterialLib/PorousMedium/Permeability/DupuitPermeability.h index aaff0b47851faff921485e22c66d1e3977368b66..869b9b4e37bd62fcd2c98a432c6cbcf0f8f85392 100644 --- a/MaterialLib/PorousMedium/Permeability/DupuitPermeability.h +++ b/MaterialLib/PorousMedium/Permeability/DupuitPermeability.h @@ -12,7 +12,6 @@ #include <Eigen/Dense> -#include "BaseLib/Error.h" #include "MaterialLib/PorousMedium/Permeability/Permeability.h" #include "ParameterLib/Parameter.h" diff --git a/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp b/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp index d99a9ab5c512cff81a394b6168d194ca35eb3297..6f3ff38020bfd283d7240719a1ef003c918251b8 100644 --- a/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp +++ b/MaterialLib/SolidModels/CreateConstitutiveRelation.cpp @@ -83,7 +83,7 @@ createConstitutiveRelation( #endif // OGS_USE_MFRONT } OGS_FATAL("Cannot construct constitutive relation of given type '{:s}'.", - type.c_str()); + type); } template <int DisplacementDim> diff --git a/MaterialLib/SolidModels/CreateCreepBGRa.cpp b/MaterialLib/SolidModels/CreateCreepBGRa.cpp index 3fbcee805a2d8eacd473d4c17b26447f609eccc3..c7e9e1aa15503ca9b3adefdcefe92893719bd272 100644 --- a/MaterialLib/SolidModels/CreateCreepBGRa.cpp +++ b/MaterialLib/SolidModels/CreateCreepBGRa.cpp @@ -19,7 +19,6 @@ #include "MechanicsBase.h" #include "BaseLib/ConfigTree.h" -#include "BaseLib/Error.h" #include "ParameterLib/Parameter.h" #include "ParameterLib/Utils.h" diff --git a/MaterialLib/SolidModels/CreateEhlers.h b/MaterialLib/SolidModels/CreateEhlers.h index 0cf567ee0b85c1974c983b74dd867c9c39fdae6d..87163e343efa167aa7af2a359d8790e7953d1dc1 100644 --- a/MaterialLib/SolidModels/CreateEhlers.h +++ b/MaterialLib/SolidModels/CreateEhlers.h @@ -29,19 +29,19 @@ inline std::unique_ptr<DamagePropertiesParameters> createDamageProperties( auto& alpha_d = ParameterLib::findParameter<double>(config, "alpha_d", parameters, 1); - DBUG("Use '{:s}' as alpha_d.", alpha_d.name.c_str()); + DBUG("Use '{:s}' as alpha_d.", alpha_d.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__damage_properties__beta_d} auto& beta_d = ParameterLib::findParameter<double>(config, "beta_d", parameters, 1); - DBUG("Use '{:s}' as beta_d.", beta_d.name.c_str()); + DBUG("Use '{:s}' as beta_d.", beta_d.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__damage_properties__h_d} auto& h_d = ParameterLib::findParameter<double>(config, "h_d", parameters, 1); - DBUG("Use '{:s}' as h_d.", h_d.name.c_str()); + DBUG("Use '{:s}' as h_d.", h_d.name); return std::make_unique<DamagePropertiesParameters>( DamagePropertiesParameters{alpha_d, beta_d, h_d}); @@ -60,97 +60,96 @@ std::unique_ptr<SolidEhlers<DisplacementDim>> createEhlers( auto& shear_modulus = ParameterLib::findParameter<double>( config, "shear_modulus", parameters, 1); - DBUG("Use '{:s}' as shear modulus parameter.", shear_modulus.name.c_str()); + DBUG("Use '{:s}' as shear modulus parameter.", shear_modulus.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__bulk_modulus} auto& bulk_modulus = ParameterLib::findParameter<double>( config, "bulk_modulus", parameters, 1); - DBUG("Use '{:s}' as bulk modulus parameter.", bulk_modulus.name.c_str()); + DBUG("Use '{:s}' as bulk modulus parameter.", bulk_modulus.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__kappa} auto& kappa = ParameterLib::findParameter<double>(config, "kappa", parameters, 1); - DBUG("Use '{:s}' as kappa.", kappa.name.c_str()); + DBUG("Use '{:s}' as kappa.", kappa.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__beta} auto& beta = ParameterLib::findParameter<double>(config, "beta", parameters, 1); - DBUG("Use '{:s}' as beta.", beta.name.c_str()); + DBUG("Use '{:s}' as beta.", beta.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__gamma} auto& gamma = ParameterLib::findParameter<double>(config, "gamma", parameters, 1); - DBUG("Use '{:s}' as gamma.", gamma.name.c_str()); + DBUG("Use '{:s}' as gamma.", gamma.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__hardening_modulus} auto& hardening_modulus = ParameterLib::findParameter<double>( config, "hardening_modulus", parameters, 1); - DBUG("Use '{:s}' as hardening modulus parameter.", - hardening_modulus.name.c_str()); + DBUG("Use '{:s}' as hardening modulus parameter.", hardening_modulus.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__alpha} auto& alpha = ParameterLib::findParameter<double>(config, "alpha", parameters, 1); - DBUG("Use '{:s}' as alpha.", alpha.name.c_str()); + DBUG("Use '{:s}' as alpha.", alpha.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__delta} auto& delta = ParameterLib::findParameter<double>(config, "delta", parameters, 1); - DBUG("Use '{:s}' as delta.", delta.name.c_str()); + DBUG("Use '{:s}' as delta.", delta.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__eps} auto& eps = ParameterLib::findParameter<double>(config, "eps", parameters, 1); - DBUG("Use '{:s}' as eps.", eps.name.c_str()); + DBUG("Use '{:s}' as eps.", eps.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__m} auto& m = ParameterLib::findParameter<double>(config, "m", parameters, 1); - DBUG("Use '{:s}' as m.", m.name.c_str()); + DBUG("Use '{:s}' as m.", m.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__alphap} auto& alphap = ParameterLib::findParameter<double>(config, "alphap", parameters, 1); - DBUG("Use '{:s}' as alphap.", alphap.name.c_str()); + DBUG("Use '{:s}' as alphap.", alphap.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__deltap} auto& deltap = ParameterLib::findParameter<double>(config, "deltap", parameters, 1); - DBUG("Use '{:s}' as deltap.", deltap.name.c_str()); + DBUG("Use '{:s}' as deltap.", deltap.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__epsp} auto& epsp = ParameterLib::findParameter<double>(config, "epsp", parameters, 1); - DBUG("Use '{:s}' as epsp.", epsp.name.c_str()); + DBUG("Use '{:s}' as epsp.", epsp.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__mp} auto& paremeter_mp = ParameterLib::findParameter<double>(config, "mp", parameters, 1); - DBUG("Use '{:s}' as mp.", paremeter_mp.name.c_str()); + DBUG("Use '{:s}' as mp.", paremeter_mp.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__betap} auto& betap = ParameterLib::findParameter<double>(config, "betap", parameters, 1); - DBUG("Use '{:s}' as betap.", betap.name.c_str()); + DBUG("Use '{:s}' as betap.", betap.name); //! \ogs_file_param_special{material__solid__constitutive_relation__Ehlers__gammap} auto& gammap = ParameterLib::findParameter<double>(config, "gammap", parameters, 1); - DBUG("Use '{:s}' as gammap.", gammap.name.c_str()); + DBUG("Use '{:s}' as gammap.", gammap.name); auto tangent_type = //! \ogs_file_param{material__solid__constitutive_relation__Ehlers__tangent_type} diff --git a/MaterialLib/SolidModels/CreateLinearElasticIsotropic.h b/MaterialLib/SolidModels/CreateLinearElasticIsotropic.h index 0866f924cc0565d1553e096e9fe02172ddb48789..0bb2889f9788e1232bf26daf5c843840bd600c26 100644 --- a/MaterialLib/SolidModels/CreateLinearElasticIsotropic.h +++ b/MaterialLib/SolidModels/CreateLinearElasticIsotropic.h @@ -36,16 +36,14 @@ createLinearElasticIsotropic( //! \ogs_file_param_special{material__solid__constitutive_relation__LinearElasticIsotropic__youngs_modulus} config, "youngs_modulus", parameters, 1); - DBUG("Use '{:s}' as youngs_modulus parameter.", - youngs_modulus.name.c_str()); + DBUG("Use '{:s}' as youngs_modulus parameter.", youngs_modulus.name); // Poissons ratio auto& poissons_ratio = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__LinearElasticIsotropic__poissons_ratio} config, "poissons_ratio", parameters, 1); - DBUG("Use '{:s}' as poissons_ratio parameter.", - poissons_ratio.name.c_str()); + DBUG("Use '{:s}' as poissons_ratio parameter.", poissons_ratio.name); typename LinearElasticIsotropic<DisplacementDim>::MaterialProperties mp{ youngs_modulus, poissons_ratio}; diff --git a/MaterialLib/SolidModels/CreateLinearElasticOrthotropic.cpp b/MaterialLib/SolidModels/CreateLinearElasticOrthotropic.cpp index 1a0c48b859a8395ca5399d0b8efbb028bf9873c2..8d2d2a15f0712f36e05d790c4780d38da08421f5 100644 --- a/MaterialLib/SolidModels/CreateLinearElasticOrthotropic.cpp +++ b/MaterialLib/SolidModels/CreateLinearElasticOrthotropic.cpp @@ -35,20 +35,19 @@ createLinearElasticOrthotropic( auto& youngs_moduli = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__LinearElasticOrthotropic__youngs_moduli} config, "youngs_moduli", parameters, 3); - DBUG("Use '{:s}' as youngs_moduli parameter.", youngs_moduli.name.c_str()); + DBUG("Use '{:s}' as youngs_moduli parameter.", youngs_moduli.name); // Shear moduli auto& shear_moduli = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__LinearElasticOrthotropic__shear_moduli} config, "shear_moduli", parameters, 3); - DBUG("Use '{:s}' as shear_moduli parameter.", shear_moduli.name.c_str()); + DBUG("Use '{:s}' as shear_moduli parameter.", shear_moduli.name); // Poissons ratios auto& poissons_ratios = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__LinearElasticOrthotropic__poissons_ratios} config, "poissons_ratios", parameters, 3); - DBUG("Use '{:s}' as poissons_ratios parameter.", - poissons_ratios.name.c_str()); + DBUG("Use '{:s}' as poissons_ratios parameter.", poissons_ratios.name); typename LinearElasticOrthotropic<DisplacementDim>::MaterialProperties mp{ youngs_moduli, shear_moduli, poissons_ratios}; diff --git a/MaterialLib/SolidModels/CreateLubby2.h b/MaterialLib/SolidModels/CreateLubby2.h index 346dce709fb6f9ac8520e4030ef410baae748af2..16442ccdb988460f349a2e7e5cd911e2ba6d2d6f 100644 --- a/MaterialLib/SolidModels/CreateLubby2.h +++ b/MaterialLib/SolidModels/CreateLubby2.h @@ -36,15 +36,14 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "kelvin_shear_modulus", parameters, 1); DBUG("Use '{:s}' as kelvin shear modulus parameter.", - kelvin_shear_modulus.name.c_str()); + kelvin_shear_modulus.name); // Kelvin viscosity. auto& kelvin_viscosity = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__Lubby2__kelvin_viscosity} config, "kelvin_viscosity", parameters, 1); - DBUG("Use '{:s}' as kelvin viscosity parameter.", - kelvin_viscosity.name.c_str()); + DBUG("Use '{:s}' as kelvin viscosity parameter.", kelvin_viscosity.name); // Maxwell shear modulus. auto& maxwell_shear_modulus = ParameterLib::findParameter<double>( @@ -52,7 +51,7 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "maxwell_shear_modulus", parameters, 1); DBUG("Use '{:s}' as maxwell shear modulus parameter.", - maxwell_shear_modulus.name.c_str()); + maxwell_shear_modulus.name); // Maxwell bulk modulus. auto& maxwell_bulk_modulus = ParameterLib::findParameter<double>( @@ -60,15 +59,14 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "maxwell_bulk_modulus", parameters, 1); DBUG("Use '{:s}' as maxwell bulk modulus parameter.", - maxwell_bulk_modulus.name.c_str()); + maxwell_bulk_modulus.name); // Maxwell viscosity. auto& maxwell_viscosity = ParameterLib::findParameter<double>( //! \ogs_file_param_special{material__solid__constitutive_relation__Lubby2__maxwell_viscosity} config, "maxwell_viscosity", parameters, 1); - DBUG("Use '{:s}' as maxwell viscosity parameter.", - maxwell_viscosity.name.c_str()); + DBUG("Use '{:s}' as maxwell viscosity parameter.", maxwell_viscosity.name); // Dependency parameter for mK. auto& dependency_parameter_mK = ParameterLib::findParameter<double>( @@ -76,7 +74,7 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "dependency_parameter_mk", parameters, 1); DBUG("Use '{:s}' as dependency parameter mK.", - dependency_parameter_mK.name.c_str()); + dependency_parameter_mK.name); // Dependency parameter for mvK. auto& dependency_parameter_mvK = ParameterLib::findParameter<double>( @@ -84,7 +82,7 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "dependency_parameter_mvk", parameters, 1); DBUG("Use '{:s}' as dependency parameter mvK.", - dependency_parameter_mvK.name.c_str()); + dependency_parameter_mvK.name); // Dependency parameter for mvM. auto& dependency_parameter_mvM = ParameterLib::findParameter<double>( @@ -92,7 +90,7 @@ std::unique_ptr<Lubby2<DisplacementDim>> createLubby2( config, "dependency_parameter_mvm", parameters, 1); DBUG("Use '{:s}' as dependency parameter mvM.", - dependency_parameter_mvM.name.c_str()); + dependency_parameter_mvM.name); Lubby2MaterialProperties mp{ kelvin_shear_modulus, maxwell_shear_modulus, diff --git a/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp b/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp index 55c9d0caaccd040ac1b58d8e521b6be61532305f..67aa433173be1b867efdbfe3c6e9514edf56ff66 100644 --- a/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp +++ b/MaterialLib/SolidModels/CreateNewtonRaphsonSolverParameters.cpp @@ -12,7 +12,6 @@ #include "CreateNewtonRaphsonSolverParameters.h" #include "BaseLib/ConfigTree.h" -#include "BaseLib/Error.h" #include "NumLib/NewtonRaphson.h" diff --git a/MaterialLib/SolidModels/CreepBGRa.cpp b/MaterialLib/SolidModels/CreepBGRa.cpp index c70ac90ba754ae900639a3fb43235afaf45191e7..5bae54ad4a378afddccf951f1afaa64cbde3e3c4 100644 --- a/MaterialLib/SolidModels/CreepBGRa.cpp +++ b/MaterialLib/SolidModels/CreepBGRa.cpp @@ -13,7 +13,6 @@ #include <limits> -#include "BaseLib/Error.h" #include "MaterialLib/PhysicalConstant.h" namespace MaterialLib diff --git a/MaterialLib/SolidModels/Ehlers.h b/MaterialLib/SolidModels/Ehlers.h index 0fd26b599802892492d5d7b2c91b22d998281f66..3926b6fa08ef1877332ac3cd0a954ae5b33105ba 100644 --- a/MaterialLib/SolidModels/Ehlers.h +++ b/MaterialLib/SolidModels/Ehlers.h @@ -55,8 +55,7 @@ inline TangentType makeTangentType(std::string const& s) { return TangentType::Plastic; } - OGS_FATAL("Not valid string '{:s}' to create a tangent type from.", - s.c_str()); + OGS_FATAL("Not valid string '{:s}' to create a tangent type from.", s); } /// material parameters in relation to Ehler's single-surface model see Ehler's diff --git a/MaterialLib/SolidModels/MFront/CreateMFront.cpp b/MaterialLib/SolidModels/MFront/CreateMFront.cpp index 49550899a3cd9a1ed6ffd972172870b34f5df55a..f96e3629fa1491c9790331ac7d1979b5f9856fb6 100644 --- a/MaterialLib/SolidModels/MFront/CreateMFront.cpp +++ b/MaterialLib/SolidModels/MFront/CreateMFront.cpp @@ -21,14 +21,14 @@ void varInfo(std::string const& msg, mgis::behaviour::Hypothesis hypothesis) { INFO("#{:s}: {:d} (array size {:d}).", - msg.c_str(), + msg, vars.size(), mgis::behaviour::getArraySize(vars, hypothesis)); for (auto& var : vars) { INFO(" --> type `{:s}' with name `{:s}', size {:d}, offset {:d}.", MaterialLib::Solids::MFront::varTypeToString(var.type), - var.name.c_str(), + var.name, mgis::behaviour::getVariableSize(var, hypothesis), mgis::behaviour::getVariableOffset(vars, var.name, hypothesis)); } @@ -37,11 +37,11 @@ void varInfo(std::string const& msg, /// Prints info about MFront parameters. void varInfo(std::string const& msg, std::vector<std::string> const& parameters) { - INFO("#{:s}: {:d}.", msg.c_str(), parameters.size()); + INFO("#{:s}: {:d}.", msg, parameters.size()); // mgis::behaviour::getArraySize(vars, hypothesis)); for (auto const& parameter : parameters) { - INFO(" --> with name `{:s}'.", parameter.c_str()); + INFO(" --> with name `{:s}'.", parameter); } } } // anonymous namespace @@ -98,10 +98,10 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( auto behaviour = mgis::behaviour::load(lib_path, behaviour_name, hypothesis); - INFO("Behaviour: `{:s}'.", behaviour.behaviour.c_str()); + INFO("Behaviour: `{:s}'.", behaviour.behaviour); INFO("Hypothesis: `{:s}'.", mgis::behaviour::toString(hypothesis)); - INFO("Source: `{:s}'.", behaviour.source.c_str()); - INFO("TFEL version: `{:s}'.", behaviour.tfel_version.c_str()); + INFO("Source: `{:s}'.", behaviour.source); + INFO("TFEL version: `{:s}'.", behaviour.tfel_version); INFO("Behaviour type: `{:s}'.", btypeToString(behaviour.btype)); INFO("Kinematic: `{:s}'.", toString(behaviour.kinematic)); INFO("Symmetry: `{:s}'.", toString(behaviour.symmetry)); @@ -148,7 +148,7 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( OGS_FATAL( "Material Property `{:s}' has not been configured in the " "project file.", - mp.name.c_str()); + mp.name); auto const param_name = it->second; auto const num_comp = @@ -157,7 +157,7 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( param_name, parameters, num_comp); INFO("Using OGS parameter `{:s}' for material property `{:s}'.", - param_name.c_str(), mp.name.c_str()); + param_name, mp.name); using V = mgis::behaviour::Variable; if (mp.type == V::STENSOR || mp.type == V::TENSOR) @@ -167,7 +167,7 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( "the " "user, have to make sure that the component order of " "parameter `{:s}' matches the one required by MFront!", - mp.name.c_str(), param_name.c_str()); + mp.name, param_name); } material_properties.push_back(param); @@ -182,8 +182,7 @@ std::unique_ptr<MechanicsBase<DisplacementDim>> createMFront( for (auto& e : map_name_to_param) { - ERR(" name: `{:s}', parameter: `{:s}'.", e.first.c_str(), - e.second.c_str()); + ERR(" name: `{:s}', parameter: `{:s}'.", e.first, e.second); } OGS_FATAL( diff --git a/MaterialLib/SolidModels/MFront/MFront.cpp b/MaterialLib/SolidModels/MFront/MFront.cpp index 8c0713d87189e33d1618ae3b433f39adf5408f18..ec9421fc787ab1f5af1beb17208147987eb7c089 100644 --- a/MaterialLib/SolidModels/MFront/MFront.cpp +++ b/MaterialLib/SolidModels/MFront/MFront.cpp @@ -228,7 +228,7 @@ MFront<DisplacementDim>::MFront( _behaviour.mps.size()); for (auto const& mp : _behaviour.mps) { - ERR("\t{:s}", mp.name.c_str()); + ERR("\t{:s}", mp.name); } OGS_FATAL("But the number of passed material properties is {:d}.", _material_properties.size()); diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp index a8f3955c1ce5d15059326a124e9ba9ed4944ac90..cf89fbe1617aa3835e859b8ea2470b632013f61e 100644 --- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp +++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp @@ -55,8 +55,7 @@ class EigenDirectLinearSolver final : public EigenLinearSolverBase public: bool solve(Matrix& A, Vector const& b, Vector& x, EigenOption& opt) override { - INFO("-> solve with {:s}", - EigenOption::getSolverName(opt.solver_type).c_str()); + INFO("-> solve with {:s}", EigenOption::getSolverName(opt.solver_type)); if (!A.isCompressed()) { A.makeCompressed(); @@ -89,8 +88,8 @@ public: bool solve(Matrix& A, Vector const& b, Vector& x, EigenOption& opt) override { INFO("-> solve with {:s} (precon {:s})", - EigenOption::getSolverName(opt.solver_type).c_str(), - EigenOption::getPreconName(opt.precon_type).c_str()); + EigenOption::getSolverName(opt.solver_type), + EigenOption::getPreconName(opt.precon_type)); _solver.setTolerance(opt.error_tolerance); _solver.setMaxIterations(opt.max_iterations); diff --git a/MathLib/LinAlg/Eigen/EigenOption.cpp b/MathLib/LinAlg/Eigen/EigenOption.cpp index 35271534c242af387030092a2dbca46c6226e409..2139339792b39c07d83e75e4c430b838f06441fc 100644 --- a/MathLib/LinAlg/Eigen/EigenOption.cpp +++ b/MathLib/LinAlg/Eigen/EigenOption.cpp @@ -48,7 +48,7 @@ EigenOption::SolverType EigenOption::getSolverType(const std::string &solver_nam return SolverType::GMRES; } - OGS_FATAL("Unknown Eigen solver type `{:s}'", solver_name.c_str()); + OGS_FATAL("Unknown Eigen solver type `{:s}'", solver_name); } EigenOption::PreconType EigenOption::getPreconType(const std::string &precon_name) @@ -66,7 +66,7 @@ EigenOption::PreconType EigenOption::getPreconType(const std::string &precon_nam return PreconType::ILUT; } - OGS_FATAL("Unknown Eigen preconditioner type `{:s}'", precon_name.c_str()); + OGS_FATAL("Unknown Eigen preconditioner type `{:s}'", precon_name); } std::string EigenOption::getSolverName(SolverType const solver_type) diff --git a/MathLib/LinAlg/Eigen/EigenTools.cpp b/MathLib/LinAlg/Eigen/EigenTools.cpp index 88fac8ea857a55141b025847074ec38a2a7ccc34..6f0c3325033c61dc61da836aa7e6ccbbff223c08 100644 --- a/MathLib/LinAlg/Eigen/EigenTools.cpp +++ b/MathLib/LinAlg/Eigen/EigenTools.cpp @@ -10,7 +10,6 @@ #include "EigenTools.h" -#include "BaseLib/Logging.h" #include "EigenVector.h" diff --git a/MathLib/LinAlg/Eigen/EigenTools.h b/MathLib/LinAlg/Eigen/EigenTools.h index a64edfceaf7e9ebc829a9d1d42abf6bcac0b0c67..c947efb4ae307583d6cb8901a14c08fa292a09e5 100644 --- a/MathLib/LinAlg/Eigen/EigenTools.h +++ b/MathLib/LinAlg/Eigen/EigenTools.h @@ -11,7 +11,6 @@ #pragma once #include <vector> -#include "BaseLib/Logging.h" #include "BaseLib/Error.h" #include "EigenMatrix.h" // for EigenMatrix::IndexType diff --git a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.cpp b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.cpp index 4c039ba886fe33162755c911135698d5e369a2ec..8aa844797b2afc67ecad3bc2a75fe56028a7e718 100644 --- a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.cpp +++ b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.cpp @@ -13,7 +13,6 @@ #ifdef _OPENMP #include <omp.h> #endif -#include "BaseLib/Logging.h" #include "BaseLib/ConfigTree.h" #include "MathLib/LinAlg/Eigen/EigenMatrix.h" diff --git a/MathLib/LinAlg/Lis/LisMatrix.cpp b/MathLib/LinAlg/Lis/LisMatrix.cpp index 2552a4befe876feed0d7cc3361bf0d92f21f700e..a37447acef3882ba32a795e3ae81af814b17f769 100644 --- a/MathLib/LinAlg/Lis/LisMatrix.cpp +++ b/MathLib/LinAlg/Lis/LisMatrix.cpp @@ -17,7 +17,6 @@ #include <cmath> #include <cstdlib> -#include "BaseLib/Logging.h" #include "BaseLib/Error.h" #include "LisVector.h" diff --git a/MathLib/LinAlg/Lis/LisOption.h b/MathLib/LinAlg/Lis/LisOption.h index 30160602b3a4e471eaedc78a5f3123e90ff3de62..a34652ae2121920001404492b20cb7b2ef6c03fc 100644 --- a/MathLib/LinAlg/Lis/LisOption.h +++ b/MathLib/LinAlg/Lis/LisOption.h @@ -47,7 +47,7 @@ struct LisOption final if (auto s = options->getConfigParameterOptional<std::string>("lis")) { if (!s->empty()) { _option_string += " " + *s; - INFO("Lis options: '{:s}'", _option_string.c_str()); + INFO("Lis options: '{:s}'", _option_string); } } } diff --git a/MathLib/LinAlg/Lis/LisVector.cpp b/MathLib/LinAlg/Lis/LisVector.cpp index 96a74ee9e0fd7a4ee508a57ec1331ed99746b982..981c4d3d84340bdd3b88a7afb0bd0b4cbd1fcbaf 100644 --- a/MathLib/LinAlg/Lis/LisVector.cpp +++ b/MathLib/LinAlg/Lis/LisVector.cpp @@ -56,7 +56,7 @@ std::size_t LisVector::size() const void LisVector::write(const std::string& filename) const { - lis_output_vector(_vec, LIS_FMT_PLAIN, const_cast<char*>(filename.c_str())); + lis_output_vector(_vec, LIS_FMT_PLAIN, const_cast<char*>(filename)); } } // MathLib diff --git a/MathLib/LinAlg/PETSc/PETScLinearSolver.h b/MathLib/LinAlg/PETSc/PETScLinearSolver.h index 40a695cce5bd23cf14303ed2094a5fa3d4a269ee..fc216e96fff6bb9c12cd6c375898c61848db48ca 100644 --- a/MathLib/LinAlg/PETSc/PETScLinearSolver.h +++ b/MathLib/LinAlg/PETSc/PETScLinearSolver.h @@ -20,7 +20,6 @@ #include <petscksp.h> -#include "BaseLib/Logging.h" #include "BaseLib/ConfigTree.h" diff --git a/MathLib/Nonlinear/Root1D.h b/MathLib/Nonlinear/Root1D.h index a2934fd8a555ddbb62b156dd86f0fdc4d6032b13..edc37751936911a8a877ac39b45fd2495bce48aa 100644 --- a/MathLib/Nonlinear/Root1D.h +++ b/MathLib/Nonlinear/Root1D.h @@ -15,7 +15,6 @@ #include <limits> #include <type_traits> #include "BaseLib/Error.h" -#include "BaseLib/Logging.h" namespace MathLib { diff --git a/MathLib/ODE/CVodeSolver.cpp b/MathLib/ODE/CVodeSolver.cpp index 655ce7140e23f860db369ca6f793acc52173b966..ac5952a4419f8ecae90d76a6e5954a550cfd844a 100644 --- a/MathLib/ODE/CVodeSolver.cpp +++ b/MathLib/ODE/CVodeSolver.cpp @@ -33,8 +33,8 @@ void check_error(std::string const& f_name, int const error_flag) { if (error_flag != CV_SUCCESS) { - OGS_FATAL("CVodeSolver: {:s} failed with error flag {:d}.", - f_name.c_str(), error_flag); + OGS_FATAL("CVodeSolver: {:s} failed with error flag {:d}.", f_name, + error_flag); } } diff --git a/MathLib/ODE/ODESolverBuilder.h b/MathLib/ODE/ODESolverBuilder.h index 5919346c7a06f600a192f2e5d37493186ae0b723..7d9e5bf7676d3f2536c9874ff811ad376270fe8d 100644 --- a/MathLib/ODE/ODESolverBuilder.h +++ b/MathLib/ODE/ODESolverBuilder.h @@ -10,7 +10,6 @@ #pragma once -#include "BaseLib/Logging.h" #include "BaseLib/Error.h" #include "ODESolver.h" diff --git a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp index f5474e8dace997033683c5e6d1e08b9b2f4328fd..b14fe3a05d5484b849ffc6d4b510f2aeffeb3915 100644 --- a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp +++ b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp @@ -52,7 +52,7 @@ std::unique_ptr<MeshLib::Mesh> appendLinesAlongPolylines( if (vec_nodes_on_ply.empty()) { std::string ply_name; ply_vec.getNameOfElementByID(k, ply_name); - INFO("No nodes found on polyline {:s}", ply_name.c_str()); + INFO("No nodes found on polyline {:s}", ply_name); continue; } diff --git a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp index 81ca8381a87a4180572414e8f5a1c1f138ca6b5f..c186fed6f14a0ddbbfa37bf9851e91ff677b9c9d 100644 --- a/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp +++ b/MeshGeoToolsLib/ConstructMeshesFromGeometries.cpp @@ -58,8 +58,8 @@ constructAdditionalMeshesFromGeometries( auto const& geometry = *vec_data[i]; - DBUG("Creating mesh from geometry {:s} {:s}.", vec_name.c_str(), - geometry_name.c_str()); + DBUG("Creating mesh from geometry {:s} {:s}.", vec_name, + geometry_name); additional_meshes.emplace_back(createMeshFromElementSelection( meshNameFromGeometry(vec_name, geometry_name), diff --git a/MeshGeoToolsLib/CreateSearchLength.cpp b/MeshGeoToolsLib/CreateSearchLength.cpp index b5371b158c00a1863392bdf622e404a63d35f144..f8dd1c4518f648624ec695531a32eefd2f1e32ee 100644 --- a/MeshGeoToolsLib/CreateSearchLength.cpp +++ b/MeshGeoToolsLib/CreateSearchLength.cpp @@ -44,7 +44,7 @@ std::unique_ptr<MeshGeoToolsLib::SearchLength> createSearchLengthAlgorithm( //! \ogs_file_param_special{prj__search_length_algorithm__heuristic} return std::make_unique<HeuristicSearchLength>(mesh); } - OGS_FATAL("Unknown search length algorithm type '{:s}'.", type.c_str()); + OGS_FATAL("Unknown search length algorithm type '{:s}'.", type); } } // end namespace MeshGeoToolsLib diff --git a/MeshGeoToolsLib/GeoMapper.cpp b/MeshGeoToolsLib/GeoMapper.cpp index 5cd7098a00a824efd59e1ae556d665ec9fdc6d34..57809f0367a0bcb59ab16f3fade7fb49c549635e 100644 --- a/MeshGeoToolsLib/GeoMapper.cpp +++ b/MeshGeoToolsLib/GeoMapper.cpp @@ -53,7 +53,7 @@ void GeoMapper::mapOnDEM(std::unique_ptr<GeoLib::Raster const> raster) { std::vector<GeoLib::Point*> const* pnts(_geo_objects.getPointVec(_geo_name)); if (! pnts) { - ERR("Geometry '{:s}' does not exist.", _geo_name.c_str()); + ERR("Geometry '{:s}' does not exist.", _geo_name); return; } _raster = std::move(raster); @@ -69,7 +69,7 @@ void GeoMapper::mapOnMesh(MeshLib::Mesh const*const mesh) { std::vector<GeoLib::Point*> const* pnts(_geo_objects.getPointVec(_geo_name)); if (! pnts) { - ERR("Geometry '{:s}' does not exist.", _geo_name.c_str()); + ERR("Geometry '{:s}' does not exist.", _geo_name); return; } @@ -115,7 +115,7 @@ void GeoMapper::mapToConstantValue(double value) std::vector<GeoLib::Point*> const* points (this->_geo_objects.getPointVec(this->_geo_name)); if (points == nullptr) { - ERR("Geometry '{:s}' not found.", this->_geo_name.c_str()); + ERR("Geometry '{:s}' not found.", this->_geo_name); return; } std::for_each(points->begin(), points->end(), [value](GeoLib::Point* pnt){ (*pnt)[2] = value; }); @@ -306,7 +306,7 @@ static std::vector<GeoLib::LineSegment> createSubSegmentsForElement( out << k << " " << intersections[k] << "\n"; } out << "Could not map segment on element. Aborting.\n"; - OGS_FATAL("{:s}", out.str().c_str()); + OGS_FATAL("{:s}", out.str()); } if (intersections.size() == 1 && elem == beg_elem) @@ -476,7 +476,7 @@ static bool snapPointToElementNode(MathLib::Point3d& p, p = node; #ifdef DEBUG_GEOMAPPER out << "to " << p; - DBUG("{:s}", out.str().c_str()); + DBUG("{:s}", out.str()); #endif return true; } diff --git a/MeshGeoToolsLib/HeuristicSearchLength.cpp b/MeshGeoToolsLib/HeuristicSearchLength.cpp index 85558faeadaf5f50786db50c0dce964af0f552fd..32d58e3ff6e31654cd134a2469ab4c993dcc1434 100644 --- a/MeshGeoToolsLib/HeuristicSearchLength.cpp +++ b/MeshGeoToolsLib/HeuristicSearchLength.cpp @@ -73,7 +73,7 @@ HeuristicSearchLength::HeuristicSearchLength(MeshLib::Mesh const& mesh, LengthTy DBUG( "[MeshNodeSearcher::MeshNodeSearcher] Calculated search length for " "mesh '{:s}' is {:f}.", - _mesh.getName().c_str(), _search_length); + _mesh.getName(), _search_length); } } // end namespace MeshGeoToolsLib diff --git a/MeshGeoToolsLib/IdentifySubdomainMesh.cpp b/MeshGeoToolsLib/IdentifySubdomainMesh.cpp index ee3977f59b7c84273b547f0da9d3e45ea7535876..09c54d35f7a4a92772c9fbbf7293984e41e7171a 100644 --- a/MeshGeoToolsLib/IdentifySubdomainMesh.cpp +++ b/MeshGeoToolsLib/IdentifySubdomainMesh.cpp @@ -164,7 +164,7 @@ void updateOrCheckExistingSubdomainProperty( INFO( "There is already a '{:s}' property present in the subdomain mesh " "'{:s}' and it is equal to the newly computed values.", - property_name.c_str(), mesh.getName().c_str()); + property_name, mesh.getName()); return; } @@ -174,15 +174,15 @@ void updateOrCheckExistingSubdomainProperty( WARN( "There is already a '{:s}' property present in the subdomain mesh " "'{:s}' and it is not equal to the newly computed values.", - property_name.c_str(), - mesh.getName().c_str()); + property_name, + mesh.getName()); if (!force_overwrite) { OGS_FATAL("The force overwrite flag was not specified, exiting."); } - INFO("Overwriting '{:s}' property.", property_name.c_str()); + INFO("Overwriting '{:s}' property.", property_name); original_property.resize(values.size()); std::copy(begin(values), end(values), begin(original_property)); } diff --git a/MeshGeoToolsLib/MeshNodeSearcher.cpp b/MeshGeoToolsLib/MeshNodeSearcher.cpp index 4be0bc8f023f38a6b8a04e7c08fa95f2c5255abf..27f4173e99c99567994a44ae53cf56b302b3851c 100644 --- a/MeshGeoToolsLib/MeshNodeSearcher.cpp +++ b/MeshGeoToolsLib/MeshNodeSearcher.cpp @@ -41,7 +41,7 @@ MeshNodeSearcher::MeshNodeSearcher( _search_length_algorithm(std::move(search_length_algorithm)), _search_all_nodes(search_all_nodes) { - DBUG("The search length for mesh '{:s}' is {:e}.", _mesh.getName().c_str(), + DBUG("The search length for mesh '{:s}' is {:e}.", _mesh.getName(), _search_length_algorithm->getSearchLength()); } @@ -105,8 +105,7 @@ std::vector<std::size_t> MeshNodeSearcher::getMeshNodeIDs( OGS_FATAL( "No nodes could be found in the mesh for point {:d} : ({:g}, " "{:g}, {:g}) in {:g} epsilon radius in the mesh '{:s}'", - p.getID(), p[0], p[1], p[2], epsilon_radius, - _mesh.getName().c_str()); + p.getID(), p[0], p[1], p[2], epsilon_radius, _mesh.getName()); } if (ids.size() != 1) { @@ -124,7 +123,7 @@ std::vector<std::size_t> MeshNodeSearcher::getMeshNodeIDs( "{:g}) in {:g} epsilon radius in the mesh '{:s}'. Expected to " "find exactly one node.\n{:s}", ids.size(), p.getID(), p[0], p[1], p[2], epsilon_radius, - _mesh.getName().c_str(), ss.str().c_str()); + _mesh.getName(), ss.str()); } node_ids.push_back(ids.front()); } diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index 50b5f0b6f25493ab084c3fbd3ea396ddeeb26df6..97f49c219b92836dd2fa0b4ae3e406ff9b45d2c7 100644 --- a/MeshLib/Elements/Element.cpp +++ b/MeshLib/Elements/Element.cpp @@ -165,7 +165,7 @@ const Node* Element::getNode(unsigned i) const } #ifndef NDEBUG ERR("Error in MeshLib::Element::getNode() - Index {:d} in {:s}", i, - MeshElemType2String(getGeomType()).c_str()); + MeshElemType2String(getGeomType())); return nullptr; #endif } @@ -263,7 +263,7 @@ bool isPointInElementXY(MathLib::Point3d const& p, Element const& e) } WARN("isPointInElementXY: element type '{:s}' is not supported.", - MeshLib::MeshElemType2String(e.getGeomType()).c_str()); + MeshLib::MeshElemType2String(e.getGeomType())); return false; } } // namespace MeshLib diff --git a/MeshLib/Elements/MapBulkElementPoint.cpp b/MeshLib/Elements/MapBulkElementPoint.cpp index 538e66310d43da14d2f288e7227a2a4ad51c44ad..f0deb125afcb23c7fc688ac74dd852578d93e589 100644 --- a/MeshLib/Elements/MapBulkElementPoint.cpp +++ b/MeshLib/Elements/MapBulkElementPoint.cpp @@ -118,7 +118,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh, return getBulkElementPoint(quad, bulk_face_id, wp); } OGS_FATAL("Wrong cell type '{:s}' or functionality not yet implemented.", - MeshLib::CellType2String(element->getCellType()).c_str()); + MeshLib::CellType2String(element->getCellType())); } MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh, @@ -144,7 +144,7 @@ MathLib::Point3d getBulkElementPoint(MeshLib::Mesh const& mesh, return getBulkElementPoint(tet, bulk_face_id, wp); } OGS_FATAL("Wrong cell type '{:s}' or functionality not yet implemented.", - MeshLib::CellType2String(element->getCellType()).c_str()); + MeshLib::CellType2String(element->getCellType())); } // TODO disable the 3d elements in the local assembler creator diff --git a/MeshLib/IO/Legacy/MeshIO.cpp b/MeshLib/IO/Legacy/MeshIO.cpp index c69ee8be54c1dbeec4e27f20c4a3572e5cc3cb12..efe83958466c9e6abd7b4cd469c2d5707220cae3 100644 --- a/MeshLib/IO/Legacy/MeshIO.cpp +++ b/MeshLib/IO/Legacy/MeshIO.cpp @@ -47,7 +47,7 @@ MeshLib::Mesh* MeshIO::loadMeshFromFile(const std::string& file_name) if (!in.is_open()) { WARN("MeshIO::loadMeshFromFile() - Could not open file {:s}.", - file_name.c_str()); + file_name); return nullptr; } @@ -108,7 +108,7 @@ MeshLib::Mesh* MeshIO::loadMeshFromFile(const std::string& file_name) if (elem == nullptr) { ERR("Reading mesh element {:d} from file '{:s}' " "failed.", - i, file_name.c_str()); + i, file_name); // clean up the elements vector std::for_each(elements.begin(), elements.end(), std::default_delete<MeshLib::Element>()); diff --git a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp index e3143fdd1e6a1151b8369babcdde59695512c2c3..ac0d28fc87465376b704d958023d022a631f38f8 100644 --- a/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp +++ b/MeshLib/IO/MPI_IO/NodePartitionedMeshReader.cpp @@ -124,7 +124,7 @@ NodePartitionedMeshReader::readBinaryDataFromFile(std::string const& filename, if(file_status != 0) { - ERR("Error opening file {:s}. MPI error code {:d}", filename.c_str(), + ERR("Error opening file {:s}. MPI error code {:d}", filename, file_status); return false; } @@ -223,7 +223,7 @@ void NodePartitionedMeshReader::readPropertiesBinary( "Could not open file '{:s}'.\n" "\tYou can ignore this warning if the mesh does not contain {:s}-" "wise property data.", - fname_cfg.c_str(), item_type.data()); + fname_cfg, item_type.data()); return; } std::size_t number_of_properties = 0; @@ -280,7 +280,7 @@ void NodePartitionedMeshReader::readPropertiesBinary( ERR("Could not open file '{:s}'\n." "\tYou can ignore this warning if the mesh does not contain {:s}-" "wise property data.", - fname_val.c_str(), item_type.data()); + fname_val, item_type.data()); } readDomainSpecificPartOfPropertyVectors(vec_pvmd, *pvpmd, t, is, p); @@ -355,7 +355,7 @@ bool NodePartitionedMeshReader::openASCIIFiles( if( !is_cfg.good() ) { - ERR("Error opening file {:s} for input.", filename.c_str()); + ERR("Error opening file {:s} for input.", filename); return false; } @@ -377,7 +377,7 @@ bool NodePartitionedMeshReader::openASCIIFiles( is_node.open(filename); if( !is_node.good() ) { - ERR("Error opening file {:s} for input.", filename.c_str()); + ERR("Error opening file {:s} for input.", filename); return false; } } @@ -387,7 +387,7 @@ bool NodePartitionedMeshReader::openASCIIFiles( is_elem.open(filename); if( !is_elem.good() ) { - ERR("Error opening file {:s} for input.", filename.c_str()); + ERR("Error opening file {:s} for input.", filename); return false; } } diff --git a/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h b/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h index 37953d89067cdd4d9b5ab4b3be07347dc678b103..3eb94a726674f2089415dca8ae4ad85a7688b579 100644 --- a/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h +++ b/MeshLib/IO/MPI_IO/PropertyVectorMetaData.h @@ -70,7 +70,7 @@ inline void writePropertyVectorMetaDataBinary( inline void writePropertyVectorMetaData(PropertyVectorMetaData const& pvmd) { DBUG("size of name: {:d}", pvmd.property_name.length()); - DBUG("name: '{:s}'", pvmd.property_name.c_str()); + DBUG("name: '{:s}'", pvmd.property_name); DBUG("is_int_data_type: {:d}", pvmd.is_int_type); DBUG("is_data_type_signed: {:d}", pvmd.is_data_type_signed); DBUG("data_type_size_in_bytes: {:d}", pvmd.data_type_size_in_bytes); diff --git a/MeshLib/IO/VtkIO/PVDFile.cpp b/MeshLib/IO/VtkIO/PVDFile.cpp index 8419d0f031d0a9d129788ae83d3ffaba507b1ad6..cc4525cfa4e97b6758944b5307117e1e325841ae 100644 --- a/MeshLib/IO/VtkIO/PVDFile.cpp +++ b/MeshLib/IO/VtkIO/PVDFile.cpp @@ -14,7 +14,6 @@ #include <iomanip> #include <limits> #include "BaseLib/Error.h" -#include "BaseLib/Logging.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" namespace MeshLib @@ -35,7 +34,7 @@ void PVDFile::addVTUFile(const std::string &vtu_fname, double timestep) std::ofstream fh(_pvd_filename.c_str()); if (!fh) { - OGS_FATAL("could not open file `{:s}'", _pvd_filename.c_str()); + OGS_FATAL("could not open file `{:s}'", _pvd_filename); } fh << std::setprecision(std::numeric_limits<double>::digits10); diff --git a/MeshLib/IO/VtkIO/VtuInterface.cpp b/MeshLib/IO/VtkIO/VtuInterface.cpp index 39a7ad0bc1715d63ff72a616c7bcb58ff512c1ae..99a662822580b39d16bcacd90300456d20557e8b 100644 --- a/MeshLib/IO/VtkIO/VtuInterface.cpp +++ b/MeshLib/IO/VtkIO/VtuInterface.cpp @@ -50,7 +50,7 @@ VtuInterface::VtuInterface(const MeshLib::Mesh* mesh, int dataMode, bool compres MeshLib::Mesh* VtuInterface::readVTUFile(std::string const &file_name) { if (!BaseLib::IsFileExisting(file_name)) { - ERR("File '{:s}' does not exist.", file_name.c_str()); + ERR("File '{:s}' does not exist.", file_name); return nullptr; } @@ -62,7 +62,7 @@ MeshLib::Mesh* VtuInterface::readVTUFile(std::string const &file_name) vtkUnstructuredGrid* vtkGrid = reader->GetOutput(); if (vtkGrid->GetNumberOfPoints() == 0) { - ERR("Mesh '{:s}' contains zero points.", file_name.c_str()); + ERR("Mesh '{:s}' contains zero points.", file_name); return nullptr; } @@ -116,8 +116,7 @@ int writeVtu(MeshLib::Mesh const& mesh, std::string const& file_name, auto const result = writer.writeToFile(file_name); if (!result) { - ERR("writeMeshToFile(): Could not write mesh to '{:s}'.", - file_name.c_str()); + ERR("writeMeshToFile(): Could not write mesh to '{:s}'.", file_name); return -1; } return 0; diff --git a/MeshLib/IO/readMeshFromFile.cpp b/MeshLib/IO/readMeshFromFile.cpp index cc85f06bc4205597d6e64c5b7e5d35c424611f47..b211aa66a83ecf6a24c4cea298a7b4ced5fe94ac 100644 --- a/MeshLib/IO/readMeshFromFile.cpp +++ b/MeshLib/IO/readMeshFromFile.cpp @@ -81,7 +81,7 @@ MeshLib::Mesh* readMeshFromFileSerial(const std::string &file_name) } ERR("readMeshFromFile(): Unknown mesh file format in file {:s}.", - file_name.c_str()); + file_name); return nullptr; } diff --git a/MeshLib/IO/writeMeshToFile.cpp b/MeshLib/IO/writeMeshToFile.cpp index 4f21f343c53e35972c5e4649c8997340dd9e61bc..ea54d209e6e3b90f87d1dd721924b20e8878f61c 100644 --- a/MeshLib/IO/writeMeshToFile.cpp +++ b/MeshLib/IO/writeMeshToFile.cpp @@ -39,14 +39,13 @@ int writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name) if (!result) { ERR("writeMeshToFile(): Could not write mesh to '{:s}'.", - file_name.c_str()); + file_name); return -1; } return 0; } - ERR("writeMeshToFile(): Unknown mesh file format in file {:s}.", - file_name.c_str()); + ERR("writeMeshToFile(): Unknown mesh file format in file {:s}.", file_name); return -1; } diff --git a/MeshLib/Mesh.cpp b/MeshLib/Mesh.cpp index 03e929c8b29c386e6d6aa0c963f14159e6b12757..444d39a49ef154ba3ad44ba7321f313c9c927b6d 100644 --- a/MeshLib/Mesh.cpp +++ b/MeshLib/Mesh.cpp @@ -296,8 +296,7 @@ void scaleMeshPropertyVector(MeshLib::Mesh & mesh, { if (!mesh.getProperties().existsPropertyVector<double>(property_name)) { - WARN("Did not find PropertyVector '{:s}' for scaling.", - property_name.c_str()); + WARN("Did not find PropertyVector '{:s}' for scaling.", property_name); return; } for (auto& v : diff --git a/MeshLib/Mesh.h b/MeshLib/Mesh.h index 332be920f437dce72a322ac25be86b69b4a94c37..7b59c525fda08ad8ce0dbfd105af5f87439eed30 100644 --- a/MeshLib/Mesh.h +++ b/MeshLib/Mesh.h @@ -235,7 +235,7 @@ void addPropertyToMesh(MeshLib::Mesh& mesh, std::string const& name, name, item_type, number_of_components); if (!property) { - OGS_FATAL("Error while creating PropertyVector '{:s}'.", name.c_str()); + OGS_FATAL("Error while creating PropertyVector '{:s}'.", name); } property->reserve(values.size()); std::copy(values.cbegin(), values.cend(), std::back_inserter(*property)); diff --git a/MeshLib/MeshEditing/AddLayerToMesh.cpp b/MeshLib/MeshEditing/AddLayerToMesh.cpp index 66b28fd2939adceecd40af7746c5558aa5e9050b..6ed2975294b85eca09b0f037f352fcba8b5b8c07 100644 --- a/MeshLib/MeshEditing/AddLayerToMesh.cpp +++ b/MeshLib/MeshEditing/AddLayerToMesh.cpp @@ -94,7 +94,7 @@ MeshLib::Mesh* addLayerToMesh(MeshLib::Mesh const& mesh, double thickness, std::string const& name, bool on_top) { - INFO("Extracting top surface of mesh '{:s}' ... ", mesh.getName().c_str()); + INFO("Extracting top surface of mesh '{:s}' ... ", mesh.getName()); int const flag = (on_top) ? -1 : 1; const MathLib::Vector3 dir(0, 0, flag); double const angle(90); @@ -141,7 +141,7 @@ MeshLib::Mesh* addLayerToMesh(MeshLib::Mesh const& mesh, double thickness, { ERR("Need subsurface node ids, but the property '{:s}' is not " "available.", - prop_name.c_str()); + prop_name); return nullptr; } // fetch subsurface node ids PropertyVector diff --git a/MeshLib/MeshEditing/ConvertToLinearMesh.cpp b/MeshLib/MeshEditing/ConvertToLinearMesh.cpp index 56f70547cb74b4e9c119c3fca619f1412f443dd6..56760a0b49b8ccde083937e5e11b3f9246187eae 100644 --- a/MeshLib/MeshEditing/ConvertToLinearMesh.cpp +++ b/MeshLib/MeshEditing/ConvertToLinearMesh.cpp @@ -93,7 +93,7 @@ std::unique_ptr<MeshLib::Mesh> convertToLinearMesh( else { OGS_FATAL("Mesh element type {:s} is not supported", - MeshLib::CellType2String(e->getCellType()).c_str()); + MeshLib::CellType2String(e->getCellType())); } } diff --git a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp index a7f588aae8c16f99210eb9a77b8887983b888e5f..c72c61fa6b48c8f297f1e98197f3417104cfa5b7 100644 --- a/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp +++ b/MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.cpp @@ -60,7 +60,7 @@ bool Mesh2MeshPropertyInterpolation::setPropertiesForMesh(Mesh& dest_mesh) const else { INFO("Create new PropertyVector '{:s}' of type double.", - _property_name.c_str()); + _property_name); dest_properties = dest_mesh.getProperties().createNewPropertyVector<double>( _property_name, MeshItemType::Cell, 1); @@ -69,7 +69,7 @@ bool Mesh2MeshPropertyInterpolation::setPropertiesForMesh(Mesh& dest_mesh) const WARN( "Could not get or create a PropertyVector of type double" " using the given name '{:s}'.", - _property_name.c_str()); + _property_name); return false; } } @@ -152,8 +152,7 @@ void Mesh2MeshPropertyInterpolation::interpolateElementPropertiesToNodePropertie // fetch the source of property values if (!_src_mesh.getProperties().existsPropertyVector<double>(_property_name)) { - WARN("Did not find PropertyVector<double> '{:s}'.", - _property_name.c_str()); + WARN("Did not find PropertyVector<double> '{:s}'.", _property_name); return; } auto const* elem_props = diff --git a/MeshLib/MeshEditing/MeshRevision.cpp b/MeshLib/MeshEditing/MeshRevision.cpp index d5015604dd9022187c3469596c1d0842b97f1860..c02e24e73592e91d06a5cc8ec0715b37d0c3391f 100644 --- a/MeshLib/MeshEditing/MeshRevision.cpp +++ b/MeshLib/MeshEditing/MeshRevision.cpp @@ -798,6 +798,8 @@ MeshLib::Element* MeshRevision::constructFourNodeElement( return new MeshLib::Tet(new_nodes); } // is quad but min elem dim == 3 + + delete[] new_nodes; return nullptr; } diff --git a/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp b/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp index 6b6fd7ed01fd381482ffa87104961bd024eb1558..19e92bf2846f7765f33b0feda837273f6d8d47c3 100644 --- a/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp +++ b/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp @@ -77,7 +77,7 @@ std::unique_ptr<MeshLib::Element> createQuadraticElement( } OGS_FATAL("Mesh element type {:s} is not supported", - MeshLib::CellType2String(e.getCellType()).c_str()); + MeshLib::CellType2String(e.getCellType())); } struct nodeByCoordinatesComparator diff --git a/MeshLib/MeshInformation.cpp b/MeshLib/MeshInformation.cpp index ef72ea019461a21056792480872f00d125b2f06a..c0dfa29e8b4de6a9f4ba30ba1af4c3479d9473c6 100644 --- a/MeshLib/MeshInformation.cpp +++ b/MeshLib/MeshInformation.cpp @@ -63,20 +63,20 @@ void MeshInformation::writePropertyVectorInformation(const MeshLib::Mesh& mesh) if (auto const vec_bounds = MeshLib::MeshInformation::getValueBounds<int>(mesh, vec_name)) { - INFO("\t{:s}: [{:d}, {:d}]", vec_name.c_str(), vec_bounds->first, + INFO("\t{:s}: [{:d}, {:d}]", vec_name, vec_bounds->first, vec_bounds->second); } else if (auto const vec_bounds = MeshLib::MeshInformation::getValueBounds<double>(mesh, vec_name)) { - INFO("\t{:s}: [{:g}, {:g}]", vec_name.c_str(), vec_bounds->first, + INFO("\t{:s}: [{:g}, {:g}]", vec_name, vec_bounds->first, vec_bounds->second); } else { INFO("\t{:s}: Could not get value bounds for property vector.", - vec_name.c_str()); + vec_name); } } } diff --git a/MeshLib/MeshInformation.h b/MeshLib/MeshInformation.h index a8edf1c30e9a3b5acaee9a23ce6996a0575345b9..b68968597c51663289daa63c7e1d6ba025771227 100644 --- a/MeshLib/MeshInformation.h +++ b/MeshLib/MeshInformation.h @@ -47,8 +47,7 @@ public: mesh.getProperties().getPropertyVector<T>(name); if (data_vec->empty()) { - INFO("Mesh does not contain values for the property '{:s}'.", - name.c_str()); + INFO("Mesh does not contain values for the property '{:s}'.", name); return {}; } diff --git a/MeshLib/MeshQuality/EdgeRatioMetric.cpp b/MeshLib/MeshQuality/EdgeRatioMetric.cpp index 1aaff213308e57a73228cec8ee147552f89b6d44..346f2447ec2f4388c2a632442f286c9206480607 100644 --- a/MeshLib/MeshQuality/EdgeRatioMetric.cpp +++ b/MeshLib/MeshQuality/EdgeRatioMetric.cpp @@ -79,7 +79,7 @@ void EdgeRatioMetric::calculateQuality() default: ERR("MeshQualityShortestLongestRatio::check () check for element " "type {:s} not implemented.", - MeshElemType2String(elem.getGeomType()).c_str()); + MeshElemType2String(elem.getGeomType())); } } } diff --git a/MeshLib/MeshQuality/MeshValidation.cpp b/MeshLib/MeshQuality/MeshValidation.cpp index 1d2e2d6a549ce548fecdf2a97122d16dc616b3a3..8a0a29dd8aba48f76e896be6a14cc57325d3a3d6 100644 --- a/MeshLib/MeshQuality/MeshValidation.cpp +++ b/MeshLib/MeshQuality/MeshValidation.cpp @@ -47,8 +47,10 @@ MeshValidation::MeshValidation(MeshLib::Mesh &mesh) std::array<std::string, static_cast<std::size_t>(ElementErrorFlag::MaxValue)> output_str(MeshLib::MeshValidation::ElementErrorCodeOutput(codes)); - for (auto & i : output_str) - INFO (i.c_str()); + for (auto& i : output_str) + { + INFO("{:s}", i); + } } std::vector<ElementErrorCode> MeshValidation::testElementGeometry(const MeshLib::Mesh &mesh, double min_volume) @@ -104,7 +106,7 @@ std::vector<ElementErrorCode> MeshValidation::testElementGeometry(const MeshLib: if (error_count[i]) INFO("{:d} elements found with {:s}.", error_count[i], - ElementErrorCode::toString(flags[i]).c_str()); + ElementErrorCode::toString(flags[i])); } } else diff --git a/MeshLib/MeshSurfaceExtraction.cpp b/MeshLib/MeshSurfaceExtraction.cpp index 20c3973bf76f1cff19f00880ed765ba88c1510f6..bc60c273396d2d6a55a72c1b5893ea9dcfc0cf88 100644 --- a/MeshLib/MeshSurfaceExtraction.cpp +++ b/MeshLib/MeshSurfaceExtraction.cpp @@ -115,7 +115,7 @@ bool createSfcMeshProperties(MeshLib::Mesh& sfc_mesh, WARN( "Skipping property vector '{:s}' - no matching data type " "found.", - name.c_str()); + name); vectors_skipped++; } } diff --git a/MeshLib/Properties.h b/MeshLib/Properties.h index 6f619e6cffd3314b4129e915c8736fdfb9057e2a..774e8457e0f36d3e3b4d3e29137e9093b2b693f7 100644 --- a/MeshLib/Properties.h +++ b/MeshLib/Properties.h @@ -16,7 +16,6 @@ #include <string> #include <map> -#include "BaseLib/Logging.h" #include "Location.h" diff --git a/MeshLib/PropertyVector.h b/MeshLib/PropertyVector.h index b79aecce97954194434b297c95f921abc2f9997a..e7563d7d93b47ed2f7a51f8797057755f3f3236d 100644 --- a/MeshLib/PropertyVector.h +++ b/MeshLib/PropertyVector.h @@ -233,7 +233,7 @@ public: OGS_FATAL( "No data found in the property vector {:s} " "for the tuple index {:d} and component {:d}", - getPropertyName().c_str(), tuple_index, component); + getPropertyName(), tuple_index, component); } return p[component]; } diff --git a/MeshLib/convertMeshToGeo.cpp b/MeshLib/convertMeshToGeo.cpp index 3f0fe7b1f1a67f2492aa99ba5113f36708a287ae..10a6aa6aef239ba34a1e4ac86b10aa60d4832a13 100644 --- a/MeshLib/convertMeshToGeo.cpp +++ b/MeshLib/convertMeshToGeo.cpp @@ -104,7 +104,7 @@ bool convertMeshToGeo(const MeshLib::Mesh& mesh, OGS_FATAL( "Could not get minimum/maximum ranges values for the " "MaterialIDs property in the mesh '{:s}'.", - mesh.getName().c_str()); + mesh.getName()); } return std::make_tuple(materialIds, *bounds); }; diff --git a/NumLib/DOF/MeshComponentMap.cpp b/NumLib/DOF/MeshComponentMap.cpp index a69b7c9f13ffd3b8feafd2b7b8df629d5f22a328..886d31c9c296e1c5295ba0ac45e8969b878b83a3 100644 --- a/NumLib/DOF/MeshComponentMap.cpp +++ b/NumLib/DOF/MeshComponentMap.cpp @@ -127,7 +127,7 @@ MeshComponentMap MeshComponentMap::getSubset( "Assumption in the MeshComponentMap violated. Expecting " "all of mesh ids to be the same, but it is not true for " "the mesh '{:s}' with id {:d}.", - first_mismatch->getMesh().getName().c_str(), + first_mismatch->getMesh().getName(), first_mismatch->getMeshID()); } } @@ -182,9 +182,9 @@ MeshComponentMap MeshComponentMap::getSubset( "the bulk component, usually because the geometry for " "the boundary condition is too large.", component_id, - new_mesh_subset.getMesh().getName().c_str(), + new_mesh_subset.getMesh().getName(), node_id, - bulk_mesh_subsets.front().getMesh().getName().c_str(), + bulk_mesh_subsets.front().getMesh().getName(), bulk_node_ids_map[node_id]); } continue; diff --git a/NumLib/Fem/CoordinatesMapping/NaturalNodeCoordinates.h b/NumLib/Fem/CoordinatesMapping/NaturalNodeCoordinates.h index 594278b4a7890133715f4ac998093dfb162e55b9..6bbf058792fa01de36ff531adbfc2e330f9e98a4 100644 --- a/NumLib/Fem/CoordinatesMapping/NaturalNodeCoordinates.h +++ b/NumLib/Fem/CoordinatesMapping/NaturalNodeCoordinates.h @@ -10,7 +10,6 @@ #include <cassert> -#include "BaseLib/Error.h" #include "MathLib/Point3d.h" #include "MeshLib/ElementCoordinatesMappingLocal.h" diff --git a/NumLib/ODESolver/ConvergenceCriterion.cpp b/NumLib/ODESolver/ConvergenceCriterion.cpp index 5babc76d086b4cb442736f49b58661189afdfb5d..e81149116dd62353f0f2c95df00a9dfb687c3696 100644 --- a/NumLib/ODESolver/ConvergenceCriterion.cpp +++ b/NumLib/ODESolver/ConvergenceCriterion.cpp @@ -41,8 +41,7 @@ std::unique_ptr<ConvergenceCriterion> createConvergenceCriterion( return createConvergenceCriterionPerComponentResidual(config); } - OGS_FATAL("There is no convergence criterion of type `{:s}'.", - type.c_str()); + OGS_FATAL("There is no convergence criterion of type `{:s}'.", type); } bool checkRelativeTolerance(const double reltol, const double numerator, diff --git a/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp b/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp index 438caf36a27a555a5b157b8d64599d5669f004b8..a1276d9288904d52aed3571171d1cda6da24d322 100644 --- a/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp +++ b/NumLib/ODESolver/ConvergenceCriterionDeltaX.cpp @@ -73,7 +73,7 @@ std::unique_ptr<ConvergenceCriterionDeltaX> createConvergenceCriterionDeltaX( if (norm_type == MathLib::VecNormType::INVALID) { - OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str.c_str()); + OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str); } return std::make_unique<ConvergenceCriterionDeltaX>( diff --git a/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp b/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp index 8fe5bffb16b150a644ce01408d3443c12cee354d..24ed7af779cc16fd0ac1e02c75808a9395471dcd 100644 --- a/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp +++ b/NumLib/ODESolver/ConvergenceCriterionPerComponentDeltaX.cpp @@ -122,7 +122,7 @@ createConvergenceCriterionPerComponentDeltaX(const BaseLib::ConfigTree& config) if (norm_type == MathLib::VecNormType::INVALID) { - OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str.c_str()); + OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str); } return std::make_unique<ConvergenceCriterionPerComponentDeltaX>( diff --git a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp index 0a9d3196c369c2d8c58df1988e0a91bdacca50a4..d266ec8ec80a0c6bac5ffbc8f8f9951f9595e105 100644 --- a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp +++ b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp @@ -161,7 +161,7 @@ createConvergenceCriterionPerComponentResidual( if (norm_type == MathLib::VecNormType::INVALID) { - OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str.c_str()); + OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str); } return std::make_unique<ConvergenceCriterionPerComponentResidual>( diff --git a/NumLib/ODESolver/ConvergenceCriterionResidual.cpp b/NumLib/ODESolver/ConvergenceCriterionResidual.cpp index 1d94919c10273046ef9777bb0b04241148374a33..03fc9f9eac1afb6439069126d3e5d41a373f323a 100644 --- a/NumLib/ODESolver/ConvergenceCriterionResidual.cpp +++ b/NumLib/ODESolver/ConvergenceCriterionResidual.cpp @@ -108,7 +108,7 @@ createConvergenceCriterionResidual(const BaseLib::ConfigTree& config) if (norm_type == MathLib::VecNormType::INVALID) { - OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str.c_str()); + OGS_FATAL("Unknown vector norm type `{:s}'.", norm_type_str); } return std::make_unique<ConvergenceCriterionResidual>( diff --git a/NumLib/ODESolver/NonlinearSolver.h b/NumLib/ODESolver/NonlinearSolver.h index ad0fdf89e987b75c09e10553be55f4c2988cd46e..f5b5bdbdd72786427290a6bba58372358c627176 100644 --- a/NumLib/ODESolver/NonlinearSolver.h +++ b/NumLib/ODESolver/NonlinearSolver.h @@ -12,7 +12,6 @@ #include <memory> #include <utility> -#include "BaseLib/Logging.h" #include "ConvergenceCriterion.h" #include "NonlinearSolverStatus.h" diff --git a/NumLib/ODESolver/TimeDiscretizationBuilder.cpp b/NumLib/ODESolver/TimeDiscretizationBuilder.cpp index 59fbb2070daed49627de36a5192ebc81e3019c56..337b32381ce2935cee29bee25441cde35986c258 100644 --- a/NumLib/ODESolver/TimeDiscretizationBuilder.cpp +++ b/NumLib/ODESolver/TimeDiscretizationBuilder.cpp @@ -45,6 +45,6 @@ std::unique_ptr<TimeDiscretization> createTimeDiscretization( return std::make_unique<BackwardDifferentiationFormula>(order); } - OGS_FATAL("Unrecognized time discretization type `{:s}'", type.c_str()); + OGS_FATAL("Unrecognized time discretization type `{:s}'", type); } } // namespace NumLib diff --git a/NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.cpp b/NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.cpp index c57c891ceccacceaca8bc17406efdb9fd596d891..742097186663bb782bece72c29c5e2a14656f725 100644 --- a/NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.cpp +++ b/NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.cpp @@ -13,7 +13,6 @@ #include "BaseLib/Algorithm.h" #include "BaseLib/ConfigTree.h" -#include "BaseLib/Error.h" #include "IterationNumberBasedTimeStepping.h" #include "TimeStepAlgorithm.h" diff --git a/ParameterLib/CurveScaledParameter.cpp b/ParameterLib/CurveScaledParameter.cpp index 94ba48e4cb876f8e764121c2c8aca7b00f7c82b2..0b596c067323e7d1138ca4ef81e9de3190169d91 100644 --- a/ParameterLib/CurveScaledParameter.cpp +++ b/ParameterLib/CurveScaledParameter.cpp @@ -25,18 +25,18 @@ std::unique_ptr<ParameterBase> createCurveScaledParameter( //! \ogs_file_param{prj__parameters__parameter__CurveScaled__curve} auto curve_name = config.getConfigParameter<std::string>("curve"); - DBUG("Using curve {:s}", curve_name.c_str()); + DBUG("Using curve {:s}", curve_name); auto const curve_it = curves.find(curve_name); if (curve_it == curves.end()) { - OGS_FATAL("Curve `{:s}' does not exists.", curve_name.c_str()); + OGS_FATAL("Curve `{:s}' does not exists.", curve_name); } auto referenced_parameter_name = //! \ogs_file_param{prj__parameters__parameter__CurveScaled__parameter} config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", referenced_parameter_name.c_str()); + DBUG("Using parameter {:s}", referenced_parameter_name); // TODO other data types than only double return std::make_unique<CurveScaledParameter<double>>( diff --git a/ParameterLib/FunctionParameter.h b/ParameterLib/FunctionParameter.h index acfa869a4ce3d4cb63641120c915c79397be7b47..362dfe66e493a79ed723321a8ade3524b5286bcd 100644 --- a/ParameterLib/FunctionParameter.h +++ b/ParameterLib/FunctionParameter.h @@ -62,8 +62,8 @@ struct FunctionParameter final : public Parameter<T> if (!parser.compile(_vec_expression_str[i], _vec_expression[i])) { OGS_FATAL("Error: {:s}\tExpression: {:s}\n", - parser.error().c_str(), - _vec_expression_str[i].c_str()); + parser.error(), + _vec_expression_str[i]); } } } diff --git a/ParameterLib/GroupBasedParameter.cpp b/ParameterLib/GroupBasedParameter.cpp index 512eaeb1eed63d4d6e05db0c6bd2a1830a5a4644..aa410e1b2b62e25fc1bcd14b4d99043932234553 100644 --- a/ParameterLib/GroupBasedParameter.cpp +++ b/ParameterLib/GroupBasedParameter.cpp @@ -27,7 +27,7 @@ std::unique_ptr<ParameterBase> createGroupBasedParameter( std::string const group_id_property_name = //! \ogs_file_param{prj__parameters__parameter__Group__group_id_property} config.getConfigParameter<std::string>("group_id_property"); - DBUG("Using group_id_property {:s}", group_id_property_name.c_str()); + DBUG("Using group_id_property {:s}", group_id_property_name); auto const& group_id_property = mesh.getProperties().getPropertyVector<int>(group_id_property_name); @@ -76,7 +76,7 @@ std::unique_ptr<ParameterBase> createGroupBasedParameter( OGS_FATAL( "Specified property index {:d} does not exist in the property " "vector {:s}", - p.first, group_id_property_name.c_str()); + p.first, group_id_property_name); } if (p.second.size() != n_values) diff --git a/ParameterLib/MeshElementParameter.cpp b/ParameterLib/MeshElementParameter.cpp index f953c815bed8a4de234c340610c03d685ae330c4..2cdcb172dd1e4a8daa5278b4f07079d31dd2b66b 100644 --- a/ParameterLib/MeshElementParameter.cpp +++ b/ParameterLib/MeshElementParameter.cpp @@ -23,7 +23,7 @@ std::unique_ptr<ParameterBase> createMeshElementParameter( auto const field_name = //! \ogs_file_param{prj__parameters__parameter__MeshElement__field_name} config.getConfigParameter<std::string>("field_name"); - DBUG("Using field_name {:s}", field_name.c_str()); + DBUG("Using field_name {:s}", field_name); // TODO other data types than only double auto const& property = @@ -32,7 +32,7 @@ std::unique_ptr<ParameterBase> createMeshElementParameter( if (property->getMeshItemType() != MeshLib::MeshItemType::Cell) { OGS_FATAL("The mesh property `{:s}' is not an element property.", - field_name.c_str()); + field_name); } return std::make_unique<MeshElementParameter<double>>(name, mesh, diff --git a/ParameterLib/MeshNodeParameter.cpp b/ParameterLib/MeshNodeParameter.cpp index 2ff3833aa46f58b49865da9b107a9cd87eee51ba..6e5305804343d543640138bea4da0e3a6dc70ec6 100644 --- a/ParameterLib/MeshNodeParameter.cpp +++ b/ParameterLib/MeshNodeParameter.cpp @@ -23,7 +23,7 @@ std::unique_ptr<ParameterBase> createMeshNodeParameter( auto const field_name = //! \ogs_file_param{prj__parameters__parameter__MeshNode__field_name} config.getConfigParameter<std::string>("field_name"); - DBUG("Using field_name {:s}", field_name.c_str()); + DBUG("Using field_name {:s}", field_name); // TODO other data types than only double auto const& property = @@ -32,7 +32,7 @@ std::unique_ptr<ParameterBase> createMeshNodeParameter( if (property->getMeshItemType() != MeshLib::MeshItemType::Node) { OGS_FATAL("The mesh property `{:s}' is not a nodal property.", - field_name.c_str()); + field_name); } return std::make_unique<MeshNodeParameter<double>>(name, mesh, *property); diff --git a/ParameterLib/Parameter.cpp b/ParameterLib/Parameter.cpp index a8b7bd3e6f835e6e0b5a925c5dff94ba7ac1226b..9cf0c794a34d48e6e5d4ed7e117b947b6e83f1c2 100644 --- a/ParameterLib/Parameter.cpp +++ b/ParameterLib/Parameter.cpp @@ -48,42 +48,41 @@ std::unique_ptr<ParameterBase> createParameter( // Create parameter based on the provided type. if (type == "Constant") { - INFO("ConstantParameter: {:s}", name.c_str()); + INFO("ConstantParameter: {:s}", name); return createConstantParameter(name, config); } if (type == "CurveScaled") { - INFO("CurveScaledParameter: {:s}", name.c_str()); + INFO("CurveScaledParameter: {:s}", name); return createCurveScaledParameter(name, config, curves); } if (type == "Function") { - INFO("FunctionParameter: {:s}", name.c_str()); + INFO("FunctionParameter: {:s}", name); return createFunctionParameter(name, config, mesh); } if (type == "Group") { - INFO("GroupBasedParameter: {:s}", name.c_str()); + INFO("GroupBasedParameter: {:s}", name); return createGroupBasedParameter(name, config, mesh); } if (type == "MeshElement") { - INFO("MeshElementParameter: {:s}", name.c_str()); + INFO("MeshElementParameter: {:s}", name); return createMeshElementParameter(name, config, mesh); } if (type == "MeshNode") { - INFO("MeshNodeParameter: {:s}", name.c_str()); + INFO("MeshNodeParameter: {:s}", name); return createMeshNodeParameter(name, config, mesh); } if (type == "TimeDependentHeterogeneousParameter") { - INFO("TimeDependentHeterogeneousParameter: {:s}", name.c_str()); + INFO("TimeDependentHeterogeneousParameter: {:s}", name); return createTimeDependentHeterogeneousParameter(name, config); } - OGS_FATAL("Cannot construct a parameter of given type '{:s}'.", - type.c_str()); + OGS_FATAL("Cannot construct a parameter of given type '{:s}'.", type); } boost::optional<std::string> isDefinedOnSameMesh(ParameterBase const& parameter, diff --git a/ParameterLib/TimeDependentHeterogeneousParameter.cpp b/ParameterLib/TimeDependentHeterogeneousParameter.cpp index 063004b449583709a4d95664b3db7762c0b63c69..6e26214796443e649b4ec98c431e544a813e4bfd 100644 --- a/ParameterLib/TimeDependentHeterogeneousParameter.cpp +++ b/ParameterLib/TimeDependentHeterogeneousParameter.cpp @@ -99,7 +99,7 @@ void TimeDependentHeterogeneousParameter::initialize( OGS_FATAL( "All referenced parameters in time dependent heterogeneous " "parameter '{:s}' have to have the same number of components.", - name.c_str()); + name); } } @@ -130,7 +130,7 @@ std::unique_ptr<ParameterBase> createTimeDependentHeterogeneousParameter( OGS_FATAL( "Time dependent heterogeneous parameter '{:s}' doesn't contain " "necessary time series data.", - name.c_str()); + name); } if (!std::is_sorted( @@ -143,7 +143,7 @@ std::unique_ptr<ParameterBase> createTimeDependentHeterogeneousParameter( OGS_FATAL( "The points in time in the time series '{:s}' aren't in ascending " "order.", - name.c_str()); + name); } return std::make_unique<TimeDependentHeterogeneousParameter>( diff --git a/ParameterLib/Utils.cpp b/ParameterLib/Utils.cpp index 58525d1f53a9046a802d0613424f5602bb975ea9..3308b0008bd1f907d19128aca1a0440970fb7b62 100644 --- a/ParameterLib/Utils.cpp +++ b/ParameterLib/Utils.cpp @@ -28,7 +28,7 @@ ParameterBase* findParameterByName( return nullptr; } - DBUG("Found parameter `{:s}'.", (*it)->name.c_str()); + DBUG("Found parameter `{:s}'.", (*it)->name); return it->get(); } } // namespace ParameterLib diff --git a/ParameterLib/Utils.h b/ParameterLib/Utils.h index 10eef070febfd0740b2a24f798aadf4e98fbcd64..bb96e3a38b8f5f03a2e3fd1b8679369b716a438e 100644 --- a/ParameterLib/Utils.h +++ b/ParameterLib/Utils.h @@ -58,7 +58,7 @@ Parameter<ParameterDataType>* findParameterOptional( if (!parameter) { OGS_FATAL("The read parameter `{:s}' is of incompatible type.", - parameter_name.c_str()); + parameter_name); } if (num_components != 0 && @@ -68,8 +68,7 @@ Parameter<ParameterDataType>* findParameterOptional( "The read parameter `{:s}' has the wrong number of components " "({:d} " "instead of {:d}).", - parameter_name.c_str(), parameter->getNumberOfComponents(), - num_components); + parameter_name, parameter->getNumberOfComponents(), num_components); } // Test the parameter's mesh only if there is a "test"-mesh provided. @@ -112,7 +111,7 @@ Parameter<ParameterDataType>& findParameter( { OGS_FATAL( "Could not find parameter `{:s}' in the provided parameters list.", - parameter_name.c_str()); + parameter_name); } return *parameter; } diff --git a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp index 6e958f8dab1fe6af64ee3faf3543462ab12972c9..c13a3bcdd1933d2d4d855d1a9f693b9629502c30 100644 --- a/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/ConstraintDirichletBoundaryCondition.cpp @@ -242,7 +242,7 @@ createConstraintDirichletBoundaryCondition( if (constraint_type != "Flux") { OGS_FATAL("The constraint type is '{:s}', but has to be 'Flux'.", - constraint_type.c_str()); + constraint_type); } // Todo (TF) Open question: How to specify which getFlux function should be @@ -274,8 +274,8 @@ createConstraintDirichletBoundaryCondition( "at " "geometry 'TODO' : The constraining process variable is set as " "'{:s}', but this is not specified in the project file.", - constraining_process_variable_name.c_str(), - constraining_process_variable.c_str()); + constraining_process_variable_name, + constraining_process_variable); } auto const constraint_threshold = @@ -292,14 +292,14 @@ createConstraintDirichletBoundaryCondition( "The constraint direction is '{:s}', but has to be either " "'greater' " "or 'lower'.", - constraint_direction_string.c_str()); + constraint_direction_string); } bool const lower = constraint_direction_string == "lower"; //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__ConstraintDirichletBoundaryCondition__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", param_name.c_str()); + DBUG("Using parameter {:s}", param_name); auto& param = ParameterLib::findParameter<double>(param_name, parameters, 1, &bc_mesh); diff --git a/ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp index b3ca1e122564e07eda0c505c40ab581e3c75556a..930d30f12c4166b4ebfe2458d412b772a3092ef0 100644 --- a/ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/CreateBoundaryCondition.cpp @@ -131,7 +131,7 @@ std::unique_ptr<BoundaryCondition> createBoundaryCondition( config.config, dof_table, bulk_mesh, variable_id, *config.component_id); } - OGS_FATAL("Unknown boundary condition type: `{:s}'.", type.c_str()); + OGS_FATAL("Unknown boundary condition type: `{:s}'.", type); } } // namespace ProcessLib diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp index 361787d93f78d78b489c6c9945f9c5828c054fc9..dbc6446cfaa208c1784b3196f79fa52f171ce4cd 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryCondition.cpp @@ -67,7 +67,7 @@ std::unique_ptr<DirichletBoundaryCondition> createDirichletBoundaryCondition( //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__Dirichlet__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", param_name.c_str()); + DBUG("Using parameter {:s}", param_name); auto& parameter = ParameterLib::findParameter<double>( param_name, parameters, 1, &bc_mesh); diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp index 8bdcb355a516286d5ddbdd4cd7498cfb0bd985e2..b22f8da30d5396ac02c72eb9cb405a82f7705474 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionAuxiliaryFunctions.cpp @@ -45,7 +45,7 @@ void checkParametersOfDirichletBoundaryCondition( OGS_FATAL( "The required bulk node ids map does not exist in the boundary " "mesh '{:s}'.", - bc_mesh.getName().c_str()); + bc_mesh.getName()); } DBUG( diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp index fd2c99ea7ca2855ccf7de94ab0029c85aa460e3e..3474a71e14aac4538a7bcebd8273c103933c3c25 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.cpp @@ -108,7 +108,7 @@ createDirichletBoundaryConditionWithinTimeInterval( //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__DirichletWithinTimeInterval__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", param_name.c_str()); + DBUG("Using parameter {:s}", param_name); auto& param = ParameterLib::findParameter<double>(param_name, parameters, 1, &bc_mesh); diff --git a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h b/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h index 25f7d7db31276e996453a1d8fb58b44f30f77d7d..952e2171d60e2b10af07d5378639fcb84f081dfb 100644 --- a/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h +++ b/ProcessLib/BoundaryCondition/GenericNaturalBoundaryCondition-impl.h @@ -50,7 +50,7 @@ GenericNaturalBoundaryCondition<BoundaryConditionData, OGS_FATAL( "The required bulk node ids map does not exist in the boundary " "mesh '{:s}'.", - _bc_mesh.getName().c_str()); + _bc_mesh.getName()); } std::vector<MeshLib::Node*> const& bc_nodes = _bc_mesh.getNodes(); diff --git a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp index 66b2f47e257ef3528c4843707641ae5d79d5e524..11fa9cd09d77fb79d67dfcaaf7bec7eba270038d 100644 --- a/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/HCNonAdvectiveFreeComponentFlowBoundaryCondition.cpp @@ -36,7 +36,7 @@ createHCNonAdvectiveFreeComponentFlowBoundaryCondition( "The dimension ({:d}) of the given boundary mesh '{:s}' is not by " "one " "lower than the bulk dimension ({:d}).", - bc_mesh.getDimension(), bc_mesh.getName().c_str(), global_dim); + bc_mesh.getDimension(), bc_mesh.getName(), global_dim); } auto const boundary_permeability_name = diff --git a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp index 79d4a2679d0047a772dfac5d9d08928a465f2d46..dcc0a9e6636b78b6fcfa500bb6a1fb82a4e67947 100644 --- a/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/NeumannBoundaryCondition.cpp @@ -26,7 +26,7 @@ std::unique_ptr<NeumannBoundaryCondition> createNeumannBoundaryCondition( //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__Neumann__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", param_name.c_str()); + DBUG("Using parameter {:s}", param_name); auto const& param = ParameterLib::findParameter<double>( param_name, parameters, 1, &bc_mesh); @@ -51,7 +51,7 @@ std::unique_ptr<NeumannBoundaryCondition> createNeumannBoundaryCondition( auto const area_parameter_name = //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__Neumann__area_parameter} config.getConfigParameter<std::string>("area_parameter"); - DBUG("area parameter name '{:s}'", area_parameter_name.c_str()); + DBUG("area parameter name '{:s}'", area_parameter_name); integral_measure = &ParameterLib::findParameter<double>( area_parameter_name, parameters, 1, &bc_mesh); } @@ -62,7 +62,7 @@ std::unique_ptr<NeumannBoundaryCondition> createNeumannBoundaryCondition( "The dimension ({:d}) of the given boundary mesh '{:s}' is not " "lower " "than the bulk dimension ({:d}).", - bc_mesh.getDimension(), bc_mesh.getName().c_str(), global_dim); + bc_mesh.getDimension(), bc_mesh.getName(), global_dim); } return std::make_unique<NeumannBoundaryCondition>( diff --git a/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h b/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h index 23bac056da2ba4e68952f82d3100e081b552e438..b9e114b60a9a017137905078cd9f8a5d31aa17f7 100644 --- a/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h +++ b/ProcessLib/BoundaryCondition/NormalTractionBoundaryCondition-impl.h @@ -87,7 +87,7 @@ createNormalTractionBoundaryCondition( auto const parameter_name = //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__NormalTraction__parameter} config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s}", parameter_name.c_str()); + DBUG("Using parameter {:s}", parameter_name); auto const& pressure = ParameterLib::findParameter<double>( parameter_name, parameters, 1, &bc_mesh); diff --git a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp index 5af5c82004b7294b0833ddaf95eb7c74adf0896e..f3fb6e2fd363c15520e447db6e8345f18252f174 100644 --- a/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/Python/PythonBoundaryCondition.cpp @@ -224,7 +224,7 @@ std::unique_ptr<PythonBoundaryCondition> createPythonBoundaryCondition( "Function `{:s}' is not defined in the python script file, or " "there " "was no python script file specified.", - bc_object.c_str()); + bc_object); } auto* bc = scope[bc_object.c_str()] diff --git a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp index 64f3ebeafeca2363880c84a37c5e2f1a93c25326..324febc41b4ff601c37dc9b473373e270f80430c 100644 --- a/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/RobinBoundaryCondition.cpp @@ -31,7 +31,7 @@ std::unique_ptr<RobinBoundaryCondition> createRobinBoundaryCondition( "The dimension ({:d}) of the given boundary mesh '{:s}' is not " "lower " "than the bulk dimension ({:d}).", - bc_mesh.getDimension(), bc_mesh.getName().c_str(), global_dim); + bc_mesh.getDimension(), bc_mesh.getName(), global_dim); } //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__Robin__alpha} @@ -50,7 +50,7 @@ std::unique_ptr<RobinBoundaryCondition> createRobinBoundaryCondition( auto const area_parameter_name = //! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__Robin__area_parameter} config.getConfigParameter<std::string>("area_parameter"); - DBUG("area parameter name '{:s}'", area_parameter_name.c_str()); + DBUG("area parameter name '{:s}'", area_parameter_name); integral_measure = &ParameterLib::findParameter<double>( area_parameter_name, parameters, 1, &bc_mesh); } diff --git a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp b/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp index b4e3bd3243044fe2542e56ba37cf2682246f284b..a9aad4de2ad03b39e3512cf55fd421b06b2102c8 100644 --- a/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp +++ b/ProcessLib/BoundaryCondition/VariableDependentNeumannBoundaryCondition.cpp @@ -39,7 +39,7 @@ createVariableDependentNeumannBoundaryCondition( "The dimension ({:d}) of the given boundary mesh '{:s}' is not by " "one " "lower than the bulk dimension ({:d}).", - bc_mesh.getDimension(), bc_mesh.getName().c_str(), global_dim); + bc_mesh.getDimension(), bc_mesh.getName(), global_dim); } auto const constant_name = diff --git a/ProcessLib/CompareJacobiansJacobianAssembler.cpp b/ProcessLib/CompareJacobiansJacobianAssembler.cpp index e0b8aa1094ebc8370f6d501ba5682a48fb32a5c9..24b94d4db5c18d4899ded4288b02dcb28289a0fa 100644 --- a/ProcessLib/CompareJacobiansJacobianAssembler.cpp +++ b/ProcessLib/CompareJacobiansJacobianAssembler.cpp @@ -277,7 +277,7 @@ void CompareJacobiansJacobianAssembler::assembleWithJacobian( if (tol_exceeded) { - WARN("Compare Jacobians: {:s}", msg_tolerance.str().c_str()); + WARN("Compare Jacobians: {:s}", msg_tolerance.str()); } bool const output = tol_exceeded || fatal_error; @@ -384,7 +384,7 @@ void CompareJacobiansJacobianAssembler::assembleWithJacobian( if (fatal_error) { _log_file << std::flush; - OGS_FATAL("{:s}", msg_fatal.c_str()); + OGS_FATAL("{:s}", msg_fatal); } if (tol_exceeded && _fail_on_error) diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp index a14f77355f464b4fe922629cc321d42ab0d4d948..f754242db7695ff8297eaf4a88a637016000f2ad 100644 --- a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp @@ -124,7 +124,7 @@ std::unique_ptr<Process> createComponentTransportProcess( "Number of components for process variable '{:s}' should be 1 " "rather " "than {:d}.", - it->get().getName().c_str(), + it->get().getName(), it->get().getNumberOfComponents()); } diff --git a/ProcessLib/CoupledSolutionsForStaggeredScheme.h b/ProcessLib/CoupledSolutionsForStaggeredScheme.h index 5e079e3a9a54ad409db42b4c541dd34e800367a2..9d30658923e081e770539075d9b69a279f51df9c 100644 --- a/ProcessLib/CoupledSolutionsForStaggeredScheme.h +++ b/ProcessLib/CoupledSolutionsForStaggeredScheme.h @@ -49,7 +49,7 @@ struct CoupledSolutionsForStaggeredScheme */ struct LocalCoupledSolutions { - LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_) + explicit LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_) : local_coupled_xs0(std::move(local_coupled_xs0_)) { } diff --git a/ProcessLib/CreateJacobianAssembler.cpp b/ProcessLib/CreateJacobianAssembler.cpp index 3b0d5fac9aee8f7e3a53e20e3fe4adeb9126700d..81e5208d849888ce1e8293e05f8779f487599c23 100644 --- a/ProcessLib/CreateJacobianAssembler.cpp +++ b/ProcessLib/CreateJacobianAssembler.cpp @@ -41,6 +41,6 @@ std::unique_ptr<AbstractJacobianAssembler> createJacobianAssembler( return createCompareJacobiansJacobianAssembler(*config); } - OGS_FATAL("Unknown Jacobian assembler type: `{:s}'.", type.c_str()); + OGS_FATAL("Unknown Jacobian assembler type: `{:s}'.", type); } } // namespace ProcessLib diff --git a/ProcessLib/Deformation/SolidMaterialInternalToSecondaryVariables.h b/ProcessLib/Deformation/SolidMaterialInternalToSecondaryVariables.h index 164e6d8c2f9cffc250de2f47775a986fb8f9a183..8afb94a9fd83303c80aed7f19a4ba34925dc24f4 100644 --- a/ProcessLib/Deformation/SolidMaterialInternalToSecondaryVariables.h +++ b/ProcessLib/Deformation/SolidMaterialInternalToSecondaryVariables.h @@ -42,7 +42,7 @@ void solidMaterialInternalToSecondaryVariables( auto const& name = internal_variable.name; auto const& fct = internal_variable.getter; auto const num_components = internal_variable.num_components; - DBUG("Registering internal variable {:s}.", name.c_str()); + DBUG("Registering internal variable {:s}.", name); auto getIntPtValues = [fct, num_components]( diff --git a/ProcessLib/HT/CreateHTProcess.cpp b/ProcessLib/HT/CreateHTProcess.cpp index 67a781f659c2a81cd745d14669d1611dd90d16e4..712a9117d327c573ab9014da65ed247ce7f176a2 100644 --- a/ProcessLib/HT/CreateHTProcess.cpp +++ b/ProcessLib/HT/CreateHTProcess.cpp @@ -143,11 +143,11 @@ std::unique_ptr<Process> createHTProcess( //! \ogs_file_param_special{prj__processes__process__HT__solid_thermal_expansion__thermal_expansion} *solid_config, "thermal_expansion", parameters, 1, &mesh); DBUG("Use '{:s}' as solid thermal expansion.", - solid_thermal_expansion->name.c_str()); + solid_thermal_expansion->name); biot_constant = &ParameterLib::findParameter<double>( //! \ogs_file_param_special{prj__processes__process__HT__solid_thermal_expansion__biot_constant} *solid_config, "biot_constant", parameters, 1, &mesh); - DBUG("Use '{:s}' as Biot's constant.", biot_constant->name.c_str()); + DBUG("Use '{:s}' as Biot's constant.", biot_constant->name); } std::unique_ptr<ProcessLib::SurfaceFluxData> surfaceflux; diff --git a/ProcessLib/HeatConduction/CreateHeatConductionProcess.cpp b/ProcessLib/HeatConduction/CreateHeatConductionProcess.cpp index 8061591280d055b6f6f8d8e2cd021fcddeb178c4..d9febf6331422803ef6b40227cb4b49bd1e6ac41 100644 --- a/ProcessLib/HeatConduction/CreateHeatConductionProcess.cpp +++ b/ProcessLib/HeatConduction/CreateHeatConductionProcess.cpp @@ -54,7 +54,7 @@ std::unique_ptr<Process> createHeatConductionProcess( "thermal_conductivity", parameters, 1, &mesh); DBUG("Use '{:s}' as thermal conductivity parameter.", - thermal_conductivity.name.c_str()); + thermal_conductivity.name); // heat capacity parameter. auto& heat_capacity = ParameterLib::findParameter<double>( @@ -62,7 +62,7 @@ std::unique_ptr<Process> createHeatConductionProcess( //! \ogs_file_param_special{prj__processes__process__HEAT_CONDUCTION__heat_capacity} "heat_capacity", parameters, 1, &mesh); - DBUG("Use '{:s}' as heat capacity parameter.", heat_capacity.name.c_str()); + DBUG("Use '{:s}' as heat capacity parameter.", heat_capacity.name); // density parameter. auto& density = ParameterLib::findParameter<double>( @@ -70,7 +70,7 @@ std::unique_ptr<Process> createHeatConductionProcess( //! \ogs_file_param_special{prj__processes__process__HEAT_CONDUCTION__density} "density", parameters, 1, &mesh); - DBUG("Use '{:s}' as density parameter.", density.name.c_str()); + DBUG("Use '{:s}' as density parameter.", density.name); HeatConductionProcessData process_data{thermal_conductivity, heat_capacity, density}; diff --git a/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp index 5f5c8de933d9086277e1e1f0c5327e511de3ffd8..888cc97e53ddb3a90ff7146a31daf9b93a678fd7 100644 --- a/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp +++ b/ProcessLib/HeatTransportBHE/BHE/CreateFlowAndTemperatureControl.cpp @@ -113,7 +113,7 @@ FlowAndTemperatureControl createFlowAndTemperatureControl( refrigerant.specific_heat_capacity, refrigerant.density}; } OGS_FATAL("FlowAndTemperatureControl type '{:s}' is not implemented.", - type.c_str()); + type); } } // namespace BHE } // namespace HeatTransportBHE diff --git a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp index 7d54a4c1ca0ce096643feeebb8d4ffa3feb72472..310f46197c5d7f5455efbb19abca17ea77596adc 100644 --- a/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp +++ b/ProcessLib/HeatTransportBHE/CreateHeatTransportBHEProcess.cpp @@ -81,10 +81,10 @@ std::unique_ptr<Process> createHeatTransportBHEProcess( "Could not find process variable '{:s}' in the provided " "variables " "list for config tag <{:s}>.", - pv_name.c_str(), "process_variable"); + pv_name, "process_variable"); } DBUG("Found process variable '{:s}' for config tag <{:s}>.", - variable->getName().c_str(), "process_variable"); + variable->getName(), "process_variable"); per_process_variables.emplace_back( const_cast<ProcessVariable&>(*variable)); @@ -144,7 +144,7 @@ std::unique_ptr<Process> createHeatTransportBHEProcess( BHE::createBHE1PType<BHE::BHE_1P>(bhe_config, curves)); continue; } - OGS_FATAL("Unknown BHE type '{:s}'.", bhe_type.c_str()); + OGS_FATAL("Unknown BHE type '{:s}'.", bhe_type); } // end of reading BHE parameters ------------------------------------------- diff --git a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp index a2dc0d40cedd1c0f5d2cd70668525bfc3efed885..9bd395f0a4d96f39068ca72308409b520c037895 100644 --- a/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -85,26 +85,26 @@ std::unique_ptr<Process> createHydroMechanicsProcess( } DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate pressure with process variable '{:s}'.", - variable_p->getName().c_str()); + variable_p->getName()); if (variable_p->getNumberOfComponents() != 1) { OGS_FATAL( "Pressure process variable '{:s}' is not a scalar variable but has " "{:d} components.", - variable_p->getName().c_str(), + variable_p->getName(), variable_p->getNumberOfComponents()); } diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp index 31d6c019f19753e360663f37aa3f909652a07b8f..cf0e6b8b947c1750760631aeea0fafa4283f5d38 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp @@ -327,7 +327,7 @@ void HydroMechanicsProcess<DisplacementDim>::initializeConcreteProcess( OGS_FATAL( "Different number of components in meta data ({:d}) than in " "the integration point field data for '{:s}': {:d}.", - ip_meta_data.n_components, name.c_str(), + ip_meta_data.n_components, name, mesh_property.getNumberOfComponents()); } diff --git a/ProcessLib/LIE/Common/PostUtils.cpp b/ProcessLib/LIE/Common/PostUtils.cpp index 5809c62890323e3aef3580df2a04cd61a235d723..8847834a4b224d05f03f8ca01b7b6929d5a14ee6 100644 --- a/ProcessLib/LIE/Common/PostUtils.cpp +++ b/ProcessLib/LIE/Common/PostUtils.cpp @@ -255,7 +255,7 @@ void PostProcessTool::createProperties() "Property '{:s}' cannot be created because its mesh item type " "is " "not supported.", - name.c_str()); + name); } } } @@ -315,7 +315,7 @@ void PostProcessTool::copyProperties() "Property '{:s}' cannot be created because its mesh item type " "is " "not supported.", - name.c_str()); + name); } } } diff --git a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp index 0447440fb8427a650a302141a610c398c60e3d0d..5d5924d59569a73fd9a67d8c37724dc3ded1049d 100644 --- a/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.cpp @@ -80,10 +80,10 @@ std::unique_ptr<Process> createHydroMechanicsProcess( "Could not find process variable '{:s}' in the provided " "variables " "list for config tag <{:s}>.", - pv_name.c_str(), "process_variable"); + pv_name, "process_variable"); } DBUG("Found process variable '{:s}' for config tag <{:s}>.", - variable->getName().c_str(), "process_variable"); + variable->getName(), "process_variable"); if (pv_name.find("displacement") != std::string::npos && variable->getNumberOfComponents() != GlobalDim) @@ -92,7 +92,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( "Number of components of the process variable '{:s}' is " "different " "from the displacement dimension: got {:d}, expected {:d}", - variable->getName().c_str(), + variable->getName(), variable->getNumberOfComponents(), GlobalDim); } @@ -143,7 +143,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( "intrinsic_permeability", parameters, 1, &mesh); DBUG("Use '{:s}' as intrinsic permeability parameter.", - intrinsic_permeability.name.c_str()); + intrinsic_permeability.name); // Storage coefficient auto& specific_storage = ParameterLib::findParameter<double>( @@ -151,45 +151,42 @@ std::unique_ptr<Process> createHydroMechanicsProcess( //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__specific_storage} "specific_storage", parameters, 1, &mesh); - DBUG("Use '{:s}' as specific storage parameter.", - specific_storage.name.c_str()); + DBUG("Use '{:s}' as specific storage parameter.", specific_storage.name); // Fluid viscosity auto& fluid_viscosity = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__fluid_viscosity} "fluid_viscosity", parameters, 1, &mesh); - DBUG("Use '{:s}' as fluid viscosity parameter.", - fluid_viscosity.name.c_str()); + DBUG("Use '{:s}' as fluid viscosity parameter.", fluid_viscosity.name); // Fluid density auto& fluid_density = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__fluid_density} "fluid_density", parameters, 1, &mesh); - DBUG("Use '{:s}' as fluid density parameter.", fluid_density.name.c_str()); + DBUG("Use '{:s}' as fluid density parameter.", fluid_density.name); // Biot coefficient auto& biot_coefficient = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__biot_coefficient} "biot_coefficient", parameters, 1, &mesh); - DBUG("Use '{:s}' as Biot coefficient parameter.", - biot_coefficient.name.c_str()); + DBUG("Use '{:s}' as Biot coefficient parameter.", biot_coefficient.name); // Porosity auto& porosity = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__porosity} "porosity", parameters, 1, &mesh); - DBUG("Use '{:s}' as porosity parameter.", porosity.name.c_str()); + DBUG("Use '{:s}' as porosity parameter.", porosity.name); // Solid density auto& solid_density = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__solid_density} "solid_density", parameters, 1, &mesh); - DBUG("Use '{:s}' as solid density parameter.", solid_density.name.c_str()); + DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // Specific body force Eigen::Matrix<double, GlobalDim, 1> specific_body_force; @@ -246,7 +243,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( OGS_FATAL( "Cannot construct fracture constitutive relation of given type " "'{:s}'.", - frac_type.c_str()); + frac_type); } } @@ -280,7 +277,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( OGS_FATAL( "The initial aperture parameter '{:s}' must not be " "time-dependent.", - frac_prop->aperture0.name.c_str()); + frac_prop->aperture0.name); } auto permeability_model_config = @@ -298,7 +295,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( "initial_effective_stress", parameters, MathLib::KelvinVector::KelvinVectorDimensions<GlobalDim>::value, &mesh); DBUG("Use '{:s}' as initial effective stress parameter.", - initial_effective_stress.name.c_str()); + initial_effective_stress.name); // initial effective stress in fracture auto& initial_fracture_effective_stress = ParameterLib::findParameter< @@ -307,7 +304,7 @@ std::unique_ptr<Process> createHydroMechanicsProcess( //! \ogs_file_param_special{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__initial_fracture_effective_stress} "initial_fracture_effective_stress", parameters, GlobalDim, &mesh); DBUG("Use '{:s}' as initial fracture effective stress parameter.", - initial_fracture_effective_stress.name.c_str()); + initial_fracture_effective_stress.name); // deactivation of matrix elements in flow auto opt_deactivate_matrix_in_flow = diff --git a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp index c4982bb7626432741258b7a414d8f7be850bb839..48b16643e5da236d173075e0d251197786a7c92f 100644 --- a/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/LIE/HydroMechanics/HydroMechanicsProcess.cpp @@ -108,7 +108,7 @@ HydroMechanicsProcess<GlobalDim>::HydroMechanicsProcess( OGS_FATAL( "Could not get minimum/maximum ranges values for the " "MaterialIDs property in the mesh '{:s}'.", - mesh.getName().c_str()); + mesh.getName()); } std::vector<int> vec_p_inactive_matIDs; diff --git a/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp b/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp index 9c9d673b092892e9f7318c4d390d3afde5ad7027..994c6d690c110e84cd38dd27a46d6c22a08e586c 100644 --- a/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp +++ b/ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.cpp @@ -77,10 +77,10 @@ std::unique_ptr<Process> createSmallDeformationProcess( "Could not find process variable '{:s}' in the provided " "variables " "list for config tag <{:s}>.", - pv_name.c_str(), "process_variable"); + pv_name, "process_variable"); } DBUG("Found process variable '{:s}' for config tag <{:s}>.", - variable->getName().c_str(), "process_variable"); + variable->getName(), "process_variable"); per_process_variables.emplace_back( const_cast<ProcessVariable&>(*variable)); @@ -92,7 +92,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( } DBUG("Associate displacement with process variable '{:s}'.", - per_process_variables.back().get().getName().c_str()); + per_process_variables.back().get().getName()); if (per_process_variables.back().get().getNumberOfComponents() != DisplacementDim) @@ -100,7 +100,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - per_process_variables.back().get().getName().c_str(), + per_process_variables.back().get().getName(), per_process_variables.back().get().getNumberOfComponents(), DisplacementDim); } @@ -145,7 +145,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( OGS_FATAL( "Cannot construct fracture constitutive relation of given type " "'{:s}'.", - frac_type.c_str()); + frac_type); } // Fracture properties diff --git a/ProcessLib/Output/CreateOutput.cpp b/ProcessLib/Output/CreateOutput.cpp index a1923fddfd9ab6555633b7f89c362f9c192b957a..f62d514ef2915aabcee1a96e252a69c5d58173e4 100644 --- a/ProcessLib/Output/CreateOutput.cpp +++ b/ProcessLib/Output/CreateOutput.cpp @@ -90,10 +90,10 @@ std::unique_ptr<Output> createOutput( if (output_variables.find(out_var) != output_variables.cend()) { OGS_FATAL("output variable `{:s}' specified more than once.", - out_var.c_str()); + out_var); } - DBUG("adding output variable `{:s}'", out_var.c_str()); + DBUG("adding output variable `{:s}'", out_var); output_variables.insert(out_var); } @@ -113,7 +113,7 @@ std::unique_ptr<Output> createOutput( mesh_names_for_output.push_back( mesh_config.getValue<std::string>()); INFO("Configure mesh '{:s}' for output.", - mesh_names_for_output.back().c_str()); + mesh_names_for_output.back()); } } diff --git a/ProcessLib/Output/IntegrationPointWriter.cpp b/ProcessLib/Output/IntegrationPointWriter.cpp index 8bf1a417ef30e20104e8bfa586ff4e00175c3fa0..96c96c7176a07f7dbc7d0e6e19a6ab322c1d6ccb 100644 --- a/ProcessLib/Output/IntegrationPointWriter.cpp +++ b/ProcessLib/Output/IntegrationPointWriter.cpp @@ -81,8 +81,7 @@ static ProcessLib::IntegrationPointMetaData extractIntegrationPointMetaData( return {name, md["number_of_components"], md["integration_order"]}; } } - OGS_FATAL("No integration point meta data with name '{:s}' found.", - name.c_str()); + OGS_FATAL("No integration point meta data with name '{:s}' found.", name); } namespace ProcessLib @@ -113,7 +112,7 @@ IntegrationPointMetaData getIntegrationPointMetaData(MeshLib::Mesh const& mesh, "Integration point data '{:s}' is present in the vtk field " "data but the required 'IntegrationPointMetaData' array " "is not available.", - name.c_str()); + name); } auto const& mesh_property_ip_meta_data = *mesh.getProperties().template getPropertyVector<char>( diff --git a/ProcessLib/Output/Output.cpp b/ProcessLib/Output/Output.cpp index 422b082cf7c49b4c245438bc0ecf75b14f3f6c5e..eabb754b01f1767e01eeb01fbfb88dd87701bdd5 100644 --- a/ProcessLib/Output/Output.cpp +++ b/ProcessLib/Output/Output.cpp @@ -42,7 +42,7 @@ int convertVtkDataMode(std::string const& data_mode) OGS_FATAL( "Unsupported vtk output file data mode '{:s}'. Expected Ascii, " "Binary, or Appended.", - data_mode.c_str()); + data_mode); } std::string constructFileName(std::string const& prefix, @@ -180,7 +180,7 @@ void Output::outputBulkMesh(OutputFile const& output_file, MeshLib::Mesh const& mesh, double const t) const { - DBUG("output to {:s}", output_file.path.c_str()); + DBUG("output to {:s}", output_file.path); process_data->pvd_file.addVTUFile(output_file.name, t); @@ -251,7 +251,7 @@ void Output::doOutputAlways(Process const& process, std::vector<MeshLib::Node*> const& nodes = mesh.getNodes(); DBUG("Found {:d} nodes for output at mesh '{:s}'.", nodes.size(), - mesh.getName().c_str()); + mesh.getName()); MeshLib::MeshSubset mesh_subset(mesh, nodes); std::vector<std::unique_ptr<NumLib::LocalToGlobalIndexMap>> @@ -291,7 +291,7 @@ void Output::doOutputAlways(Process const& process, _output_file_data_mode, _output_file_compression}; - DBUG("output to {:s}", output_file.path.c_str()); + DBUG("output to {:s}", output_file.path); makeOutput(output_file.path, mesh, output_file.compression, output_file.data_mode); @@ -377,7 +377,7 @@ void Output::doOutputNonlinearIteration(Process const& process, std::string const output_file_path = BaseLib::joinPaths(_output_directory, output_file_name); - DBUG("output iteration results to {:s}", output_file_path.c_str()); + DBUG("output iteration results to {:s}", output_file_path); INFO("[time] Output took {:g} s.", time_output.elapsed()); diff --git a/ProcessLib/Output/ProcessOutput.cpp b/ProcessLib/Output/ProcessOutput.cpp index db6b1d9936c69cc1a265f31de8b9d144811d8fd5..0c72b4cf5400d76d6285c9e4734327a7bc2853e0 100644 --- a/ProcessLib/Output/ProcessOutput.cpp +++ b/ProcessLib/Output/ProcessOutput.cpp @@ -37,7 +37,7 @@ static void addSecondaryVariableNodes( std::string const& output_name, MeshLib::Mesh& mesh) { - DBUG(" secondary variable {:s}", output_name.c_str()); + DBUG(" secondary variable {:s}", output_name); auto& nodal_values_mesh = *MeshLib::getOrCreateMeshProperty<double>( mesh, output_name, MeshLib::MeshItemType::Node, @@ -48,7 +48,7 @@ static void addSecondaryVariableNodes( OGS_FATAL( "Nodal property `{:s}' does not have the right number of " "components. Expected: {:d}, actual: {:d}", - output_name.c_str(), + output_name, mesh.getNumberOfNodes() * var.fcts.num_components, nodal_values_mesh.size()); } @@ -67,7 +67,7 @@ static void addSecondaryVariableNodes( OGS_FATAL( "Secondary variable `{:s}' did not evaluate to the right " "number of components. Expected: {:d}, actual: {:d}.", - var.name.c_str(), nodal_values_mesh.size(), global_vector_size); + var.name, nodal_values_mesh.size(), global_vector_size); } // Copy result @@ -87,7 +87,7 @@ static void addSecondaryVariableResiduals( return; } - DBUG(" secondary variable {:s} residual", output_name.c_str()); + DBUG(" secondary variable {:s} residual", output_name); auto const& property_name_res = output_name + "_residual"; auto& residuals_mesh = *MeshLib::getOrCreateMeshProperty<double>( @@ -100,7 +100,7 @@ static void addSecondaryVariableResiduals( "Cell property `{:s}' does not have the right number of " "components. " "Expected: {:d}, actual: {:d}", - property_name_res.c_str(), + property_name_res, mesh.getNumberOfElements() * var.fcts.num_components, residuals_mesh.size()); } @@ -119,7 +119,7 @@ static void addSecondaryVariableResiduals( OGS_FATAL( "The residual of secondary variable `{:s}' did not evaluate to the " "right number of components. Expected: {:d}, actual: {:d}.", - var.name.c_str(), residuals_mesh.size(), global_vector_size); + var.name, residuals_mesh.size(), global_vector_size); } // Copy result @@ -191,7 +191,7 @@ void processOutputData( already_output.insert(pv.getName()); - DBUG(" process variable {:s}", pv.getName().c_str()); + DBUG(" process variable {:s}", pv.getName()); auto const num_comp = pv.getNumberOfComponents(); auto& output_data = *MeshLib::getOrCreateMeshProperty<double>( @@ -249,7 +249,7 @@ void makeOutput(std::string const& file_name, MeshLib::Mesh const& mesh, bool const compress_output, int const data_mode) { // Write output file - DBUG("Writing output to '{:s}'.", file_name.c_str()); + DBUG("Writing output to '{:s}'.", file_name); MeshLib::IO::VtuInterface vtu_interface(&mesh, data_mode, compress_output); vtu_interface.writeToFile(file_name); } diff --git a/ProcessLib/Output/SecondaryVariable.cpp b/ProcessLib/Output/SecondaryVariable.cpp index a05fb733d94f8e862ee9fcccb268ac5deb984e59..932ce3ee81f21f4a7b46e02a905f002dba6d9c5f 100644 --- a/ProcessLib/Output/SecondaryVariable.cpp +++ b/ProcessLib/Output/SecondaryVariable.cpp @@ -35,7 +35,7 @@ void SecondaryVariableCollection::addSecondaryVariable( OGS_FATAL( "The secondary variable with internal name `{:s}' has already been " "set up.", - internal_name.c_str()); + internal_name); } } @@ -61,7 +61,7 @@ SecondaryVariable const& SecondaryVariableCollection::get( OGS_FATAL( "A secondary variable with external name '{:s}' has not been set " "up.", - external_name.c_str()); + external_name); } auto const& internal_name = it->second; @@ -72,7 +72,7 @@ SecondaryVariable const& SecondaryVariableCollection::get( OGS_FATAL( "A secondary variable with internal name '{:s}' has not been set " "up.", - internal_name.c_str()); + internal_name); } return it2->second; diff --git a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp index d73fd0a5fdba643465c087c837f31282f776bd89..0e65b84fe8cdfe394423e8ced80130ed7414e64e 100644 --- a/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp +++ b/ProcessLib/PhaseField/CreatePhaseFieldProcess.cpp @@ -79,27 +79,27 @@ std::unique_ptr<Process> createPhaseFieldProcess( } DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate phase field with process variable '{:s}'.", - variable_ph->getName().c_str()); + variable_ph->getName()); if (variable_ph->getNumberOfComponents() != 1) { OGS_FATAL( "Phasefield process variable '{:s}' is not a scalar variable but " "has " "{:d} components.", - variable_ph->getName().c_str(), + variable_ph->getName(), variable_ph->getNumberOfComponents()); } @@ -116,43 +116,42 @@ std::unique_ptr<Process> createPhaseFieldProcess( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__phasefield_parameters__residual_stiffness} "residual_stiffness", parameters, 1); - DBUG("Use '{:s}' as residual stiffness.", residual_stiffness.name.c_str()); + DBUG("Use '{:s}' as residual stiffness.", residual_stiffness.name); // Crack resistance auto& crack_resistance = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__phasefield_parameters__crack_resistance} "crack_resistance", parameters, 1); - DBUG("Use '{:s}' as crack resistance.", crack_resistance.name.c_str()); + DBUG("Use '{:s}' as crack resistance.", crack_resistance.name); // Crack length scale auto& crack_length_scale = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__phasefield_parameters__crack_length_scale} "crack_length_scale", parameters, 1); - DBUG("Use '{:s}' as crack length scale.", crack_length_scale.name.c_str()); + DBUG("Use '{:s}' as crack length scale.", crack_length_scale.name); // Kinetic coefficient auto& kinetic_coefficient = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__phasefield_parameters__kinetic_coefficient} "kinetic_coefficient", parameters, 1); - DBUG("Use '{:s}' as kinetic coefficient.", - kinetic_coefficient.name.c_str()); + DBUG("Use '{:s}' as kinetic coefficient.", kinetic_coefficient.name); // Solid density auto& solid_density = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__solid_density} "solid_density", parameters, 1); - DBUG("Use '{:s}' as solid density parameter.", solid_density.name.c_str()); + DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // History field auto& history_field = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__phasefield_parameters__history_field} "history_field", parameters, 1); - DBUG("Use '{:s}' as history field.", history_field.name.c_str()); + DBUG("Use '{:s}' as history field.", history_field.name); // Specific body force Eigen::Matrix<double, DisplacementDim, 1> specific_body_force; diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 025c073b408a0945038807e35a421ed7982aa10d..fa50813da21ab4fa3c1e8c234aeaa50d5dc60bbd 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -81,8 +81,7 @@ MeshLib::Mesh const& findMeshInConfig( return mesh->getName() == mesh_name; }, "Required mesh with name '" + mesh_name + "' not found."); - DBUG("Found mesh '{:s}' with id {:d}.", mesh.getName().c_str(), - mesh.getID()); + DBUG("Found mesh '{:s}' with id {:d}.", mesh.getName(), mesh.getID()); return mesh; } @@ -108,7 +107,7 @@ ProcessVariable::ProcessVariable( config.getConfigParameter<std::string>("initial_condition"), parameters, _n_components, &mesh)) { - DBUG("Constructing process variable {:s}", _name.c_str()); + DBUG("Constructing process variable {:s}", _name); if (_shapefunction_order < 1 || 2 < _shapefunction_order) { @@ -143,7 +142,7 @@ ProcessVariable::ProcessVariable( else { INFO("No boundary conditions for process variable '{:s}' found.", - _name.c_str()); + _name); } // Source terms @@ -172,8 +171,7 @@ ProcessVariable::ProcessVariable( } else { - INFO("No source terms for process variable '{:s}' found.", - _name.c_str()); + INFO("No source terms for process variable '{:s}' found.", _name); } } diff --git a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp index 80131807a3fd8975de51fb553df8d1d4f6da7374..8f5d99959e529b6b6229ecb3f38c1d42c64e9c25 100644 --- a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp @@ -91,7 +91,7 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__fluid_reference_density} "fluid_reference_density", parameters, 1, &mesh); DBUG("Use '{:s}' as fluid_reference_density parameter.", - fluid_reference_density.name.c_str()); + fluid_reference_density.name); // Parameter for the longitudinal solute dispersivity. auto const& molecular_diffusion_coefficient = ParameterLib::findParameter< @@ -100,7 +100,7 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__molecular_diffusion_coefficient} "molecular_diffusion_coefficient", parameters, 1, &mesh); DBUG("Use '{:s}' as molecular diffusion coefficient parameter.", - molecular_diffusion_coefficient.name.c_str()); + molecular_diffusion_coefficient.name); // Parameter for the longitudinal solute dispersivity. auto const& solute_dispersivity_longitudinal = ParameterLib::findParameter< @@ -109,7 +109,7 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__solute_dispersivity_longitudinal} "solute_dispersivity_longitudinal", parameters, 1, &mesh); DBUG("Use '{:s}' as longitudinal solute dispersivity parameter.", - solute_dispersivity_longitudinal.name.c_str()); + solute_dispersivity_longitudinal.name); // Parameter for the transverse solute dispersivity. auto const& solute_dispersivity_transverse = ParameterLib::findParameter< @@ -118,7 +118,7 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( //! \ogs_file_param_special{prj__processes__process__RichardsComponentTransport__solute_dispersivity_transverse} "solute_dispersivity_transverse", parameters, 1, &mesh); DBUG("Use '{:s}' as transverse solute dispersivity parameter.", - solute_dispersivity_transverse.name.c_str()); + solute_dispersivity_transverse.name); // Parameter for the retardation factor. auto const& retardation_factor = ParameterLib::findParameter<double>( diff --git a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp index fd29c02fff88f1c98b1e0fadee1e7407b1c3e319..e23dc2fa41d9877dc1201327f821901f1150197b 100644 --- a/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp +++ b/ProcessLib/RichardsMechanics/CreateRichardsMechanicsProcess.cpp @@ -110,26 +110,26 @@ std::unique_ptr<Process> createRichardsMechanicsProcess( } DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate pressure with process variable '{:s}'.", - variable_p->getName().c_str()); + variable_p->getName()); if (variable_p->getNumberOfComponents() != 1) { OGS_FATAL( "Pressure process variable '{:s}' is not a scalar variable but has " "{:d} components.", - variable_p->getName().c_str(), + variable_p->getName(), variable_p->getNumberOfComponents()); } diff --git a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp index 0c2fbc56f1095c3ea4f7c9e793e7cc8c0bf77d94..20023100d3879fa663812c57604eae395d41115c 100644 --- a/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp +++ b/ProcessLib/SmallDeformation/CreateSmallDeformationProcess.cpp @@ -51,7 +51,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( "process_variable"}); DBUG("Associate displacement with process variable '{:s}'.", - per_process_variables.back().get().getName().c_str()); + per_process_variables.back().get().getName()); if (per_process_variables.back().get().getNumberOfComponents() != DisplacementDim) @@ -59,7 +59,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - per_process_variables.back().get().getName().c_str(), + per_process_variables.back().get().getName(), per_process_variables.back().get().getNumberOfComponents(), DisplacementDim); } @@ -76,7 +76,7 @@ std::unique_ptr<Process> createSmallDeformationProcess( config, //! \ogs_file_param_special{prj__processes__process__SMALL_DEFORMATION__solid_density} "solid_density", parameters, 1, &mesh); - DBUG("Use '{:s}' as solid density parameter.", solid_density.name.c_str()); + DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // Specific body force Eigen::Matrix<double, DisplacementDim, 1> specific_body_force; diff --git a/ProcessLib/SmallDeformation/SmallDeformationFEM.h b/ProcessLib/SmallDeformation/SmallDeformationFEM.h index 187df453018f03db4710828297ebaaa57dbd94b0..68c47fb1b78fa491ebc20e2ada112cb14da8e6dd 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationFEM.h +++ b/ProcessLib/SmallDeformation/SmallDeformationFEM.h @@ -183,7 +183,7 @@ public: "Setting initial conditions for stress from integration " "point data and from a parameter '{:s}' is not possible " "simultaneously.", - _process_data.initial_stress->name.c_str()); + _process_data.initial_stress->name); } return setSigma(values); } diff --git a/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp b/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp index cf28cba0a1db39937e09c171c5114c4e9fe8df19..fdc8c47ba76ca04cdde7da48031840f043476371 100644 --- a/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp +++ b/ProcessLib/SmallDeformation/SmallDeformationProcess.cpp @@ -166,7 +166,7 @@ void SmallDeformationProcess<DisplacementDim>::initializeConcreteProcess( OGS_FATAL( "Different number of components in meta data ({:d}) than in " "the integration point field data for '{:s}': {:d}.", - ip_meta_data.n_components, name.c_str(), + ip_meta_data.n_components, name, mesh_property.getNumberOfComponents()); } diff --git a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp index 4c362b8d90ebf353e9aa89073d6993c5d3dce0ec..845286841027c125d6aee3e39cc9350c91701d3d 100644 --- a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp +++ b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.cpp @@ -51,7 +51,7 @@ std::unique_ptr<Process> createSmallDeformationNonlocalProcess( "process_variable"}); DBUG("Associate displacement with process variable '{:s}'.", - per_process_variables.back().get().getName().c_str()); + per_process_variables.back().get().getName()); if (per_process_variables.back().get().getNumberOfComponents() != DisplacementDim) @@ -59,7 +59,7 @@ std::unique_ptr<Process> createSmallDeformationNonlocalProcess( OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - per_process_variables.back().get().getName().c_str(), + per_process_variables.back().get().getName(), per_process_variables.back().get().getNumberOfComponents(), DisplacementDim); } @@ -76,7 +76,7 @@ std::unique_ptr<Process> createSmallDeformationNonlocalProcess( config, //! \ogs_file_param_special{prj__processes__process__SMALL_DEFORMATION_NONLOCAL__solid_density} "solid_density", parameters, 1, &mesh); - DBUG("Use '{:s}' as solid density parameter.", solid_density.name.c_str()); + DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // Specific body force Eigen::Matrix<double, DisplacementDim, 1> specific_body_force; diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp index fe0ebec10689b4267adc5c6d3efc5f17d56b8ee8..3695cb59872aabc8066cd6ac99037ad56528bda8 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp @@ -170,7 +170,7 @@ void SmallDeformationNonlocalProcess<DisplacementDim>:: "Different number of components in meta data ({:d}) than " "in " "the integration point field data for '{:s}': {:d}.", - ip_meta_data.n_components, name.c_str(), + ip_meta_data.n_components, name, mesh_property.getNumberOfComponents()); } diff --git a/ProcessLib/SourceTerms/CreateLineSourceTerm.cpp b/ProcessLib/SourceTerms/CreateLineSourceTerm.cpp index e616b93b79ace99d82f87679c68a9c36f0c02ac4..b452997f26bb091bbdcd1ccf81b8d54e13c25187 100644 --- a/ProcessLib/SourceTerms/CreateLineSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateLineSourceTerm.cpp @@ -38,8 +38,7 @@ std::unique_ptr<SourceTerm> createLineSourceTerm( auto& line_source_term = ParameterLib::findParameter<double>( line_source_term_parameter_name, parameters, 1, &source_term_mesh); - DBUG("Using '{:s}' as line source term parameter.", - line_source_term.name.c_str()); + DBUG("Using '{:s}' as line source term parameter.", line_source_term.name); return std::make_unique<LineSourceTerm>( bulk_mesh_dimension, source_term_mesh, std::move(source_term_dof_table), diff --git a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp index 8bcd02e2c6dd27d3822451abfa6a59ada6655200..64513e09ea69be8f2a735139fc42715e53a769d0 100644 --- a/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateNodalSourceTerm.cpp @@ -32,7 +32,7 @@ std::unique_ptr<SourceTerm> createNodalSourceTerm( //! \ogs_file_param{prj__process_variables__process_variable__source_terms__source_term__Nodal__parameter} auto const param_name = config.getConfigParameter<std::string>("parameter"); - DBUG("Using parameter {:s} as nodal source term.", param_name.c_str()); + DBUG("Using parameter {:s} as nodal source term.", param_name); auto& param = ParameterLib::findParameter<double>(param_name, parameters, 1, &st_mesh); diff --git a/ProcessLib/SourceTerms/CreateSourceTerm.cpp b/ProcessLib/SourceTerms/CreateSourceTerm.cpp index 0f0b3c5f48a0be3ec680105a00dff588428f0a7f..4337e30c8a010d926043e051747470365f61a106 100644 --- a/ProcessLib/SourceTerms/CreateSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateSourceTerm.cpp @@ -51,7 +51,7 @@ std::unique_ptr<SourceTerm> createSourceTerm( OGS_FATAL( "The required bulk node ids map does not exist in the " "source term mesh '{:s}'.", - source_term_mesh.getName().c_str()); + source_term_mesh.getName()); } std::vector<MeshLib::Node*> const& source_term_nodes = source_term_mesh.getNodes(); @@ -59,8 +59,8 @@ std::unique_ptr<SourceTerm> createSourceTerm( "Found {:d} nodes for source term at mesh '{:s}' for the variable {:d} " "and " "component {:d}", - source_term_nodes.size(), source_term_mesh.getName().c_str(), - variable_id, *config.component_id); + source_term_nodes.size(), source_term_mesh.getName(), variable_id, + *config.component_id); MeshLib::MeshSubset source_term_mesh_subset(source_term_mesh, source_term_nodes); @@ -121,6 +121,6 @@ std::unique_ptr<SourceTerm> createSourceTerm( #endif } - OGS_FATAL("Unknown source term type: `{:s}'.", type.c_str()); + OGS_FATAL("Unknown source term type: `{:s}'.", type); } } // namespace ProcessLib diff --git a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp index 127bf7c1ed40cea08516d5c7e9ad837aa2fc9d1a..a296515f8a381cad8820f3039f75d2f29417c52c 100644 --- a/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp +++ b/ProcessLib/SourceTerms/CreateVolumetricSourceTerm.cpp @@ -39,7 +39,7 @@ std::unique_ptr<SourceTerm> createVolumetricSourceTerm( &source_term_mesh); DBUG("Using '{:s}' as volumetric source term parameter.", - volumetric_source_term.name.c_str()); + volumetric_source_term.name); return std::make_unique<VolumetricSourceTerm>( source_term_mesh, std::move(source_term_dof_table), integration_order, diff --git a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp index c5dc819bac6d1279c0b474fe04bfab2b3c62fe71..d5fee39f86a993b48bc237ff51060fcb0540ed19 100644 --- a/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp +++ b/ProcessLib/SourceTerms/Python/CreatePythonSourceTerm.cpp @@ -47,7 +47,7 @@ std::unique_ptr<SourceTerm> createPythonSourceTerm( "Function `{:s}' is not defined in the python script file, or " "there " "was no python script file specified.", - source_term_object.c_str()); + source_term_object); } auto* source_term = scope[source_term_object.c_str()] diff --git a/ProcessLib/SurfaceFlux/SurfaceFluxData.h b/ProcessLib/SurfaceFlux/SurfaceFluxData.h index d103e7a7e0eda75d56ebd251b6214d1414333079..2acaf64460c0d037f6303dafd84f518097ae22ae 100644 --- a/ProcessLib/SurfaceFlux/SurfaceFluxData.h +++ b/ProcessLib/SurfaceFlux/SurfaceFluxData.h @@ -45,8 +45,7 @@ struct SurfaceFluxData "read surfaceflux meta data:\n\tsurfaceflux " "mesh:'{:s}'\n\tproperty " "name: '{:s}'\n\toutput to: '{:s}'", - mesh_name.c_str(), property_vector_name.c_str(), - output_mesh_file_name.c_str()); + mesh_name, property_vector_name, output_mesh_file_name); } static std::unique_ptr<ProcessLib::SurfaceFluxData> createSurfaceFluxData( diff --git a/ProcessLib/TES/TESLocalAssemblerInner-impl.h b/ProcessLib/TES/TESLocalAssemblerInner-impl.h index 57e09e391faaa030f85718a05d93921282764e24..175d3ef53d403a80fc0848daa2307450a5530980 100644 --- a/ProcessLib/TES/TESLocalAssemblerInner-impl.h +++ b/ProcessLib/TES/TESLocalAssemblerInner-impl.h @@ -13,7 +13,6 @@ #pragma once -#include "BaseLib/Logging.h" #include "NumLib/Function/Interpolation.h" diff --git a/ProcessLib/TES/TESProcess.cpp b/ProcessLib/TES/TESProcess.cpp index 191f8593bd9e2085ad2ff52bd736948198c99e6b..004e492c4aa1277db7b41b972b046169d32d28e7 100644 --- a/ProcessLib/TES/TESProcess.cpp +++ b/ProcessLib/TES/TESProcess.cpp @@ -65,8 +65,7 @@ TESProcess::TESProcess( //! \ogs_file_special config.getConfigParameterOptional<double>(p.first)) { - DBUG("setting parameter `{:s}' to value `{:g}'", - p.first.c_str(), *par); + DBUG("setting parameter `{:s}' to value `{:g}'", p.first, *par); *p.second = *par; } } @@ -88,8 +87,7 @@ TESProcess::TESProcess( //! \ogs_file_special config.getConfigParameterOptional<double>(p.first)) { - INFO("setting parameter `{:s}' to value `{:g}'", - p.first.c_str(), *par); + INFO("setting parameter `{:s}' to value `{:g}'", p.first, *par); *p.second = Trafo{*par}; } } diff --git a/ProcessLib/TES/TESReactionAdaptor.cpp b/ProcessLib/TES/TESReactionAdaptor.cpp index 94c3ac4651aacee33948e63e5a226cde9429cd1f..538822800eb1f1dd9940f74dc05c17afd7e88819 100644 --- a/ProcessLib/TES/TESReactionAdaptor.cpp +++ b/ProcessLib/TES/TESReactionAdaptor.cpp @@ -10,7 +10,6 @@ #include <cassert> -#include "BaseLib/Logging.h" #include "MathLib/Nonlinear/Root1D.h" #include "MathLib/ODE/ODESolverBuilder.h" diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp index 8dc554241a71365df7cefef9ac2016bb84d316d0..dd4ab5768e576a25ad9f1c7154162e98f4f67a54 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CreateThermalTwoPhaseFlowWithPPProcess.cpp @@ -89,7 +89,7 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( config, //! \ogs_file_param_special{prj__processes__process__TWOPHASE_FLOW_THERMAL__density_solid} "density_solid", parameters, 1, &mesh); - DBUG("Use '{:s}' as density_solid parameter.", density_solid.name.c_str()); + DBUG("Use '{:s}' as density_solid parameter.", density_solid.name); // Parameter for the latent heat of evaporation. auto& latent_heat_evaporation = ParameterLib::findParameter<double>( @@ -97,7 +97,7 @@ std::unique_ptr<Process> createThermalTwoPhaseFlowWithPPProcess( //! \ogs_file_param_special{prj__processes__process__TWOPHASE_FLOW_THERMAL__latent_heat_evaporation} "latent_heat_evaporation", parameters, 1, &mesh); DBUG("Use '{:s}' as latent_heat_evaporation parameter.", - latent_heat_evaporation.name.c_str()); + latent_heat_evaporation.name); //! \ogs_file_param{prj__processes__process__TWOPHASE_FLOW_THERMAL__material_property} auto const& mat_config = config.getConfigSubtree("material_property"); diff --git a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp index e6ff892c8f08ea122a4b7f14405c6c7c19f7a0d0..fafa042aa772bf9aa99a2e8357784b3bf6ea5ea9 100644 --- a/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/CreateThermoHydroMechanicsProcess.cpp @@ -90,37 +90,37 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( } DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate pressure with process variable '{:s}'.", - variable_p->getName().c_str()); + variable_p->getName()); if (variable_p->getNumberOfComponents() != 1) { OGS_FATAL( "Pressure process variable '{:s}' is not a scalar variable but has " "{:d} components.", - variable_p->getName().c_str(), + variable_p->getName(), variable_p->getNumberOfComponents()); } DBUG("Associate temperature with process variable '{:s}'.", - variable_T->getName().c_str()); + variable_T->getName()); if (variable_T->getNumberOfComponents() != 1) { OGS_FATAL( "temperature process variable '{:s}' is not a scalar variable but " "has {:d} components.", - variable_T->getName().c_str(), + variable_T->getName(), variable_T->getNumberOfComponents()); } @@ -134,7 +134,7 @@ std::unique_ptr<Process> createThermoHydroMechanicsProcess( //! \ogs_file_param_special{prj__processes__process__THERMO_HYDRO_MECHANICS__reference_temperature} "reference_temperature", parameters, 1, &mesh); DBUG("Use '{:s}' as reference temperature parameter.", - reference_temperature.name.c_str()); + reference_temperature.name); // Specific body force Eigen::Matrix<double, DisplacementDim, 1> specific_body_force; diff --git a/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp b/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp index ecde722f9678187fb73a90ae82b85acdda5871d1..ffbf2bd55554fca1d74548df814a3569132766d7 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp +++ b/ProcessLib/ThermoMechanicalPhaseField/CreateThermoMechanicalPhaseFieldProcess.cpp @@ -79,39 +79,39 @@ std::unique_ptr<Process> createThermoMechanicalPhaseFieldProcess( &process_variables[process_variables.size() - 1][0].get(); DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate phase field with process variable '{:s}'.", - variable_ph->getName().c_str()); + variable_ph->getName()); if (variable_ph->getNumberOfComponents() != 1) { OGS_FATAL( "Phasefield process variable '{:s}' is not a scalar variable but " "has " "{:d} components.", - variable_ph->getName().c_str(), + variable_ph->getName(), variable_ph->getNumberOfComponents()); } DBUG("Associate temperature with process variable '{:s}'.", - variable_T->getName().c_str()); + variable_T->getName()); if (variable_T->getNumberOfComponents() != 1) { OGS_FATAL( "Temperature process variable '{:s}' is not a scalar variable but " "has " "{:d} components.", - variable_T->getName().c_str(), + variable_T->getName(), variable_T->getNumberOfComponents()); } @@ -132,36 +132,35 @@ std::unique_ptr<Process> createThermoMechanicalPhaseFieldProcess( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__phasefield_parameters__residual_stiffness} "residual_stiffness", parameters, 1, &mesh); - DBUG("Use '{:s}' as residual stiffness.", residual_stiffness.name.c_str()); + DBUG("Use '{:s}' as residual stiffness.", residual_stiffness.name); // Crack resistance auto& crack_resistance = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__phasefield_parameters__crack_resistance} "crack_resistance", parameters, 1, &mesh); - DBUG("Use '{:s}' as crack resistance.", crack_resistance.name.c_str()); + DBUG("Use '{:s}' as crack resistance.", crack_resistance.name); // Crack length scale auto& crack_length_scale = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__phasefield_parameters__crack_length_scale} "crack_length_scale", parameters, 1, &mesh); - DBUG("Use '{:s}' as crack length scale.", crack_length_scale.name.c_str()); + DBUG("Use '{:s}' as crack length scale.", crack_length_scale.name); // Kinetic coefficient auto& kinetic_coefficient = ParameterLib::findParameter<double>( phasefield_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__phasefield_parameters__kinetic_coefficient} "kinetic_coefficient", parameters, 1, &mesh); - DBUG("Use '{:s}' as kinetic coefficient.", - kinetic_coefficient.name.c_str()); + DBUG("Use '{:s}' as kinetic coefficient.", kinetic_coefficient.name); // Solid density auto& solid_density = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__reference_solid_density} "solid_density", parameters, 1, &mesh); - DBUG("Use '{:s}' as solid density parameter.", solid_density.name.c_str()); + DBUG("Use '{:s}' as solid density parameter.", solid_density.name); // Linear thermal expansion coefficient auto& linear_thermal_expansion_coefficient = ParameterLib::findParameter< @@ -170,15 +169,14 @@ std::unique_ptr<Process> createThermoMechanicalPhaseFieldProcess( //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__linear_thermal_expansion_coefficient} "linear_thermal_expansion_coefficient", parameters, 1, &mesh); DBUG("Use '{:s}' as linear thermal expansion coefficient.", - linear_thermal_expansion_coefficient.name.c_str()); + linear_thermal_expansion_coefficient.name); // Specific heat capacity auto& specific_heat_capacity = ParameterLib::findParameter<double>( thermal_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__specific_heat_capacity} "specific_heat_capacity", parameters, 1, &mesh); - DBUG("Use '{:s}' as specific heat capacity.", - specific_heat_capacity.name.c_str()); + DBUG("Use '{:s}' as specific heat capacity.", specific_heat_capacity.name); // Thermal conductivity auto& thermal_conductivity = ParameterLib::findParameter<double>( @@ -186,14 +184,14 @@ std::unique_ptr<Process> createThermoMechanicalPhaseFieldProcess( //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__thermal_conductivity} "thermal_conductivity", parameters, 1, &mesh); DBUG("Use '{:s}' as thermal conductivity parameter.", - thermal_conductivity.name.c_str()); + thermal_conductivity.name); // Residual thermal conductivity auto& residual_thermal_conductivity = ParameterLib::findParameter<double>( thermal_parameters_config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__thermal_parameters__residual_thermal_conductivity} "residual_thermal_conductivity", parameters, 1, &mesh); DBUG("Use '{:s}' as residual thermal conductivity parameter.", - residual_thermal_conductivity.name.c_str()); + residual_thermal_conductivity.name); // Reference temperature const auto reference_temperature = //! \ogs_file_param{prj__processes__process__THERMO_MECHANICAL_PHASE_FIELD__reference_temperature} diff --git a/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp index d870ca24a02b977e4f4d40f5f19060a086735f0d..5d6e41799f4415c757d2d87d1130c17684e10173 100644 --- a/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp +++ b/ProcessLib/ThermoMechanics/CreateThermoMechanicsProcess.cpp @@ -89,26 +89,26 @@ std::unique_ptr<Process> createThermoMechanicsProcess( } DBUG("Associate displacement with process variable '{:s}'.", - variable_u->getName().c_str()); + variable_u->getName()); if (variable_u->getNumberOfComponents() != DisplacementDim) { OGS_FATAL( "Number of components of the process variable '{:s}' is different " "from the displacement dimension: got {:d}, expected {:d}", - variable_u->getName().c_str(), + variable_u->getName(), variable_u->getNumberOfComponents(), DisplacementDim); } DBUG("Associate temperature with process variable '{:s}'.", - variable_T->getName().c_str()); + variable_T->getName()); if (variable_T->getNumberOfComponents() != 1) { OGS_FATAL( "Pressure process variable '{:s}' is not a scalar variable but has " "{:d} components.", - variable_T->getName().c_str(), + variable_T->getName(), variable_T->getNumberOfComponents()); } @@ -124,7 +124,7 @@ std::unique_ptr<Process> createThermoMechanicsProcess( //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICS__reference_solid_density} "reference_solid_density", parameters, 1, &mesh); DBUG("Use '{:s}' as solid density parameter.", - reference_solid_density.name.c_str()); + reference_solid_density.name); // Linear thermal expansion coefficient auto& linear_thermal_expansion_coefficient = ParameterLib::findParameter< @@ -133,21 +133,21 @@ std::unique_ptr<Process> createThermoMechanicsProcess( //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICS__linear_thermal_expansion_coefficient} "linear_thermal_expansion_coefficient", parameters, 1, &mesh); DBUG("Use '{:s}' as linear thermal expansion coefficient.", - linear_thermal_expansion_coefficient.name.c_str()); + linear_thermal_expansion_coefficient.name); // Specific heat capacity auto& specific_heat_capacity = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICS__specific_heat_capacity} "specific_heat_capacity", parameters, 1, &mesh); DBUG("Use '{:s}' as specific heat capacity parameter.", - specific_heat_capacity.name.c_str()); + specific_heat_capacity.name); // Thermal conductivity // TODO To be changed as tensor input. auto& thermal_conductivity = ParameterLib::findParameter<double>( config, //! \ogs_file_param_special{prj__processes__process__THERMO_MECHANICS__thermal_conductivity} "thermal_conductivity", parameters, 1, &mesh); DBUG("Use '{:s}' as thermal conductivity parameter.", - thermal_conductivity.name.c_str()); + thermal_conductivity.name); // Specific body force Eigen::Matrix<double, DisplacementDim, 1> specific_body_force; diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp index ec56734caed55a2b9ba9fe15376bbea237cf1ed3..caa44c0aa5b67ebe59c05a6e04ec83358c514083 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp @@ -232,7 +232,7 @@ void ThermoMechanicsProcess<DisplacementDim>::initializeConcreteProcess( OGS_FATAL( "Different number of components in meta data ({:d}) than in " "the integration point field data for '{:s}': {:d}.", - ip_meta_data.n_components, name.c_str(), + ip_meta_data.n_components, name, mesh_property.getNumberOfComponents()); } diff --git a/ProcessLib/TimeLoop.h b/ProcessLib/TimeLoop.h index 792a7507abd8e57257312bb765103ff6965d6dc3..c97f2297552fc162960943a2d922c508a1e0cd53 100644 --- a/ProcessLib/TimeLoop.h +++ b/ProcessLib/TimeLoop.h @@ -13,7 +13,6 @@ #include <functional> #include <memory> -#include "BaseLib/Logging.h" #include "NumLib/ODESolver/NonlinearSolver.h" #include "NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h" diff --git a/ProcessLib/Utils/ProcessUtils.cpp b/ProcessLib/Utils/ProcessUtils.cpp index 86a3d2009ceee45bcc50c11daf085361f9744d93..932cf231ab043df4db9b00de12f99d7f6acc3a03 100644 --- a/ProcessLib/Utils/ProcessUtils.cpp +++ b/ProcessLib/Utils/ProcessUtils.cpp @@ -31,10 +31,10 @@ ProcessLib::ProcessVariable& findVariableByName( "There is no entry of the defined process variable '{:s}' in the " "provided variables list (see tag <process_variables>). A " "definition is required for config tag <{:s}>.", - name.c_str(), tag.c_str()); + name, tag); } DBUG("Found process variable '{:s}' for config tag <{:s}>.", - variable->getName().c_str(), tag.c_str()); + variable->getName(), tag); // Const cast is needed because of variables argument constness. return const_cast<ProcessLib::ProcessVariable&>(*variable); @@ -86,7 +86,7 @@ std::vector<std::reference_wrapper<ProcessVariable>> findProcessVariables( if (var_names.empty()) { - OGS_FATAL("No entity is found with config tag <{:s}>.", tag.c_str()); + OGS_FATAL("No entity is found with config tag <{:s}>.", tag); } std::vector<std::string> cached_var_names; @@ -102,7 +102,7 @@ std::vector<std::reference_wrapper<ProcessVariable>> findProcessVariables( if (cached_var_names.size() != var_names.size()) { - OGS_FATAL("Found duplicates with config tag <{:s}>.", tag.c_str()); + OGS_FATAL("Found duplicates with config tag <{:s}>.", tag); } return vars; diff --git a/Tests/BaseLib/TestConfigTree.cpp b/Tests/BaseLib/TestConfigTree.cpp index 4d5dbc15811af292a86f93bc422b35425ff344ba..ff5568b9a97df4e8a76f888638effc9b2b9364fc 100644 --- a/Tests/BaseLib/TestConfigTree.cpp +++ b/Tests/BaseLib/TestConfigTree.cpp @@ -44,7 +44,7 @@ public: // move construction/assignment EXPECT_EQ("FILENAME", filename); - DBUG("error <{:s}> : {:s}", path.c_str(), message.c_str()); + DBUG("error <{:s}> : {:s}", path, message); _error = true; throw Exc(); // throw in order to stop normal execution }; @@ -62,7 +62,7 @@ public: // move construction/assignment EXPECT_EQ("FILENAME", filename); - DBUG("warning <{:s}> : {:s}", path.c_str(), message.c_str()); + DBUG("warning <{:s}> : {:s}", path, message); _warning = true; }; } diff --git a/Tests/NumLib/TestComponentNorms.cpp b/Tests/NumLib/TestComponentNorms.cpp index 5395ba7d19d56b32e20db323831750a78dd99c77..44756f61cc31ee8b5d2258836f89aa19b533dc8b 100644 --- a/Tests/NumLib/TestComponentNorms.cpp +++ b/Tests/NumLib/TestComponentNorms.cpp @@ -129,7 +129,7 @@ TEST(MPITest_NumLib, ComponentNormSingleComponent) using VNT = MathLib::VecNormType; for (auto norm_type : {VNT::NORM1, VNT::NORM2, VNT::INFINITY_N}) { DBUG("norm type: {:s}.", - MathLib::convertVecNormTypeToString(norm_type).c_str()); + MathLib::convertVecNormTypeToString(norm_type)); do_test(num_components, norm_type, tolerance, [](double /*n_total*/, double n) { return n; }, [](double n_total) { return n_total; }); diff --git a/Tests/NumLib/TestTimeSteppingEvolutionaryPIDcontroller.cpp b/Tests/NumLib/TestTimeSteppingEvolutionaryPIDcontroller.cpp index 7d03e7fed91a05681d3a0df9ca041b042fc6a491..74d297a3c4b828944a86263357448373272e8f9e 100644 --- a/Tests/NumLib/TestTimeSteppingEvolutionaryPIDcontroller.cpp +++ b/Tests/NumLib/TestTimeSteppingEvolutionaryPIDcontroller.cpp @@ -14,7 +14,6 @@ #include <memory> #include <vector> -#include "BaseLib/Logging.h" #include "BaseLib/ConfigTree.h" diff --git a/Tests/NumLib/TestTimeSteppingFixed.cpp b/Tests/NumLib/TestTimeSteppingFixed.cpp index 20e4be4e51a00b306190e0fcb2f6d095108df3ee..2ce7a7e15469d19c175b5ebbdb6153efa9b98f8d 100644 --- a/Tests/NumLib/TestTimeSteppingFixed.cpp +++ b/Tests/NumLib/TestTimeSteppingFixed.cpp @@ -13,7 +13,6 @@ #include <vector> -#include "BaseLib/Logging.h" #include "NumLib/TimeStepping/Algorithms/FixedTimeStepping.h" #include "NumLib/TimeStepping/TimeStep.h" diff --git a/Tests/NumLib/TestTimeSteppingIterationNumber.cpp b/Tests/NumLib/TestTimeSteppingIterationNumber.cpp index d64a4cee3420554e1b7c63eb7495ffb83cee351f..852f7a4d6d5bab2a9855107f45ad855ad12e6699 100644 --- a/Tests/NumLib/TestTimeSteppingIterationNumber.cpp +++ b/Tests/NumLib/TestTimeSteppingIterationNumber.cpp @@ -14,7 +14,6 @@ #include <utility> #include <vector> -#include "BaseLib/Logging.h" #include "NumLib/TimeStepping/TimeStep.h" #include "NumLib/TimeStepping/Algorithms/IterationNumberBasedTimeStepping.h"