From a2022e75b11a566dad793516c30f9ae6100dc244 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 10 May 2016 06:14:47 +0200 Subject: [PATCH] Move {read/write}Mesh{From/To}File.{h,cpp}. In order to make OGS more modular: - The {read/write}Mesh{From/To}File.{h,cpp} are moved from FileIO to MeshLib/IO. - The FileIO/Legacy folder was moved to MeshLib/IO/Legacy. - Include paths are changed according the changes above. --- Applications/ApplicationsLib/ProjectData.cpp | 2 +- .../DataExplorer/DataView/SaveMeshDialog.cpp | 5 ++-- Applications/DataExplorer/mainwindow.cpp | 4 +-- .../Utils/FileConverter/CMakeLists.txt | 2 +- .../Utils/FileConverter/FEFLOW2OGS.cpp | 4 +-- Applications/Utils/FileConverter/GMSH2OGS.cpp | 2 +- Applications/Utils/FileConverter/OGS2VTK.cpp | 2 +- Applications/Utils/FileConverter/VTK2OGS.cpp | 5 ++-- .../generateMatPropsFromMatID.cpp | 4 +-- Applications/Utils/MeshEdit/AddTopLayer.cpp | 4 +-- Applications/Utils/MeshEdit/CMakeLists.txt | 30 +++++++++---------- ...CreateBoundaryConditionsAlongPolylines.cpp | 4 +-- .../Utils/MeshEdit/ExtractSurface.cpp | 4 +-- .../MeshEdit/MapGeometryToMeshSurface.cpp | 2 +- Applications/Utils/MeshEdit/MoveMesh.cpp | 2 +- .../Utils/MeshEdit/NodeReordering.cpp | 4 +-- .../ResetPropertiesInPolygonalRegion.cpp | 4 +-- .../MeshEdit/appendLinesAlongPolyline.cpp | 4 +-- Applications/Utils/MeshEdit/checkMesh.cpp | 4 +-- .../MeshEdit/createLayeredMeshFromRasters.cpp | 4 +-- .../Utils/MeshEdit/editMaterialID.cpp | 6 ++-- Applications/Utils/MeshEdit/moveMeshNodes.cpp | 4 +-- Applications/Utils/MeshEdit/queryMesh.cpp | 2 +- .../Utils/MeshEdit/removeMeshElements.cpp | 4 +-- Applications/Utils/MeshEdit/reviseMesh.cpp | 4 +-- ...ComputeSurfaceNodeIDsInPolygonalRegion.cpp | 2 +- .../Utils/ModelPreparation/CMakeLists.txt | 1 - .../ComputeNodeAreasFromSurfaceMesh.cpp | 2 +- .../OGSFileConverter/OGSFileConverter.cpp | 3 +- .../Utils/SimpleMeshCreation/CMakeLists.txt | 6 ++-- .../createMeshElemPropertiesFromASCRaster.cpp | 4 +-- .../generateStructuredMesh.cpp | 2 +- FileIO/CMakeLists.txt | 4 --- FileIO/XmlIO/Qt/XmlGspInterface.cpp | 4 +-- MeshGeoToolsLib/GeoMapper.cpp | 2 +- MeshLib/CMakeLists.txt | 4 ++- {FileIO => MeshLib/IO}/Legacy/MeshIO.cpp | 0 {FileIO => MeshLib/IO}/Legacy/MeshIO.h | 1 - {FileIO => MeshLib/IO}/readMeshFromFile.cpp | 2 +- {FileIO => MeshLib/IO}/readMeshFromFile.h | 0 {FileIO => MeshLib/IO}/writeMeshToFile.cpp | 4 +-- {FileIO => MeshLib/IO}/writeMeshToFile.h | 0 SimpleTests/MeshTests/MeshRead.cpp | 2 +- SimpleTests/MeshTests/MeshSearchTest.cpp | 2 +- Tests/FileIO/TestTetGenInterface.cpp | 2 +- 45 files changed, 78 insertions(+), 85 deletions(-) rename {FileIO => MeshLib/IO}/Legacy/MeshIO.cpp (100%) rename {FileIO => MeshLib/IO}/Legacy/MeshIO.h (99%) rename {FileIO => MeshLib/IO}/readMeshFromFile.cpp (97%) rename {FileIO => MeshLib/IO}/readMeshFromFile.h (100%) rename {FileIO => MeshLib/IO}/writeMeshToFile.cpp (92%) rename {FileIO => MeshLib/IO}/writeMeshToFile.h (100%) diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 03c1e746cbf..eb72469ef05 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -28,7 +28,7 @@ // FileIO #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "BaseLib/ConfigTree.h" diff --git a/Applications/DataExplorer/DataView/SaveMeshDialog.cpp b/Applications/DataExplorer/DataView/SaveMeshDialog.cpp index b9cb8baae13..9f85e600ce4 100644 --- a/Applications/DataExplorer/DataView/SaveMeshDialog.cpp +++ b/Applications/DataExplorer/DataView/SaveMeshDialog.cpp @@ -21,9 +21,8 @@ #include "logog/include/logog.hpp" #include "FileIO/VtkIO/VtuInterface.h" -#include "Legacy/MeshIO.h" - -#include "Mesh.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "MeshLib/Mesh.h" #include "OGSError.h" #include "LastSavedFileDirectory.h" diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index ed176d126a4..41c0e5117e4 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -62,8 +62,8 @@ // FileIO includes #include "FileIO/FEFLOWInterface.h" #include "FileIO/GMSInterface.h" -#include "FileIO/Legacy/MeshIO.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "FileIO/GMSHInterface.h" #include "FileIO/TetGenInterface.h" #include "FileIO/PetrelInterface.h" diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index 87c973d1842..fa0cf528582 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -22,7 +22,7 @@ if (QT4_FOUND) endif () # QT4_FOUND add_executable(generateMatPropsFromMatID generateMatPropsFromMatID.cpp ) -target_link_libraries(generateMatPropsFromMatID FileIO) +target_link_libraries(generateMatPropsFromMatID MeshLib FileIO) ADD_VTK_DEPENDENCY(generateMatPropsFromMatID) set_target_properties(generateMatPropsFromMatID PROPERTIES FOLDER Utilities) diff --git a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp index 9c5b6a4698b..2c79202d0f7 100644 --- a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp +++ b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp @@ -25,8 +25,8 @@ #include "BaseLib/LogogSimpleFormatter.h" // FileIO -#include "FileIO/writeMeshToFile.h" -#include "FileIO/Legacy/MeshIO.h" +#include "MeshLib/IO/writeMeshToFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "FileIO/FEFLOWInterface.h" #include "FileIO/VtkIO/VtuInterface.h" diff --git a/Applications/Utils/FileConverter/GMSH2OGS.cpp b/Applications/Utils/FileConverter/GMSH2OGS.cpp index d6ec2921d87..e929e748e95 100644 --- a/Applications/Utils/FileConverter/GMSH2OGS.cpp +++ b/Applications/Utils/FileConverter/GMSH2OGS.cpp @@ -32,7 +32,7 @@ // FileIO #include "FileIO/GMSHInterface.h" -#include "FileIO/Legacy/MeshIO.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "FileIO/VtkIO/VtuInterface.h" // MeshLib diff --git a/Applications/Utils/FileConverter/OGS2VTK.cpp b/Applications/Utils/FileConverter/OGS2VTK.cpp index 47a07295103..5ea64c38210 100644 --- a/Applications/Utils/FileConverter/OGS2VTK.cpp +++ b/Applications/Utils/FileConverter/OGS2VTK.cpp @@ -25,7 +25,7 @@ // FileIO #include "FileIO/VtkIO/VtuInterface.h" -#include "readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" // MeshLib #include "Mesh.h" diff --git a/Applications/Utils/FileConverter/VTK2OGS.cpp b/Applications/Utils/FileConverter/VTK2OGS.cpp index 458b41a1702..62042672bce 100644 --- a/Applications/Utils/FileConverter/VTK2OGS.cpp +++ b/Applications/Utils/FileConverter/VTK2OGS.cpp @@ -25,10 +25,9 @@ // FileIO #include "FileIO/VtkIO/VtuInterface.h" -#include "Legacy/MeshIO.h" -// MeshLib -#include "Mesh.h" +#include "MeshLib/Mesh.h" +#include "MeshLib/IO/Legacy/MeshIO.h" int main (int argc, char* argv[]) { diff --git a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp index 4a90b0c630b..f8cc533ada4 100644 --- a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp +++ b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp @@ -23,8 +23,8 @@ #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Elements/Element.h" diff --git a/Applications/Utils/MeshEdit/AddTopLayer.cpp b/Applications/Utils/MeshEdit/AddTopLayer.cpp index 38d3a9b9b92..10ef79cf0b9 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -18,8 +18,8 @@ #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/AddLayerToMesh.h" diff --git a/Applications/Utils/MeshEdit/CMakeLists.txt b/Applications/Utils/MeshEdit/CMakeLists.txt index 480cd800393..2405214193b 100644 --- a/Applications/Utils/MeshEdit/CMakeLists.txt +++ b/Applications/Utils/MeshEdit/CMakeLists.txt @@ -9,78 +9,78 @@ include_directories( ) add_executable(moveMeshNodes moveMeshNodes.cpp) -target_link_libraries(moveMeshNodes FileIO) +target_link_libraries(moveMeshNodes MeshLib FileIO) ADD_VTK_DEPENDENCY(moveMeshNodes) set_target_properties(moveMeshNodes PROPERTIES FOLDER Utilities) add_executable(MapGeometryToMeshSurface MapGeometryToMeshSurface.cpp ) -target_link_libraries(MapGeometryToMeshSurface FileIO MeshGeoToolsLib) +target_link_libraries(MapGeometryToMeshSurface MeshLib MeshGeoToolsLib) ADD_VTK_DEPENDENCY(MapGeometryToMeshSurface) set_target_properties(MapGeometryToMeshSurface PROPERTIES FOLDER Utilities) add_executable(removeMeshElements removeMeshElements.cpp) -target_link_libraries(removeMeshElements FileIO) +target_link_libraries(removeMeshElements MeshLib FileIO) ADD_VTK_DEPENDENCY(removeMeshElements) set_target_properties(removeMeshElements PROPERTIES FOLDER Utilities) add_executable(NodeReordering NodeReordering.cpp) -target_link_libraries(NodeReordering FileIO) +target_link_libraries(NodeReordering MeshLib FileIO) ADD_VTK_DEPENDENCY(NodeReordering) set_target_properties(NodeReordering PROPERTIES FOLDER Utilities) add_executable(MoveMesh MoveMesh.cpp) -target_link_libraries(MoveMesh FileIO) +target_link_libraries(MoveMesh MeshLib FileIO) ADD_VTK_DEPENDENCY(MoveMesh) set_target_properties(MoveMesh PROPERTIES FOLDER Utilities) add_executable(appendLinesAlongPolyline appendLinesAlongPolyline.cpp) -target_link_libraries(appendLinesAlongPolyline FileIO MeshGeoToolsLib) +target_link_libraries(appendLinesAlongPolyline GeoLib MeshLib MeshGeoToolsLib FileIO) ADD_VTK_DEPENDENCY(appendLinesAlongPolyline) set_target_properties(appendLinesAlongPolyline PROPERTIES FOLDER Utilities) add_executable(editMaterialID editMaterialID.cpp) -target_link_libraries(editMaterialID FileIO) +target_link_libraries(editMaterialID MeshLib) ADD_VTK_DEPENDENCY(editMaterialID) set_target_properties(editMaterialID PROPERTIES FOLDER Utilities) add_executable(checkMesh checkMesh.cpp) -target_link_libraries(checkMesh FileIO) +target_link_libraries(checkMesh MeshLib FileIO) ADD_VTK_DEPENDENCY(checkMesh) set_target_properties(checkMesh PROPERTIES FOLDER Utilities) add_executable(reviseMesh reviseMesh.cpp) -target_link_libraries (reviseMesh FileIO) +target_link_libraries (reviseMesh MeshLib) ADD_VTK_DEPENDENCY(reviseMesh) set_target_properties(reviseMesh PROPERTIES FOLDER Utilities) add_executable(ResetPropertiesInPolygonalRegion ResetPropertiesInPolygonalRegion.cpp) -target_link_libraries(ResetPropertiesInPolygonalRegion FileIO) +target_link_libraries(ResetPropertiesInPolygonalRegion MeshLib GeoLib FileIO) set_target_properties(ResetPropertiesInPolygonalRegion PROPERTIES FOLDER Utilities) add_executable(AddTopLayer AddTopLayer.cpp) -target_link_libraries(AddTopLayer FileIO) +target_link_libraries(AddTopLayer MeshLib FileIO) set_target_properties(AddTopLayer PROPERTIES FOLDER Utilities) add_executable(createLayeredMeshFromRasters createLayeredMeshFromRasters.cpp) -target_link_libraries(createLayeredMeshFromRasters FileIO) +target_link_libraries(createLayeredMeshFromRasters MeshLib GeoLib FileIO) set_target_properties(createLayeredMeshFromRasters PROPERTIES FOLDER Utilities) add_executable(CreateBoundaryConditionsAlongPolylines CreateBoundaryConditionsAlongPolylines.cpp ) -target_link_libraries(CreateBoundaryConditionsAlongPolylines FileIO MeshGeoToolsLib) +target_link_libraries(CreateBoundaryConditionsAlongPolylines MeshLib FileIO MeshGeoToolsLib) ADD_VTK_DEPENDENCY(CreateBoundaryConditionsAlongPolylines) set_target_properties(CreateBoundaryConditionsAlongPolylines PROPERTIES FOLDER Utilities) add_executable(queryMesh queryMesh.cpp) -target_link_libraries(queryMesh FileIO) +target_link_libraries(queryMesh MeshLib) set_target_properties(queryMesh PROPERTIES FOLDER Utilities) add_executable(ExtractSurface ExtractSurface.cpp) -target_link_libraries(ExtractSurface FileIO MeshLib) +target_link_libraries(ExtractSurface MeshLib) set_target_properties(ExtractSurface PROPERTIES FOLDER Utilities) #################### diff --git a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp index ee6fc9f94b1..fd6d0a910fa 100644 --- a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp +++ b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp @@ -26,8 +26,8 @@ #include "BaseLib/FileTools.h" // FileIO -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" // GeoLib #include "GeoLib/GEOObjects.h" diff --git a/Applications/Utils/MeshEdit/ExtractSurface.cpp b/Applications/Utils/MeshEdit/ExtractSurface.cpp index 3b1875eba40..b5156c88257 100644 --- a/Applications/Utils/MeshEdit/ExtractSurface.cpp +++ b/Applications/Utils/MeshEdit/ExtractSurface.cpp @@ -20,8 +20,8 @@ #include "BaseLib/StringTools.h" #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MathLib/Vector3.h" diff --git a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp index d0e6a88a664..2d7beaffcc5 100644 --- a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp +++ b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp @@ -23,7 +23,7 @@ #include "BaseLib/LogogSimpleFormatter.h" // FileIO -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" // GeoLib diff --git a/Applications/Utils/MeshEdit/MoveMesh.cpp b/Applications/Utils/MeshEdit/MoveMesh.cpp index 474a4b3af3c..2d739f8898f 100644 --- a/Applications/Utils/MeshEdit/MoveMesh.cpp +++ b/Applications/Utils/MeshEdit/MoveMesh.cpp @@ -22,7 +22,7 @@ #include "LogogSimpleFormatter.h" // FileIO -#include "readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "FileIO/VtkIO/VtuInterface.h" // GeoLib diff --git a/Applications/Utils/MeshEdit/NodeReordering.cpp b/Applications/Utils/MeshEdit/NodeReordering.cpp index 2d152f061aa..cd7cfcec029 100644 --- a/Applications/Utils/MeshEdit/NodeReordering.cpp +++ b/Applications/Utils/MeshEdit/NodeReordering.cpp @@ -18,8 +18,8 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Elements/Element.h" diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp index f0305bfb392..8a4b12cd710 100644 --- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp +++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp @@ -22,8 +22,8 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // FileIO -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" // GeoLib #include "GeoLib/GEOObjects.h" diff --git a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp index 4fb4c529d2b..3f5a77b4a4c 100644 --- a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp +++ b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp @@ -21,8 +21,8 @@ #include "PolylineVec.h" // FileIO -#include "Legacy/MeshIO.h" -#include "readMeshFromFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" // MeshLib diff --git a/Applications/Utils/MeshEdit/checkMesh.cpp b/Applications/Utils/MeshEdit/checkMesh.cpp index dffe85af3be..2c0d2a4ad1f 100644 --- a/Applications/Utils/MeshEdit/checkMesh.cpp +++ b/Applications/Utils/MeshEdit/checkMesh.cpp @@ -27,8 +27,8 @@ #include "MeshLib/MeshInformation.h" #include "MeshLib/MeshQuality/MeshValidation.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" int main(int argc, char *argv[]) { diff --git a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp index a2d40078ea8..1a862c4b1f2 100644 --- a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp +++ b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp @@ -22,9 +22,9 @@ #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "FileIO/AsciiRasterInterface.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshGenerators/MeshLayerMapper.h" diff --git a/Applications/Utils/MeshEdit/editMaterialID.cpp b/Applications/Utils/MeshEdit/editMaterialID.cpp index 1d3e2b81945..2bd20f26fec 100644 --- a/Applications/Utils/MeshEdit/editMaterialID.cpp +++ b/Applications/Utils/MeshEdit/editMaterialID.cpp @@ -16,9 +16,9 @@ #include "BaseLib/LogogSimpleFormatter.h" // FileIO -#include "FileIO/Legacy/MeshIO.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" // MeshLib #include "MeshLib/Mesh.h" diff --git a/Applications/Utils/MeshEdit/moveMeshNodes.cpp b/Applications/Utils/MeshEdit/moveMeshNodes.cpp index 4cdf5919793..9eec00b25cd 100644 --- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp +++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp @@ -5,8 +5,8 @@ #include "logog/include/logog.hpp" #include "LogogSimpleFormatter.h" -#include "readMeshFromFile.h" -#include "Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "AABB.h" #include "Mesh.h" #include "MeshLib/Node.h" diff --git a/Applications/Utils/MeshEdit/queryMesh.cpp b/Applications/Utils/MeshEdit/queryMesh.cpp index 9db2929a856..390023f60d3 100644 --- a/Applications/Utils/MeshEdit/queryMesh.cpp +++ b/Applications/Utils/MeshEdit/queryMesh.cpp @@ -23,7 +23,7 @@ #include "MeshLib/Elements/Element.h" #include "MeshLib/Mesh.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" int main(int argc, char *argv[]) { diff --git a/Applications/Utils/MeshEdit/removeMeshElements.cpp b/Applications/Utils/MeshEdit/removeMeshElements.cpp index 0b47d87f5fe..cf39ae61883 100644 --- a/Applications/Utils/MeshEdit/removeMeshElements.cpp +++ b/Applications/Utils/MeshEdit/removeMeshElements.cpp @@ -18,8 +18,8 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" diff --git a/Applications/Utils/MeshEdit/reviseMesh.cpp b/Applications/Utils/MeshEdit/reviseMesh.cpp index 2223573e53a..7ac9b23213c 100644 --- a/Applications/Utils/MeshEdit/reviseMesh.cpp +++ b/Applications/Utils/MeshEdit/reviseMesh.cpp @@ -23,8 +23,8 @@ #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/MeshRevision.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" int main(int argc, char *argv[]) { diff --git a/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp b/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp index dc9f326ed08..3a0a631d3b6 100644 --- a/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp +++ b/Applications/Utils/MeshGeoTools/ComputeSurfaceNodeIDsInPolygonalRegion.cpp @@ -21,7 +21,7 @@ #include "BaseLib/StringTools.h" #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/Polygon.h" diff --git a/Applications/Utils/ModelPreparation/CMakeLists.txt b/Applications/Utils/ModelPreparation/CMakeLists.txt index 8475b547d35..af65454a39f 100644 --- a/Applications/Utils/ModelPreparation/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/CMakeLists.txt @@ -1,7 +1,6 @@ add_executable(ComputeNodeAreasFromSurfaceMesh ComputeNodeAreasFromSurfaceMesh.cpp) set_target_properties(ComputeNodeAreasFromSurfaceMesh PROPERTIES FOLDER Utilities) target_link_libraries(ComputeNodeAreasFromSurfaceMesh - FileIO MeshLib MathLib ${OGS_VTK_REQUIRED_LIBS} diff --git a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp index 1bbf8febdd1..547b342a77f 100644 --- a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp +++ b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp @@ -20,7 +20,7 @@ #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" diff --git a/Applications/Utils/OGSFileConverter/OGSFileConverter.cpp b/Applications/Utils/OGSFileConverter/OGSFileConverter.cpp index 9708c1c265b..b01df66cd63 100644 --- a/Applications/Utils/OGSFileConverter/OGSFileConverter.cpp +++ b/Applications/Utils/OGSFileConverter/OGSFileConverter.cpp @@ -30,8 +30,7 @@ #include "GeoLib/IO/Legacy/OGSIOVer4.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" -// mesh -#include "Legacy/MeshIO.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "FileIO/VtkIO/VtuInterface.h" OGSFileConverter::OGSFileConverter(QWidget* parent) diff --git a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt index 48014d88540..29c11e67173 100644 --- a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt +++ b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/BaseLib ${CMAKE_SOURCE_DIR}/FileIO - ${CMAKE_SOURCE_DIR}/FileIO/Legacy + ${CMAKE_SOURCE_DIR}/MeshLib/IO/Legacy ${CMAKE_SOURCE_DIR}/GeoLib ${CMAKE_SOURCE_DIR}/MathLib ${CMAKE_SOURCE_DIR}/MeshLib @@ -12,13 +12,13 @@ include_directories( if(OGS_BUILD_GUI) add_executable(createMeshElemPropertiesFromASCRaster createMeshElemPropertiesFromASCRaster.cpp) set_target_properties(createMeshElemPropertiesFromASCRaster PROPERTIES FOLDER Utilities) - target_link_libraries(createMeshElemPropertiesFromASCRaster FileIO) + target_link_libraries(createMeshElemPropertiesFromASCRaster MeshLib) ADD_VTK_DEPENDENCY(createMeshElemPropertiesFromASCRaster) endif() # OGS_BUILD_GUI (VtkVis-target is existing) add_executable(generateStructuredMesh generateStructuredMesh.cpp) -target_link_libraries(generateStructuredMesh FileIO) +target_link_libraries(generateStructuredMesh MeshLib) set_target_properties(generateStructuredMesh PROPERTIES FOLDER Utilities) #################### diff --git a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp index 5139ebbc5bb..05c43c5803e 100644 --- a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp +++ b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp @@ -21,8 +21,8 @@ #include "BaseLib/quicksort.h" #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/readMeshFromFile.h" +#include "MeshLib/IO/writeMeshToFile.h" #include "FileIO/AsciiRasterInterface.h" #include "GeoLib/Raster.h" diff --git a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp index 77f1d5123e5..57190bb8cc1 100644 --- a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp +++ b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp @@ -29,7 +29,7 @@ #include "MeshLib/MeshEnums.h" #include "MeshLib/MeshGenerators/MeshGenerator.h" -#include "FileIO/writeMeshToFile.h" +#include "MeshLib/IO/writeMeshToFile.h" namespace { diff --git a/FileIO/CMakeLists.txt b/FileIO/CMakeLists.txt index 6517d71039b..d17e3e07631 100644 --- a/FileIO/CMakeLists.txt +++ b/FileIO/CMakeLists.txt @@ -9,14 +9,10 @@ set(SOURCES GMSHInterface.cpp PetrelInterface.h PetrelInterface.cpp - readMeshFromFile.h - readMeshFromFile.cpp TetGenInterface.h TetGenInterface.cpp TINInterface.h TINInterface.cpp - writeMeshToFile.h - writeMeshToFile.cpp ) if(Shapelib_FOUND) list(APPEND SOURCES SHPInterface.h SHPInterface.cpp) diff --git a/FileIO/XmlIO/Qt/XmlGspInterface.cpp b/FileIO/XmlIO/Qt/XmlGspInterface.cpp index 4c5c038fa55..b37349f2908 100644 --- a/FileIO/XmlIO/Qt/XmlGspInterface.cpp +++ b/FileIO/XmlIO/Qt/XmlGspInterface.cpp @@ -28,8 +28,8 @@ #include "BaseLib/FileFinder.h" #include "BaseLib/IO/Writer.h" -#include "FileIO/Legacy/MeshIO.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" #include <QFile> diff --git a/MeshGeoToolsLib/GeoMapper.cpp b/MeshGeoToolsLib/GeoMapper.cpp index a84be65a979..989b10f2b63 100644 --- a/MeshGeoToolsLib/GeoMapper.cpp +++ b/MeshGeoToolsLib/GeoMapper.cpp @@ -20,7 +20,7 @@ #include <logog/include/logog.hpp> #include "FileIO/AsciiRasterInterface.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "GeoLib/AABB.h" #include "GeoLib/AnalyticalGeometry.h" diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index 32e89742560..433ce597702 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -10,9 +10,11 @@ GET_SOURCE_FILES(SOURCES_ELEMENTS Elements) GET_SOURCE_FILES(SOURCES_EDITING MeshEditing) GET_SOURCE_FILES(SOURCES_GENERATORS MeshGenerators) GET_SOURCE_FILES(SOURCES_SEARCH MeshSearch) +GET_SOURCE_FILES(SOURCES_IO IO) +GET_SOURCE_FILES(SOURCES_IO_LEGACY IO/Legacy) GET_SOURCE_FILES(SOURCES_QUALITY MeshQuality) -set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_GENERATORS} ${SOURCES_QUALITY} ${SOURCES_SEARCH}) +set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_GENERATORS} ${SOURCES_QUALITY} ${SOURCES_SEARCH} ${SOURCES_IO} ${SOURCES_IO_LEGACY}) # Create the library add_library(MeshLib STATIC ${SOURCES}) diff --git a/FileIO/Legacy/MeshIO.cpp b/MeshLib/IO/Legacy/MeshIO.cpp similarity index 100% rename from FileIO/Legacy/MeshIO.cpp rename to MeshLib/IO/Legacy/MeshIO.cpp diff --git a/FileIO/Legacy/MeshIO.h b/MeshLib/IO/Legacy/MeshIO.h similarity index 99% rename from FileIO/Legacy/MeshIO.h rename to MeshLib/IO/Legacy/MeshIO.h index 257f4980245..4599290b930 100644 --- a/FileIO/Legacy/MeshIO.h +++ b/MeshLib/IO/Legacy/MeshIO.h @@ -73,4 +73,3 @@ private: } /* namespace FileIO */ #endif /* MESHIO_H_ */ - diff --git a/FileIO/readMeshFromFile.cpp b/MeshLib/IO/readMeshFromFile.cpp similarity index 97% rename from FileIO/readMeshFromFile.cpp rename to MeshLib/IO/readMeshFromFile.cpp index d70dc5557b4..27764c04da5 100644 --- a/FileIO/readMeshFromFile.cpp +++ b/MeshLib/IO/readMeshFromFile.cpp @@ -30,7 +30,7 @@ #include "MeshLib/Mesh.h" -#include "FileIO/Legacy/MeshIO.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "FileIO/VtkIO/VtuInterface.h" #ifdef USE_PETSC diff --git a/FileIO/readMeshFromFile.h b/MeshLib/IO/readMeshFromFile.h similarity index 100% rename from FileIO/readMeshFromFile.h rename to MeshLib/IO/readMeshFromFile.h diff --git a/FileIO/writeMeshToFile.cpp b/MeshLib/IO/writeMeshToFile.cpp similarity index 92% rename from FileIO/writeMeshToFile.cpp rename to MeshLib/IO/writeMeshToFile.cpp index c3286dcaaa1..fedee7ff01c 100644 --- a/FileIO/writeMeshToFile.cpp +++ b/MeshLib/IO/writeMeshToFile.cpp @@ -15,8 +15,8 @@ #include "MeshLib/Mesh.h" -#include "Legacy/MeshIO.h" -#include "VtkIO/VtuInterface.h" +#include "MeshLib/IO/Legacy/MeshIO.h" +#include "FileIO/VtkIO/VtuInterface.h" namespace FileIO { diff --git a/FileIO/writeMeshToFile.h b/MeshLib/IO/writeMeshToFile.h similarity index 100% rename from FileIO/writeMeshToFile.h rename to MeshLib/IO/writeMeshToFile.h diff --git a/SimpleTests/MeshTests/MeshRead.cpp b/SimpleTests/MeshTests/MeshRead.cpp index 018e0fbdaba..43ab8b1dc04 100644 --- a/SimpleTests/MeshTests/MeshRead.cpp +++ b/SimpleTests/MeshTests/MeshRead.cpp @@ -21,7 +21,7 @@ #include "BaseLib/StringTools.h" #include "BaseLib/FileTools.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Node.h" #include "MeshLib/Elements/Element.h" diff --git a/SimpleTests/MeshTests/MeshSearchTest.cpp b/SimpleTests/MeshTests/MeshSearchTest.cpp index d59f661e3bd..c6efa7eee0c 100644 --- a/SimpleTests/MeshTests/MeshSearchTest.cpp +++ b/SimpleTests/MeshTests/MeshSearchTest.cpp @@ -16,7 +16,7 @@ #include "BaseLib/MemWatch.h" #include "BaseLib/RunTime.h" -#include "FileIO/Legacy/MeshIO.h" +#include "MeshLib/IO/Legacy/MeshIO.h" #include "GeoLib/Grid.h" diff --git a/Tests/FileIO/TestTetGenInterface.cpp b/Tests/FileIO/TestTetGenInterface.cpp index c6f042ae4f8..cd39f06a01f 100644 --- a/Tests/FileIO/TestTetGenInterface.cpp +++ b/Tests/FileIO/TestTetGenInterface.cpp @@ -19,7 +19,7 @@ #include "gtest/gtest.h" #include "BaseLib/BuildInfo.h" -#include "FileIO/readMeshFromFile.h" +#include "MeshLib/IO/readMeshFromFile.h" #include "FileIO/TetGenInterface.h" #include "GeoLib/GEOObjects.h" #include "MeshLib/Mesh.h" -- GitLab