diff --git a/Applications/FileIO/GMSInterface.cpp b/Applications/FileIO/GMSInterface.cpp index 032dce2872af0d58ea89301ee5fd97f786488267..71cab4a8c2e76a44a53cc72d6ca31fb0b269f2f5 100644 --- a/Applications/FileIO/GMSInterface.cpp +++ b/Applications/FileIO/GMSInterface.cpp @@ -90,10 +90,12 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes, depth = pnt[2]; } else + { WARN( "GMSInterface::readBoreholeFromGMS(): Skipped layer " "'{:s}' in borehole '{:s}' because of thickness 0.0.", sName, cName); + } } else // add new borehole { @@ -317,8 +319,10 @@ MeshLib::Mesh* GMSInterface::readGMS3DMMesh(const std::string& filename) std::back_inserter(*opt_pv)); } else + { ERR("Ignoring Material IDs information (does not match number of " "elements)."); + } return new MeshLib::Mesh(mesh_name, nodes, elements, properties); } diff --git a/Applications/FileIO/GocadIO/CoordinateSystem.cpp b/Applications/FileIO/GocadIO/CoordinateSystem.cpp index 05e874daec8037a53b837a6a72c2ef2427a5673e..16a9899d7168391df4933ceaf18a5c69ec11e925 100644 --- a/Applications/FileIO/GocadIO/CoordinateSystem.cpp +++ b/Applications/FileIO/GocadIO/CoordinateSystem.cpp @@ -100,8 +100,10 @@ bool CoordinateSystem::parse(std::istream& in) return true; } else + { WARN("CoordinateSystem::parse() - Unknown keyword found: {:s}", line); + } } ERR ("Error: Unexpected end of file."); return false; diff --git a/Applications/FileIO/GocadIO/GocadSGridReader.cpp b/Applications/FileIO/GocadIO/GocadSGridReader.cpp index 9b5d4f5f12e1c3d9be11537a8bba4bd92f748847..ca4c954b6052b587fcf36ed73b66d32959e477a3 100644 --- a/Applications/FileIO/GocadIO/GocadSGridReader.cpp +++ b/Applications/FileIO/GocadIO/GocadSGridReader.cpp @@ -346,11 +346,17 @@ void GocadSGridReader::parseFaceSet(std::string& line, std::istream& in) std::array<std::size_t, 3> const c( _index_calculator.getCoordsForID(id)); if (c[0] >= _index_calculator._x_dim - 1) + { ERR("****** i coord {:d} to big for id {:d}.", c[0], id); + } if (c[1] >= _index_calculator._y_dim - 1) + { ERR("****** j coord {:d} to big for id {:d}.", c[1], id); + } if (c[2] >= _index_calculator._z_dim - 1) + { ERR("****** k coord {:d} to big for id {:d}.", c[2], id); + } std::size_t const cell_id( _index_calculator.getCellIdx(c[0], c[1], c[2])); face_set_property._property_data[cell_id] = @@ -435,9 +441,11 @@ void GocadSGridReader::readNodesBinary() k++; } if (k != n * 3 && !in.eof()) + { ERR("Read different number of points. Expected {:d} floats, got " "{:d}.\n", n * 3, k); + } } void GocadSGridReader::mapRegionFlagsToCellProperties( @@ -540,9 +548,10 @@ std::vector<Bitset> GocadSGridReader::readRegionFlagsBinary() const result[k++] = readBits(in, regions.size()); } if (k != n && !in.eof()) + { ERR("Read different number of values. Expected {:d}, got {:d}.\n", n, k); - + } return result; } std::vector<MeshLib::Element*> GocadSGridReader::createElements( diff --git a/Applications/FileIO/Legacy/OGSIOVer4.cpp b/Applications/FileIO/Legacy/OGSIOVer4.cpp index bc7fa4b6b0e89377654dc4a590d79ac90100ddaf..d2db8d291d5b7afb0a375818bf3d77b7b080497f 100644 --- a/Applications/FileIO/Legacy/OGSIOVer4.cpp +++ b/Applications/FileIO/Legacy/OGSIOVer4.cpp @@ -101,10 +101,12 @@ std::string readPoints(std::istream &in, std::vector<GeoLib::Point*>* pnt_vec, std::size_t id_pos (line.find("$ID")); if (id_pos != std::string::npos) + { WARN( "readPoints(): found tag $ID - please use tag $NAME for " "reading point names in point {:d}.", cnt); + } cnt++; } getline(in, line); @@ -541,7 +543,9 @@ bool readGLIFileV4(const std::string& fname, ply_vec->size()); } else + { INFO("GeoLib::readGLIFile(): tag #POLYLINE not found."); + } if (!ply_vec->empty()) { diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp index 8368168e46a6526b779f38a9202b84bbead44001..4e4c2ee81fdc60339949bdc36a8878fb05c07811 100644 --- a/Applications/FileIO/Legacy/createSurface.cpp +++ b/Applications/FileIO/Legacy/createSurface.cpp @@ -106,7 +106,9 @@ bool createSurface(GeoLib::Polyline const& ply, return false; } if (!(fs::remove(geo_file) && fs::remove(msh_file))) + { WARN("Could not remove temporary files in createSurface."); + } // convert the surface mesh into a geometric surface if (!MeshLib::convertMeshToGeo(*surface_mesh, geometries, diff --git a/Applications/FileIO/PetrelInterface.cpp b/Applications/FileIO/PetrelInterface.cpp index a4bc66044f4254e4d29569829dd995016be0e864..2198c58e64fdcf5e1a6807887c7936dcd3336efd 100644 --- a/Applications/FileIO/PetrelInterface.cpp +++ b/Applications/FileIO/PetrelInterface.cpp @@ -45,10 +45,12 @@ PetrelInterface::PetrelInterface(std::list<std::string> &sfc_fnames, in.close(); } else + { WARN( "PetrelInterface::PetrelInterface(): \tCould not open file " "{:s}.", it->c_str()); + } } for (std::list<std::string>::const_iterator it(well_path_fnames.begin()); it @@ -63,10 +65,12 @@ PetrelInterface::PetrelInterface(std::list<std::string> &sfc_fnames, in.close(); } else + { WARN( "PetrelInterface::PetrelInterface(): \tCould not open well " "path file {:s}.", it->c_str()); + } } // store data in GEOObject @@ -124,11 +128,14 @@ void PetrelInterface::readPetrelSurface(std::istream &in) idx++; } } - } else + } + else + { WARN( "PetrelInterface::readPetrelSurface(): problem reading petrel " "points from line\n'{:s}'.", line); + } } void PetrelInterface::readPetrelWellTrace(std::istream &in) diff --git a/Applications/FileIO/TetGenInterface.cpp b/Applications/FileIO/TetGenInterface.cpp index c117f81b0f9f54ac9abf160ef1a1ce62cbb6a44d..d138aae57fecb8be7761a41ec978da79b3bcd9cd 100644 --- a/Applications/FileIO/TetGenInterface.cpp +++ b/Applications/FileIO/TetGenInterface.cpp @@ -215,11 +215,15 @@ MeshLib::Mesh* TetGenInterface::readTetGenMesh (std::string const& nodes_fname, if (!ins_nodes || !ins_ele) { if (!ins_nodes) + { ERR("TetGenInterface::readTetGenMesh failed to open {:s}", nodes_fname); + } if (!ins_ele) + { ERR("TetGenInterface::readTetGenMesh failed to open {:s}", ele_fname); + } return nullptr; } @@ -591,8 +595,10 @@ bool TetGenInterface::writeTetGenSmesh(const std::string &file_name, return false; } if (surfaces==nullptr) + { WARN("No surfaces found for geometry {:s}. Writing points only.", geo_name); + } std::ofstream out( file_name.c_str(), std::ios::out ); out.precision(std::numeric_limits<double>::digits10);