diff --git a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt index c56396fbdd3a4701bb8ba58658e1ae2bba2120c3..cfcf6172afd471bacf154a6a1f63440a94fac629 100644 --- a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt +++ b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt @@ -11,11 +11,6 @@ include_directories( if(OGS_BUILD_GUI) - add_executable(generateStructuredQuadMesh generateStructuredQuadMesh.cpp) - set_target_properties(generateStructuredQuadMesh PROPERTIES FOLDER Utils) - target_link_libraries(generateStructuredQuadMesh FileIO) - ADD_VTK_DEPENDENCY(generateStructuredQuadMesh) - add_executable(createMeshElemPropertiesFromASCRaster createMeshElemPropertiesFromASCRaster.cpp) set_target_properties(createMeshElemPropertiesFromASCRaster PROPERTIES FOLDER Utils) target_link_libraries(createMeshElemPropertiesFromASCRaster FileIO) @@ -38,7 +33,6 @@ install(TARGETS ) if(TARGET VtkVis) install(TARGETS - generateStructuredQuadMesh createMeshElemPropertiesFromASCRaster RUNTIME DESTINATION bin COMPONENT Utilities diff --git a/Applications/Utils/SimpleMeshCreation/generateStructuredQuadMesh.cpp b/Applications/Utils/SimpleMeshCreation/generateStructuredQuadMesh.cpp deleted file mode 100644 index 1c998def6e83e406121d6a9aeae4c1e88712b322..0000000000000000000000000000000000000000 --- a/Applications/Utils/SimpleMeshCreation/generateStructuredQuadMesh.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/** - * \file - * \author Thomas Fischer - * \date Sep 21, 2012 - * \brief Implementation of the generateStructuredQuadMesh tool. - * - * \copyright - * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -// BaseLib -#include "tclap/CmdLine.h" - -// FileIO/Legacy -#include "MeshIO.h" - -// MeshLib -#include "Mesh.h" -#include "MeshGenerators/VtkMeshConverter.h" - -int main (int argc, char* argv[]) -{ - TCLAP::CmdLine cmd("Simple mesh creator for unstructured meshes", ' ', "0.1"); - TCLAP::ValueArg<std::string> mesh_arg("m", "mesh", "the mesh is stored to this file", true, "test.msh", "filename"); - cmd.add( mesh_arg ); - TCLAP::ValueArg<unsigned> width_arg("c","columns","the number of columns of the structured mesh", true, 1000, "number of cols"); - cmd.add( width_arg ); - TCLAP::ValueArg<unsigned> height_arg("r","rows","the number of rows of the structured mesh", true, 1000, "number of rows"); - cmd.add( height_arg ); - TCLAP::ValueArg<double> edge_length_arg("e","edge-length","the size of the edge length", false, 1, "edge length"); - cmd.add( edge_length_arg ); - TCLAP::ValueArg<double> origin_x_arg("x","origin-x","x coordinate of the origin of the mesh", false, 0.0, "x coords"); - cmd.add( origin_x_arg ); - TCLAP::ValueArg<double> origin_y_arg("y","origin-y","y coordinate of the origin of the mesh", false, 0.0, "y coords"); - cmd.add( origin_y_arg ); - TCLAP::ValueArg<double> origin_z_arg("z","origin-z","z coordinate of the origin of the mesh", false, 0.0, "z coords"); - cmd.add( origin_z_arg ); - - cmd.parse( argc, argv ); - - // thanks to KR for this algorithm - unsigned height(height_arg.getValue()), width(width_arg.getValue()); - double edge_length(edge_length_arg.getValue()); - const unsigned size (height*width); - double* values (new double[size]); - const double origin[3] = {origin_x_arg.getValue() + edge_length/2, origin_y_arg.getValue() + edge_length/2, origin_z_arg.getValue()}; - for (unsigned i=0; i<size; ++i) values[i]=0; - MeshLib::Mesh* mesh(MeshLib::VtkMeshConverter::convertImgToMesh(values, origin, height, width, - edge_length, MeshLib::MeshElemType::QUAD, MeshLib::UseIntensityAs::DATAVECTOR)); - - delete [] values; - - FileIO::Legacy::MeshIO mesh_writer; - mesh_writer.setMesh(mesh); - mesh_writer.setPrecision(12); - mesh_writer.writeToFile(mesh_arg.getValue()); - - delete mesh; -}