From 0d5188c7f5905feb9a5cd3ef9a598c35cf79214e Mon Sep 17 00:00:00 2001 From: Dmitrij Naumov <dmitrij@naumov.de> Date: Fri, 24 Aug 2018 23:13:34 +0200 Subject: [PATCH] [App/U] Unify command line version info output. Now includes the copyright message and the version info with git hash. --- .../Utils/FileConverter/ConvertSHPToGLI.cpp | 13 ++++++-- .../Utils/FileConverter/FEFLOW2OGS.cpp | 12 ++++++- Applications/Utils/FileConverter/GMSH2OGS.cpp | 12 ++++++- Applications/Utils/FileConverter/OGS2VTK.cpp | 11 +++++-- Applications/Utils/FileConverter/TIN2VTK.cpp | 9 +++++- .../Utils/FileConverter/TecPlotTools.cpp | 9 +++++- Applications/Utils/FileConverter/VTK2OGS.cpp | 14 ++++++--- Applications/Utils/FileConverter/VTK2TIN.cpp | 9 +++++- .../Utils/FileConverter/convertGEO.cpp | 13 ++++++-- .../generateMatPropsFromMatID.cpp | 12 +++++-- Applications/Utils/GeoTools/MoveGeometry.cpp | 15 ++++++--- .../Utils/GeoTools/TriangulatePolyline.cpp | 9 +++++- Applications/Utils/MeshEdit/AddTopLayer.cpp | 16 +++++----- ...CreateBoundaryConditionsAlongPolylines.cpp | 13 ++++++-- .../Utils/MeshEdit/ExtractSurface.cpp | 12 +++++-- .../MeshEdit/MapGeometryToMeshSurface.cpp | 24 ++++++++------ Applications/Utils/MeshEdit/MoveMesh.cpp | 26 ++++++++++------ .../Utils/MeshEdit/NodeReordering.cpp | 24 ++++++++------ .../ResetPropertiesInPolygonalRegion.cpp | 27 +++++++++------- .../Utils/MeshEdit/UnityPreprocessing.cpp | 31 ++++++++++--------- .../MeshEdit/appendLinesAlongPolyline.cpp | 10 +++++- Applications/Utils/MeshEdit/checkMesh.cpp | 9 +++++- .../Utils/MeshEdit/convertToLinearMesh.cpp | 9 +++++- .../MeshEdit/createLayeredMeshFromRasters.cpp | 12 ++++--- .../Utils/MeshEdit/createQuadraticMesh.cpp | 10 +++++- .../Utils/MeshEdit/editMaterialID.cpp | 13 ++++++-- Applications/Utils/MeshEdit/moveMeshNodes.cpp | 7 ++--- Applications/Utils/MeshEdit/queryMesh.cpp | 9 +++++- .../Utils/MeshEdit/removeMeshElements.cpp | 21 ++++++++----- Applications/Utils/MeshEdit/reviseMesh.cpp | 9 +++++- .../Utils/MeshEdit/swapNodeCoordinateAxes.cpp | 9 +++++- ...ComputeSurfaceNodeIDsInPolygonalRegion.cpp | 27 +++++++++------- .../ConstructMeshesFromGeometry.cpp | 11 +++++-- .../ComputeNodeAreasFromSurfaceMesh.cpp | 17 ++++++---- .../PartitionMesh/PartitionMesh.cpp | 14 ++++++--- .../ModelPreparation/createNeumannBc.cpp | 14 ++++++--- .../Utils/ModelPreparation/scaleProperty.cpp | 13 +++++--- Applications/Utils/PostProcessing/postLIE.cpp | 14 ++++++--- .../Utils/SWMMConverter/SWMMConverter.cpp | 10 ++++-- .../createMeshElemPropertiesFromASCRaster.cpp | 28 ++++++++--------- .../generateStructuredMesh.cpp | 16 +++++----- 41 files changed, 407 insertions(+), 186 deletions(-) diff --git a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp index c9de7b391d6..18d5f26cb9e 100644 --- a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp +++ b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp @@ -22,10 +22,10 @@ #include <shapefil.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" +#include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "GeoLib/IO/XmlIO/Qt/XmlStnInterface.h" -#include "GeoLib/GEOObjects.h" #include "GeoLib/Point.h" #include "GeoLib/Station.h" @@ -134,7 +134,14 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts points contained in shape file", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Converts points contained in shape file\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> shapefile_arg("s", "shape-file", "the name of the shape file ", diff --git a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp index b95cb5f3f28..e737804a312 100644 --- a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp +++ b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp @@ -16,6 +16,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" #ifndef WIN32 @@ -34,7 +35,16 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converting a mesh in FEFLOW file format (ASCII, version 5.4) to a vtk unstructured grid file (new OGS file format) or to the old OGS file format - see options.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Converting a mesh in FEFLOW file format (ASCII, version 5.4) to a vtk " + "unstructured grid file (new OGS file format) or to the old OGS file " + "format - see options.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> ogs_mesh_arg( "o", diff --git a/Applications/Utils/FileConverter/GMSH2OGS.cpp b/Applications/Utils/FileConverter/GMSH2OGS.cpp index 0ba545fb940..85cc8d7e99d 100644 --- a/Applications/Utils/FileConverter/GMSH2OGS.cpp +++ b/Applications/Utils/FileConverter/GMSH2OGS.cpp @@ -22,6 +22,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" #ifndef WIN32 @@ -39,7 +40,16 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converting meshes in gmsh file format (ASCII, version 2.2) to a vtk unstructured grid file (new OGS file format) or to the old OGS file format - see options.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Converting meshes in gmsh file format (ASCII, version 2.2) to a vtk " + "unstructured grid file (new OGS file format) or to the old OGS file " + "format - see options.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> ogs_mesh_arg( "o", diff --git a/Applications/Utils/FileConverter/OGS2VTK.cpp b/Applications/Utils/FileConverter/OGS2VTK.cpp index 39431619f6d..e7ab19d1350 100644 --- a/Applications/Utils/FileConverter/OGS2VTK.cpp +++ b/Applications/Utils/FileConverter/OGS2VTK.cpp @@ -17,7 +17,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" @@ -26,7 +26,14 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts OGS mesh into VTK mesh.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Converts OGS mesh into VTK mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/FileConverter/TIN2VTK.cpp b/Applications/Utils/FileConverter/TIN2VTK.cpp index 7cfdc771920..d0885e80b90 100644 --- a/Applications/Utils/FileConverter/TIN2VTK.cpp +++ b/Applications/Utils/FileConverter/TIN2VTK.cpp @@ -36,7 +36,14 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts TIN file into VTU file.", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Converts TIN file into VTU file.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> inArg("i", "input-tin-file", "the name of the file containing the input TIN", true, "", "string"); diff --git a/Applications/Utils/FileConverter/TecPlotTools.cpp b/Applications/Utils/FileConverter/TecPlotTools.cpp index 2ebeae31b26..e0583076f3b 100644 --- a/Applications/Utils/FileConverter/TecPlotTools.cpp +++ b/Applications/Utils/FileConverter/TecPlotTools.cpp @@ -381,7 +381,14 @@ int main(int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("TecPlot Parser", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "TecPlot Parser\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> input_arg("i", "input-file", "TecPlot input file", true, "", "string"); cmd.add(input_arg); TCLAP::ValueArg<std::string> output_arg("o", "output-file", "output mesh file", false, "", "string"); diff --git a/Applications/Utils/FileConverter/VTK2OGS.cpp b/Applications/Utils/FileConverter/VTK2OGS.cpp index 2515217c6ee..2e79336e6c3 100644 --- a/Applications/Utils/FileConverter/VTK2OGS.cpp +++ b/Applications/Utils/FileConverter/VTK2OGS.cpp @@ -17,17 +17,23 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" - #include "MeshLib/Mesh.h" -#include "MeshLib/IO/Legacy/MeshIO.h" int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts VTK mesh into OGS mesh.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Converts VTK mesh into OGS mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/FileConverter/VTK2TIN.cpp b/Applications/Utils/FileConverter/VTK2TIN.cpp index 83aaff3cc6a..47394a4de59 100644 --- a/Applications/Utils/FileConverter/VTK2TIN.cpp +++ b/Applications/Utils/FileConverter/VTK2TIN.cpp @@ -37,7 +37,14 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts VTK mesh into TIN file.", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Converts VTK mesh into TIN file.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/FileConverter/convertGEO.cpp b/Applications/Utils/FileConverter/convertGEO.cpp index 2398852bfb4..a10cac57dcb 100644 --- a/Applications/Utils/FileConverter/convertGEO.cpp +++ b/Applications/Utils/FileConverter/convertGEO.cpp @@ -24,9 +24,16 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Converts OGS geometry file into another file format. " - "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) formats are supported.", - ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Converts OGS geometry file into another file format. " + "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) " + "formats are supported.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> argInputFileName("i", "input-file", "the name of the geometry file to be converted", true, "", "file name"); diff --git a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp index 10910e3e701..b8c312d408d 100644 --- a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp +++ b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp @@ -18,6 +18,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -31,9 +32,14 @@ int main (int argc, char* argv[]) ApplicationsLib::LogogSetup logog_setup; TCLAP::CmdLine cmd( - "Creates a new file for material properties and sets the material ids in the msh-file to 0", - ' ', - "0.1"); + "Creates a new file for material properties and sets the material ids " + "in the msh-file to 0\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_arg("m", "mesh", diff --git a/Applications/Utils/GeoTools/MoveGeometry.cpp b/Applications/Utils/GeoTools/MoveGeometry.cpp index 573ee813774..751290884f9 100644 --- a/Applications/Utils/GeoTools/MoveGeometry.cpp +++ b/Applications/Utils/GeoTools/MoveGeometry.cpp @@ -15,10 +15,9 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - -#include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" +#include "BaseLib/BuildInfo.h" #include "GeoLib/GEOObjects.h" - +#include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "MathLib/Vector3.h" #include <QCoreApplication> @@ -29,8 +28,14 @@ int main(int argc, char *argv[]) ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd - ("Moves the points of a geometry by a given displacement vector.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Moves the points of a geometry by a given displacement vector\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<double> z_arg ("z", "z", "displacement in z direction", false, 0.0, "z-displacement"); cmd.add(z_arg); diff --git a/Applications/Utils/GeoTools/TriangulatePolyline.cpp b/Applications/Utils/GeoTools/TriangulatePolyline.cpp index 46484850ee6..99cc3941cbe 100644 --- a/Applications/Utils/GeoTools/TriangulatePolyline.cpp +++ b/Applications/Utils/GeoTools/TriangulatePolyline.cpp @@ -42,7 +42,14 @@ int main(int argc, char *argv[]) ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Triangulates the specified polyline in the given geometry file.", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Triangulates the specified polyline in the given geometry file.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> input_arg("i", "input", "GML input file (*.gml)", true, "", "string"); TCLAP::ValueArg<std::string> output_arg("o", "output", "GML output file (*.gml)", true, "", "string"); TCLAP::ValueArg<std::string> name_arg("n", "name", "Name of polyline in given file", true, "", "string"); diff --git a/Applications/Utils/MeshEdit/AddTopLayer.cpp b/Applications/Utils/MeshEdit/AddTopLayer.cpp index c51074da408..d7fcf3d9958 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -14,12 +14,10 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" - #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" - #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/AddLayerToMesh.h" @@ -29,10 +27,14 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Adds a top layer to an existing mesh" - "The documentation is available at https://docs.opengeosys.org/docs/tools/meshing/addtoplayer ", - ' ', - "0.1"); - + "The documentation is available at " + "https://docs.opengeosys.org/docs/tools/meshing/addtoplayer.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_arg("i", "input-mesh-file", "the name of the file containing the mesh", true, "", "file name"); diff --git a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp index aa5150e9a9a..399296fe927 100644 --- a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp +++ b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp @@ -20,6 +20,7 @@ #include "Applications/FileIO/readGeometryFromFile.h" #include "Applications/FileIO/writeGeometryToFile.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -121,9 +122,15 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Creates boundary conditions for mesh nodes along polylines." - "The documentation is available at https://docs.opengeosys.org/docs/tools/model-preparation/create-boundary-conditions-along-a-polyline", - ' ', - "0.1"); + "The documentation is available at " + "https://docs.opengeosys.org/docs/tools/model-preparation/" + "create-boundary-conditions-along-a-polyline.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<bool> gml_arg("", "gml", "if switched on write found nodes to file in gml format", false, false, "bool"); cmd.add(gml_arg); diff --git a/Applications/Utils/MeshEdit/ExtractSurface.cpp b/Applications/Utils/MeshEdit/ExtractSurface.cpp index 189a6c1fcaa..3a0655f862a 100644 --- a/Applications/Utils/MeshEdit/ExtractSurface.cpp +++ b/Applications/Utils/MeshEdit/ExtractSurface.cpp @@ -17,8 +17,9 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/StringTools.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" +#include "BaseLib/StringTools.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -35,8 +36,13 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Tool extracts the surface of the given mesh. The documentation is " "available at " - "https://docs.opengeosys.org/docs/tools/meshing/extract-surface", - ' ', "0.1"); + "https://docs.opengeosys.org/docs/tools/meshing/extract-surface.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in( "i", "mesh-input-file", "the name of the file containing the input mesh", true, "", diff --git a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp index e6da673a6ad..9f01eca36ab 100644 --- a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp +++ b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp @@ -1,4 +1,3 @@ - /* * \date 2015-04-20 * \brief Map geometric objects to the surface of the given mesh. @@ -16,23 +15,28 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" - -#include "MeshLib/Mesh.h" -#include "MeshLib/IO/readMeshFromFile.h" - #include "MeshGeoToolsLib/GeoMapper.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/Mesh.h" int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Maps geometric objects to the surface of a given mesh." - "The documentation is available at https://docs.opengeosys.org/docs/tools/model-preparation/map-geometric-object-to-the-surface-of-a-mesh", - ' ', - "0.1"); + TCLAP::CmdLine cmd( + "Maps geometric objects to the surface of a given mesh." + "The documentation is available at " + "https://docs.opengeosys.org/docs/tools/model-preparation/" + "map-geometric-object-to-the-surface-of-a-mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("m", "mesh-file", "the name of the file containing the mesh", true, "", "file name"); diff --git a/Applications/Utils/MeshEdit/MoveMesh.cpp b/Applications/Utils/MeshEdit/MoveMesh.cpp index 57c2ada3cf8..98c66343660 100644 --- a/Applications/Utils/MeshEdit/MoveMesh.cpp +++ b/Applications/Utils/MeshEdit/MoveMesh.cpp @@ -13,25 +13,31 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - -#include "BaseLib/StringTools.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" - -#include "MeshLib/IO/readMeshFromFile.h" -#include "MeshLib/IO/writeMeshToFile.h" - +#include "BaseLib/StringTools.h" #include "GeoLib/AABB.h" - -#include "MeshLib/Node.h" #include "MeshLib/Elements/Element.h" -#include "MeshLib/MeshEditing/moveMeshNodes.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" +#include "MeshLib/MeshEditing/moveMeshNodes.h" +#include "MeshLib/Node.h" int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Moves the mesh nodes using the given displacement vector or if no displacement vector is given, moves the mesh nodes such that the centroid of the given mesh is in the origin.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Moves the mesh nodes using the given displacement vector or if no " + "displacement vector is given, moves the mesh nodes such that the " + "centroid of the given mesh is in the origin.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); // Define a value argument and add it to the command line. // A value arg defines a flag and a type of value that it expects, // such as "-m meshfile". diff --git a/Applications/Utils/MeshEdit/NodeReordering.cpp b/Applications/Utils/MeshEdit/NodeReordering.cpp index 39074ebafdb..3b491518996 100644 --- a/Applications/Utils/MeshEdit/NodeReordering.cpp +++ b/Applications/Utils/MeshEdit/NodeReordering.cpp @@ -17,14 +17,12 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - #include "BaseLib/Algorithm.h" - +#include "BaseLib/BuildInfo.h" +#include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" - #include "MeshLib/Mesh.h" -#include "MeshLib/Elements/Element.h" #include "MeshLib/Node.h" /// Re-ordering mesh elements to correct Data Explorer 5 meshes to work with Data Explorer 6. @@ -131,11 +129,19 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logo_setup; - TCLAP::CmdLine cmd("Reordering of mesh nodes to make OGS Data Explorer 5 meshes compatible with OGS6.\n" \ - "Method 1 is the re-ordering between DataExplorer 5 and DataExplorer 6 meshes,\n" \ - "Method 2 is the re-ordering with and without InSitu-Lib in OGS6.\n" \ - "Method 3 is the re-ordering of nonlinear nodes.", - ' ', "0.1"); + TCLAP::CmdLine cmd( + "Reordering of mesh nodes to make OGS Data Explorer 5 meshes " + "compatible with OGS6.\n" + "Method 1 is the re-ordering between DataExplorer 5 and DataExplorer 6 " + "meshes,\n" + "Method 2 is the re-ordering with and without InSitu-Lib in OGS6.\n" + "Method 3 is the re-ordering of nonlinear nodes.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::UnlabeledValueArg<std::string> input_mesh_arg("input_mesh", "the name of the input mesh file", true, "", "oldmesh.msh"); diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp index 4e0d1870644..e90c5a83484 100644 --- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp +++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp @@ -17,27 +17,30 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" - -#include "MeshLib/IO/readMeshFromFile.h" -#include "MeshLib/IO/writeMeshToFile.h" - +#include "BaseLib/BuildInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/Polygon.h" - #include "MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h" - +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Sets the property value of a mesh element to a given new " - "value iff at least one node of the element is within a polygonal region " - "that is given by a polygon." - "The documentation is available at https://docs.opengeosys.org/docs/tools/model-preparation/set-properties-in-polygonal-region", - ' ', - "0.1"); + TCLAP::CmdLine cmd( + "Sets the property value of a mesh element to a given new value iff at " + "least one node of the element is within a polygonal region that is " + "given by a polygon. The documentation is available at " + "https://docs.opengeosys.org/docs/tools/model-preparation/" + "set-properties-in-polygonal-region.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_out("o", "mesh-output-file", "the name of the file the mesh will be written to, format depends on " "the given file name extension", true, "", "file name"); diff --git a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp index f455a7e35ce..7ccda7ffb2b 100644 --- a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp +++ b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp @@ -12,22 +12,20 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - -#include "MeshLib/Mesh.h" -#include "MeshLib/MeshInformation.h" +#include "BaseLib/BuildInfo.h" +#include "MeshLib/Elements/Hex.h" #include "MeshLib/Elements/Line.h" -#include "MeshLib/Elements/Tri.h" +#include "MeshLib/Elements/Prism.h" +#include "MeshLib/Elements/Pyramid.h" #include "MeshLib/Elements/Quad.h" #include "MeshLib/Elements/Tet.h" -#include "MeshLib/Elements/Hex.h" -#include "MeshLib/Elements/Pyramid.h" -#include "MeshLib/Elements/Prism.h" -#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/Elements/Tri.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" -#include "MeshLib/MeshSearch/ElementSearch.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/RemoveMeshComponents.h" - - +#include "MeshLib/MeshInformation.h" +#include "MeshLib/MeshSearch/ElementSearch.h" bool containsCellVecs(MeshLib::Mesh const& mesh) { @@ -160,10 +158,13 @@ int main (int argc, char* argv[]) ApplicationsLib::LogogSetup logog_setup; TCLAP::CmdLine cmd( - "Prepares OGS-meshes for use in Unity" - "", - ' ', - "0.1"); + "Prepares OGS-meshes for use in Unity.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_arg("i", "input", "the file containing the original OGS mesh", true, diff --git a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp index d99c8bb66b0..f477f2d3687 100644 --- a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp +++ b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp @@ -11,6 +11,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "GeoLib/GEOObjects.h" @@ -26,7 +27,14 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Append line elements into a mesh.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Append line elements into a mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/MeshEdit/checkMesh.cpp b/Applications/Utils/MeshEdit/checkMesh.cpp index 1c9c52eed39..fcf66c6be76 100644 --- a/Applications/Utils/MeshEdit/checkMesh.cpp +++ b/Applications/Utils/MeshEdit/checkMesh.cpp @@ -33,7 +33,14 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Checks mesh properties", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Checks mesh properties.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::UnlabeledValueArg<std::string> mesh_arg("mesh-file","input mesh file",true,"","string"); cmd.add( mesh_arg ); TCLAP::SwitchArg valid_arg("v","validation","validate the mesh"); diff --git a/Applications/Utils/MeshEdit/convertToLinearMesh.cpp b/Applications/Utils/MeshEdit/convertToLinearMesh.cpp index c3c983b92b1..bc3a746012e 100644 --- a/Applications/Utils/MeshEdit/convertToLinearMesh.cpp +++ b/Applications/Utils/MeshEdit/convertToLinearMesh.cpp @@ -27,7 +27,14 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Convert a non-linear mesh to a linear mesh", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Convert a non-linear mesh to a linear mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp index 836c023b7bf..d6f626e8daa 100644 --- a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp +++ b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp @@ -20,6 +20,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -60,10 +61,13 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Creates a layered 3D OGS mesh from an existing 2D OGS mesh and raster " "files representing subsurface layers. Supported raster formats are " - "ArcGIS ascii rasters (*.asc) and Surfer Grids (*.grd)." - "", - ' ', - "1.0"); + "ArcGIS ascii rasters (*.asc) and Surfer Grids (*.grd).\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_arg("i", "input-mesh-file", "The name of the file containing the 2D input mesh.", true, "", "input file name"); diff --git a/Applications/Utils/MeshEdit/createQuadraticMesh.cpp b/Applications/Utils/MeshEdit/createQuadraticMesh.cpp index 0fcb9e2ba2f..87192a771a3 100644 --- a/Applications/Utils/MeshEdit/createQuadraticMesh.cpp +++ b/Applications/Utils/MeshEdit/createQuadraticMesh.cpp @@ -27,7 +27,15 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Create quadratic order mesh", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Create quadratic order mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); + TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshEdit/editMaterialID.cpp b/Applications/Utils/MeshEdit/editMaterialID.cpp index 56b22172463..c06f6876ecd 100644 --- a/Applications/Utils/MeshEdit/editMaterialID.cpp +++ b/Applications/Utils/MeshEdit/editMaterialID.cpp @@ -11,18 +11,25 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" +#include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" -#include "MeshLib/Elements/Element.h" #include "MeshLib/MeshEditing/ElementValueModification.h" int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Edit material IDs of mesh elements.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Edit material IDs of mesh elements.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::SwitchArg replaceArg("r", "replace", "replace material IDs", false); TCLAP::SwitchArg condenseArg("c", "condense", "condense material IDs", false); TCLAP::SwitchArg specifyArg("s", "specify", "specify material IDs by element types (-e)", false); diff --git a/Applications/Utils/MeshEdit/moveMeshNodes.cpp b/Applications/Utils/MeshEdit/moveMeshNodes.cpp index b86575038a5..bbe71f05b38 100644 --- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp +++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp @@ -13,18 +13,15 @@ #include <string> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" - #include "GeoLib/AABB.h" - +#include "MathLib/MathTools.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" -#include "MathLib/MathTools.h" - int find_closest_point(MeshLib::Node const*const point, std::vector<MeshLib::Node*> const& nodes, double const& max_dist) { const std::size_t nNodes (nodes.size()); diff --git a/Applications/Utils/MeshEdit/queryMesh.cpp b/Applications/Utils/MeshEdit/queryMesh.cpp index 6b9ef15347f..f40fcf3ca50 100644 --- a/Applications/Utils/MeshEdit/queryMesh.cpp +++ b/Applications/Utils/MeshEdit/queryMesh.cpp @@ -28,7 +28,14 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Query mesh information", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Query mesh information.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::UnlabeledValueArg<std::string> mesh_arg("mesh-file","input mesh file",true,"","string"); cmd.add( mesh_arg ); TCLAP::MultiArg<std::size_t> eleId_arg("e","element-id","element ID",false,"number"); diff --git a/Applications/Utils/MeshEdit/removeMeshElements.cpp b/Applications/Utils/MeshEdit/removeMeshElements.cpp index 6ab13f629f4..36091a5da3f 100644 --- a/Applications/Utils/MeshEdit/removeMeshElements.cpp +++ b/Applications/Utils/MeshEdit/removeMeshElements.cpp @@ -16,16 +16,15 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" +#include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" - #include "MeshLib/Mesh.h" -#include "MeshLib/Node.h" -#include "MeshLib/Elements/Element.h" +#include "MeshLib/MeshEditing/RemoveMeshComponents.h" #include "MeshLib/MeshEnums.h" #include "MeshLib/MeshSearch/ElementSearch.h" -#include "MeshLib/MeshEditing/RemoveMeshComponents.h" +#include "MeshLib/Node.h" template <typename PROPERTY_TYPE> void searchByPropertyValue(std::string const& property_name, @@ -68,9 +67,17 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Removes mesh elements based on element type, element volume, scalar " + TCLAP::CmdLine cmd( + "Removes mesh elements based on element type, element volume, scalar " "arrays, or bounding box . The documentation is available at " - "https://docs.opengeosys.org/docs/tools/meshing/remove-mesh-elements.", ' ', "0.1"); + "https://docs.opengeosys.org/docs/tools/meshing/" + "remove-mesh-elements.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); // Bounding box params TCLAP::ValueArg<double> zLargeArg("", "z-max", "largest allowed extent in z-dimension", diff --git a/Applications/Utils/MeshEdit/reviseMesh.cpp b/Applications/Utils/MeshEdit/reviseMesh.cpp index ace12e65d69..414e5070f16 100644 --- a/Applications/Utils/MeshEdit/reviseMesh.cpp +++ b/Applications/Utils/MeshEdit/reviseMesh.cpp @@ -31,7 +31,14 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Mesh revision tool", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Mesh revision tool.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp b/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp index 53876155bf4..a62609cf2ba 100644 --- a/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp +++ b/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp @@ -78,7 +78,14 @@ int main(int argc, char *argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Swap node coordinate values", ' ', BaseLib::BuildInfo::git_describe); + TCLAP::CmdLine cmd( + "Swap node coordinate values.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp b/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp index d6bdfc59b2d..39386d8e48a 100644 --- a/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp +++ b/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp @@ -19,17 +19,16 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/Error.h" #include "BaseLib/FileTools.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/Polygon.h" -#include "MeshLib/IO/readMeshFromFile.h" - #include "MathLib/Vector3.h" - +#include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" -#include "MeshLib/Node.h" #include "MeshLib/MeshSurfaceExtraction.h" +#include "MeshLib/Node.h" void writeToFile(std::string const& id_area_fname, std::string const& csv_fname, std::vector<std::pair<std::size_t, double>> const& ids_and_areas, @@ -65,13 +64,19 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Computes ids of mesh nodes that are in polygonal " - "regions and resides on the top surface. The polygonal regions have to " - "be given in a gml- or gli-file. The found mesh nodes and the associated" - " area are written as txt and csv data." - "The documentation is available at https://docs.opengeosys.org/docs/tools/model-preparation/computesurfacenodeidsinpolygonalregion", - ' ', - "0.1"); + TCLAP::CmdLine cmd( + "Computes ids of mesh nodes that are in polygonal regions and resides " + "on the top surface. The polygonal regions have to be given in a gml- " + "or gli-file. The found mesh nodes and the associated area are written " + "as txt and csv data. The documentation is available at " + "https://docs.opengeosys.org/docs/tools/model-preparation/" + "computesurfacenodeidsinpolygonalregion.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("m", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/MeshGeoTools/ConstructMeshesFromGeometry.cpp b/Applications/Utils/MeshGeoTools/ConstructMeshesFromGeometry.cpp index 85f8768df15..6af90fa5cd9 100644 --- a/Applications/Utils/MeshGeoTools/ConstructMeshesFromGeometry.cpp +++ b/Applications/Utils/MeshGeoTools/ConstructMeshesFromGeometry.cpp @@ -10,6 +10,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" +#include "BaseLib/BuildInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" #include "MeshGeoToolsLib/ConstructMeshesFromGeometries.h" @@ -33,9 +34,13 @@ int main(int argc, char* argv[]) ApplicationsLib::LogogSetup logo_setup; TCLAP::CmdLine cmd( - "Converts a geometry defined on a given mesh to distinct meshes.", - ' ', - "0.1"); + "Converts a geometry defined on a given mesh to distinct meshes.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<double> search_length_arg( "s", diff --git a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp index 5bd1a993930..79e51455b0f 100644 --- a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp +++ b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp @@ -17,15 +17,13 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "BaseLib/Error.h" #include "BaseLib/FileTools.h" - #include "MeshLib/IO/readMeshFromFile.h" - #include "MeshLib/Mesh.h" -#include "MeshLib/Node.h" #include "MeshLib/MeshSurfaceExtraction.h" +#include "MeshLib/Node.h" static void writeToFile(std::string const& id_area_fname, std::string const& csv_fname, @@ -59,8 +57,15 @@ int main (int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("The tool computes the area per node of the surface mesh" - " and writes the information as txt and csv data.", ' ', "0.1"); + TCLAP::CmdLine cmd( + "The tool computes the area per node of the surface mesh and writes " + "the information as txt and csv data.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp index 739805f2728..22d81be90e3 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp @@ -21,10 +21,10 @@ #endif #include "Applications/ApplicationsLib/LogogSetup.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/CPUTime.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" - #include "MeshLib/IO/readMeshFromFile.h" #include "Metis.h" @@ -36,7 +36,7 @@ int main(int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - const std::string m_str = + TCLAP::CmdLine cmd( "Partition a mesh for parallel computing." "The tasks of this tool are in twofold:\n" "1. Convert mesh file to the input file of the partitioning tool,\n" @@ -45,9 +45,13 @@ int main(int argc, char* argv[]) "\trenumber the node indices of each partition,\n" "\tand output the results for parallel computing.\n" "Note: If this tool is installed as a system command,\n" - "\tthe command must be run with its full path."; - - TCLAP::CmdLine cmd(m_str, ' ', "0.1"); + "\tthe command must be run with its full path.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_input( "i", "mesh-input-file", "the name of the file containing the input mesh", true, "", diff --git a/Applications/Utils/ModelPreparation/createNeumannBc.cpp b/Applications/Utils/ModelPreparation/createNeumannBc.cpp index 90f364867f9..a2bbed6a7d7 100644 --- a/Applications/Utils/ModelPreparation/createNeumannBc.cpp +++ b/Applications/Utils/ModelPreparation/createNeumannBc.cpp @@ -11,12 +11,12 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" +#include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" -#include "MeshLib/Elements/Element.h" /// Returns a vector of values where each value is associated with a /// particular node. Since a node is part of elements, it is possible to @@ -81,9 +81,13 @@ int main(int argc, char* argv[]) "Neumann boundary condition. The mesh has to contain a property " "\"OriginalSubsurfaceNodeIDs\" that stores the original subsurface " "mesh node ids. Such surface meshes can be created using the OGS-6 " - "tool ExtractSurface.", - ' ', - "0.1"); + "tool ExtractSurface.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> in_mesh("i", "in-mesh", diff --git a/Applications/Utils/ModelPreparation/scaleProperty.cpp b/Applications/Utils/ModelPreparation/scaleProperty.cpp index 9aed6f7d4c0..d2582762024 100644 --- a/Applications/Utils/ModelPreparation/scaleProperty.cpp +++ b/Applications/Utils/ModelPreparation/scaleProperty.cpp @@ -16,10 +16,9 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" - #include "MeshLib/Mesh.h" int main(int argc, char* argv[]) @@ -27,9 +26,13 @@ int main(int argc, char* argv[]) ApplicationsLib::LogogSetup logo_setup; TCLAP::CmdLine cmd( - "Scales a property of a mesh", - ' ', - "0.1"); + "Scales a property of a mesh.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> out_mesh_arg( "o", diff --git a/Applications/Utils/PostProcessing/postLIE.cpp b/Applications/Utils/PostProcessing/postLIE.cpp index 22e9e25c5b2..e6e9c526a93 100644 --- a/Applications/Utils/PostProcessing/postLIE.cpp +++ b/Applications/Utils/PostProcessing/postLIE.cpp @@ -16,15 +16,12 @@ #include <boost/property_tree/xml_parser.hpp> #include "Applications/ApplicationsLib/LogogSetup.h" - +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" - #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" - #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/ConvertToLinearMesh.h" - #include "ProcessLib/LIE/Common/MeshUtils.h" #include "ProcessLib/LIE/Common/PostUtils.h" @@ -106,7 +103,14 @@ int main(int argc, char* argv[]) { ApplicationsLib::LogogSetup logog_setup; - TCLAP::CmdLine cmd("Post-process results of the LIE approach", ' ', "0.1"); + TCLAP::CmdLine cmd( + "Post-process results of the LIE approach.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> arg_out_file( "o", "output-file", "the name of the new PVD or VTU file", true, "", "path"); diff --git a/Applications/Utils/SWMMConverter/SWMMConverter.cpp b/Applications/Utils/SWMMConverter/SWMMConverter.cpp index 6d8468c656f..9592edc082e 100644 --- a/Applications/Utils/SWMMConverter/SWMMConverter.cpp +++ b/Applications/Utils/SWMMConverter/SWMMConverter.cpp @@ -12,6 +12,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" +#include "BaseLib/BuildInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/StringTools.h" @@ -169,8 +170,13 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "Read files for the Storm Water Management Model (SWMM) and converts " - "them into OGS data structures.", - ' ', "0.1"); + "them into OGS data structures.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> mesh_output_arg( "m", "mesh", "mesh output file (*.vtu)", false, "", "mesh output file"); cmd.add(mesh_output_arg); diff --git a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp index 40efb4d8232..989d81aff02 100644 --- a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp +++ b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp @@ -17,24 +17,20 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" - -#include "BaseLib/quicksort.h" -#include "BaseLib/FileTools.h" - -#include "MeshLib/IO/readMeshFromFile.h" -#include "MeshLib/IO/writeMeshToFile.h" #include "Applications/FileIO/AsciiRasterInterface.h" - +#include "BaseLib/BuildInfo.h" +#include "BaseLib/FileTools.h" +#include "BaseLib/quicksort.h" #include "GeoLib/Raster.h" - #include "MathLib/MathTools.h" - -#include "MeshLib/MeshGenerators/RasterToMesh.h" -#include "MeshLib/MeshGenerators/VtkMeshConverter.h" #include "MeshLib/Elements/Element.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/Mesh2MeshPropertyInterpolation.h" #include "MeshLib/MeshEnums.h" +#include "MeshLib/MeshGenerators/RasterToMesh.h" +#include "MeshLib/MeshGenerators/VtkMeshConverter.h" int main(int argc, char* argv[]) { @@ -42,9 +38,13 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "Generates properties for mesh elements of an input mesh deploying a " - "ASC raster file", - ' ', - "0.1"); + "ASC raster file.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); TCLAP::ValueArg<std::string> out_mesh_arg( "o", diff --git a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp index 149d8a8ac98..bd50e0ee4ab 100644 --- a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp +++ b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp @@ -63,17 +63,15 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Structured mesh generator.\n" - "OpenGeoSys-6 software.\n" - "Copyright (c) 2012-2018, OpenGeoSys Community " - "(http://www.opengeosys.org) " - "Distributed under a Modified BSD License. " - "See accompanying file LICENSE.txt or " - "http://www.opengeosys.org/project/license" "The documentation is available at " "https://docs.opengeosys.org/docs/tools/meshing/" - "structured-mesh-generation", - ' ', - BaseLib::BuildInfo::git_describe); + "structured-mesh-generation.\n\n" + "OpenGeoSys-6 software, version " + + BaseLib::BuildInfo::git_describe + + ".\n" + "Copyright (c) 2012-2018, OpenGeoSys Community " + "(http://www.opengeosys.org)", + ' ', BaseLib::BuildInfo::git_describe); auto tclapOutput = std::make_unique<BaseLib::TCLAPCustomOutput>(); cmd.setOutput(tclapOutput.get()); -- GitLab