diff --git a/scripts/examples_tqmesh.sh b/scripts/examples_tqmesh.sh new file mode 100755 index 0000000..33eec6e --- /dev/null +++ b/scripts/examples_tqmesh.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +./bin/run_examples 01 +./bin/run_examples 02 +./bin/run_examples 03 +./bin/run_examples 04 +./bin/run_examples 05 +./bin/run_examples 06 +./bin/run_examples 07 +./bin/run_examples 08 +./bin/run_examples 09 + +if [ $? -eq 0 ]; then + echo ALL TESTS PASSED +else + echo SOME TESTS FAILED +fi diff --git a/src/algorithm/Boundary.h b/src/algorithm/Boundary.h index 400e5ee..c6a402e 100644 --- a/src/algorithm/Boundary.h +++ b/src/algorithm/Boundary.h @@ -7,11 +7,7 @@ */ #pragma once -#include -#include -#include -#include -#include +#include "STLHeaders.h" #include "VecND.h" #include "Geometry.h" diff --git a/src/algorithm/Domain.h b/src/algorithm/Domain.h index 1552ba0..3064f45 100644 --- a/src/algorithm/Domain.h +++ b/src/algorithm/Domain.h @@ -7,12 +7,7 @@ */ #pragma once -#include // std::vector -#include // std::shared_ptr -#include // std::move -#include // std::array -#include // std::function - +#include "STLHeaders.h" #include "Boundary.h" namespace TQMesh { diff --git a/src/algorithm/Edge.h b/src/algorithm/Edge.h index 197451e..f888ea0 100644 --- a/src/algorithm/Edge.h +++ b/src/algorithm/Edge.h @@ -7,8 +7,7 @@ */ #pragma once -#include -#include +#include "STLHeaders.h" #include "Geometry.h" #include "VecND.h" diff --git a/src/algorithm/EdgeList.h b/src/algorithm/EdgeList.h index c288504..b847ae3 100644 --- a/src/algorithm/EdgeList.h +++ b/src/algorithm/EdgeList.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "Container.h" #include "utils.h" diff --git a/src/algorithm/Error.h b/src/algorithm/Error.h index 4f439fa..7a1c7d8 100644 --- a/src/algorithm/Error.h +++ b/src/algorithm/Error.h @@ -7,8 +7,7 @@ */ #pragma once -#include -#include +#include "STLHeaders.h" namespace TQMesh { diff --git a/src/algorithm/Front.h b/src/algorithm/Front.h index c8e05ff..c31e87d 100644 --- a/src/algorithm/Front.h +++ b/src/algorithm/Front.h @@ -7,12 +7,7 @@ */ #pragma once -#include -#include -#include -#include -#include -#include +#include "STLHeaders.h" #include "VecND.h" #include "Geometry.h" diff --git a/src/algorithm/FrontUpdate.h b/src/algorithm/FrontUpdate.h index 9eca547..3885224 100644 --- a/src/algorithm/FrontUpdate.h +++ b/src/algorithm/FrontUpdate.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "Vertex.h" #include "Edge.h" diff --git a/src/algorithm/Mesh.h b/src/algorithm/Mesh.h index ebf56c7..123549b 100644 --- a/src/algorithm/Mesh.h +++ b/src/algorithm/Mesh.h @@ -7,11 +7,9 @@ */ #pragma once -#include -#include +#include "STLHeaders.h" #include "VecND.h" -//#include "VtkIO.h" #include "utils.h" #include "Vertex.h" diff --git a/src/algorithm/MeshBuilder.h b/src/algorithm/MeshBuilder.h index 7d39698..b2c82f4 100644 --- a/src/algorithm/MeshBuilder.h +++ b/src/algorithm/MeshBuilder.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "utils.h" diff --git a/src/algorithm/MeshCleanup.h b/src/algorithm/MeshCleanup.h index 947bc8d..a6ff677 100644 --- a/src/algorithm/MeshCleanup.h +++ b/src/algorithm/MeshCleanup.h @@ -7,8 +7,7 @@ */ #pragma once -#include -#include +#include "STLHeaders.h" #include "VecND.h" diff --git a/src/algorithm/MeshGenerator.h b/src/algorithm/MeshGenerator.h index 43999a2..ac6213b 100644 --- a/src/algorithm/MeshGenerator.h +++ b/src/algorithm/MeshGenerator.h @@ -7,9 +7,7 @@ */ #pragma once -#include -#include -#include +#include "STLHeaders.h" #include "VecND.h" diff --git a/src/algorithm/MeshMerger.h b/src/algorithm/MeshMerger.h index 3c55a0f..8b9dcb6 100644 --- a/src/algorithm/MeshMerger.h +++ b/src/algorithm/MeshMerger.h @@ -7,8 +7,7 @@ */ #pragma once -#include -#include +#include "STLHeaders.h" #include "Mesh.h" #include "MeshCleanup.h" diff --git a/src/algorithm/ModificationStrategy.h b/src/algorithm/ModificationStrategy.h index a3efb84..c7cddf9 100644 --- a/src/algorithm/ModificationStrategy.h +++ b/src/algorithm/ModificationStrategy.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "VecND.h" diff --git a/src/algorithm/Quad.h b/src/algorithm/Quad.h index 310cce0..124d637 100644 --- a/src/algorithm/Quad.h +++ b/src/algorithm/Quad.h @@ -7,9 +7,7 @@ */ #pragma once -#include -#include -#include +#include "STLHeaders.h" #include "VecND.h" #include "Geometry.h" diff --git a/src/algorithm/QuadLayerStrategy.h b/src/algorithm/QuadLayerStrategy.h index 1b1f27e..03a48ff 100644 --- a/src/algorithm/QuadLayerStrategy.h +++ b/src/algorithm/QuadLayerStrategy.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "utils.h" #include "Vertex.h" diff --git a/src/algorithm/RefinementStrategy.h b/src/algorithm/RefinementStrategy.h index d745be9..5504414 100644 --- a/src/algorithm/RefinementStrategy.h +++ b/src/algorithm/RefinementStrategy.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "VecND.h" diff --git a/src/algorithm/STLHeaders.h b/src/algorithm/STLHeaders.h new file mode 100644 index 0000000..cd34042 --- /dev/null +++ b/src/algorithm/STLHeaders.h @@ -0,0 +1,28 @@ +/* +* This source file is part of the tqmesh library. +* This code was written by Florian Setzwein in 2022, +* and is covered under the MIT License +* Refer to the accompanying documentation for details +* on usage and license. +*/ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/src/algorithm/TQMesh.h b/src/algorithm/TQMesh.h new file mode 100644 index 0000000..823ffc7 --- /dev/null +++ b/src/algorithm/TQMesh.h @@ -0,0 +1,49 @@ +/* +* This source file is part of the tqmesh library. +* This code was written by Florian Setzwein in 2022, +* and is covered under the MIT License +* Refer to the accompanying documentation for details +* on usage and license. +*/ +#pragma once + +#include + +#include "STLHeaders.h" + +#include "VecND.h" +#include "Timer.h" +#include "Geometry.h" +#include "Container.h" +#include "Helpers.h" +#include "MathUtility.h" +#include "Testing.h" +#include "ParaReader.h" + +#include "utils.h" +#include "Error.h" +#include "Vertex.h" +#include "Facet.h" +#include "FacetGeometry.h" +#include "Edge.h" +#include "EdgeList.h" +#include "Boundary.h" +#include "Domain.h" +#include "Triangle.h" +#include "Quad.h" +#include "EntityChecks.h" +#include "Mesh.h" +#include "Front.h" +#include "FrontUpdate.h" +#include "MeshBuilder.h" +#include "MeshCleanup.h" +#include "MeshMerger.h" +#include "MeshWriter.h" +#include "MeshingStrategy.h" +#include "ModificationStrategy.h" +#include "SmoothingStrategy.h" +#include "QuadLayerStrategy.h" +#include "RefinementStrategy.h" +#include "TriangulationStrategy.h" +#include "MeshGenerator.h" + diff --git a/src/algorithm/Triangle.h b/src/algorithm/Triangle.h index 3c77ca3..abc621c 100644 --- a/src/algorithm/Triangle.h +++ b/src/algorithm/Triangle.h @@ -7,9 +7,7 @@ */ #pragma once -#include -#include -#include +#include "STLHeaders.h" #include "VecND.h" #include "Geometry.h" diff --git a/src/algorithm/TriangulationStrategy.h b/src/algorithm/TriangulationStrategy.h index e65396b..1e1b4dd 100644 --- a/src/algorithm/TriangulationStrategy.h +++ b/src/algorithm/TriangulationStrategy.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include "STLHeaders.h" #include "Vertex.h" #include "Edge.h" diff --git a/src/algorithm/Vertex.h b/src/algorithm/Vertex.h index 979abd3..69f0f22 100644 --- a/src/algorithm/Vertex.h +++ b/src/algorithm/Vertex.h @@ -7,9 +7,7 @@ */ #pragma once -#include -#include -#include +#include "STLHeaders.h" #include "Geometry.h" #include "VecND.h" diff --git a/src/algorithm/utils.h b/src/algorithm/utils.h index 04961d5..a25cc4f 100644 --- a/src/algorithm/utils.h +++ b/src/algorithm/utils.h @@ -7,11 +7,7 @@ */ #pragma once -#include -#include -#include -#include -#include +#include "STLHeaders.h" #include "Helpers.h" diff --git a/src/app/TQMeshApp.h b/src/app/TQMeshApp.h index 748e510..1e3cf0c 100644 --- a/src/app/TQMeshApp.h +++ b/src/app/TQMeshApp.h @@ -7,24 +7,9 @@ */ #pragma once -#include -#include -#include -#include - - -#include "MeshGenerator.h" - -#include "Error.h" -#include "ParaReader.h" -#include "VecND.h" -#include "Helpers.h" -#include "Log.h" -#include "Container.h" - +#include "TQMesh.h" #include "size_function.h" - namespace TQMesh { using namespace CppUtils; diff --git a/src/app/main.cpp b/src/app/main.cpp index b76c50c..26206ef 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -5,17 +5,9 @@ * Refer to the accompanying documentation for details * on usage and license. */ -#include -#include -#include - -#include - -#include "Log.h" - +#include "TQMesh.h" #include "TQMeshApp.h" - using CppUtils::LOG_PROPERTIES; using CppUtils::LOG; using CppUtils::LogLevel::INFO; diff --git a/src/app/size_function.cpp b/src/app/size_function.cpp index c011b82..e2c8831 100644 --- a/src/app/size_function.cpp +++ b/src/app/size_function.cpp @@ -5,13 +5,7 @@ * Refer to the accompanying documentation for details * on usage and license. */ -#include - -#include "utils.h" -#include "VecND.h" -#include "Domain.h" - -#include "size_function.h" +#include "TQMesh.h" #ifdef TQMESH_USE_EXPRTK #include "exprtk.h" @@ -27,6 +21,9 @@ static exprtk::expression expression; static exprtk::parser parser; #endif +using namespace CppUtils; +using namespace TQMesh; + /******************************************************************** * Initialize the user defined size from a given input string *******************************************************************/ diff --git a/src/app/size_function.h b/src/app/size_function.h index 77fc1fb..c5eb303 100644 --- a/src/app/size_function.h +++ b/src/app/size_function.h @@ -7,9 +7,7 @@ */ #pragma once -#include "utils.h" -#include "VecND.h" -#include "Domain.h" +#include "TQMesh.h" using namespace CppUtils; using namespace TQMesh; diff --git a/src/tests/TestBuilder.h b/src/tests/TestBuilder.h index 7295ecf..9eb2c11 100644 --- a/src/tests/TestBuilder.h +++ b/src/tests/TestBuilder.h @@ -7,19 +7,7 @@ */ #pragma once -#include -#include -#include -#include -#include - -#include "Helpers.h" -#include "MathUtility.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Boundary.h" +#include "TQMesh.h" namespace TQMesh { diff --git a/src/tests/main.cpp b/src/tests/main.cpp index 4a917c5..2ed9df8 100644 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -5,16 +5,10 @@ * Refer to the accompanying documentation for details * on usage and license. */ -#include -#include -#include -#include - -#include "Log.h" +#include "TQMesh.h" #include "tests.h" - using CppUtils::LOG_PROPERTIES; using CppUtils::LOG; using CppUtils::LogLevel::INFO; diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index d3f6265..40f1541 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -5,15 +5,8 @@ * Refer to the accompanying documentation for details * on usage and license. */ -#include -#include -#include - -#include - #include "tests.h" -#include "Log.h" -#include "Testing.h" +#include "TQMesh.h" /********************************************************************* * Log utils diff --git a/src/tests/tests.h b/src/tests/tests.h index b77b0cf..32f3815 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -7,8 +7,7 @@ */ #pragma once -#include -#include +#include "TQMesh.h" /********************************************************************* * Adjust logging output stream diff --git a/src/tests/tests_Boundary.cpp b/src/tests/tests_Boundary.cpp index dc200f2..ff594e0 100644 --- a/src/tests/tests_Boundary.cpp +++ b/src/tests/tests_Boundary.cpp @@ -6,20 +6,8 @@ * on usage and license. */ -#include -#include - #include "tests.h" - -#include "VecND.h" -#include "Timer.h" -#include "Container.h" -#include "Testing.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Boundary.h" -#include "Domain.h" +#include "TQMesh.h" namespace BoundaryTests { diff --git a/src/tests/tests_EdgeList.cpp b/src/tests/tests_EdgeList.cpp index ff55983..a584976 100644 --- a/src/tests/tests_EdgeList.cpp +++ b/src/tests/tests_EdgeList.cpp @@ -6,20 +6,8 @@ * on usage and license. */ -#include -#include - #include "tests.h" - -#include "VecND.h" -#include "Testing.h" -#include "Timer.h" -#include "Container.h" - -#include "utils.h" -#include "Vertex.h" -#include "Edge.h" -#include "EdgeList.h" +#include "TQMesh.h" namespace EdgeListTests { diff --git a/src/tests/tests_Front.cpp b/src/tests/tests_Front.cpp index aa0e711..8eac6da 100644 --- a/src/tests/tests_Front.cpp +++ b/src/tests/tests_Front.cpp @@ -6,26 +6,9 @@ * on usage and license. */ -#include -#include -#include - -#include - #include "tests.h" #include "TestBuilder.h" - -#include "Testing.h" -#include "VecND.h" -#include "Timer.h" -#include "Container.h" - -#include "utils.h" -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Front.h" -#include "Mesh.h" +#include "TQMesh.h" namespace FrontTests { diff --git a/src/tests/tests_Mesh.cpp b/src/tests/tests_Mesh.cpp index 5b0cbca..1ebd508 100644 --- a/src/tests/tests_Mesh.cpp +++ b/src/tests/tests_Mesh.cpp @@ -6,29 +6,9 @@ * on usage and license. */ -#include -#include - -#include - #include "tests.h" #include "TestBuilder.h" - -#include "VecND.h" -#include "Testing.h" -#include "Timer.h" -#include "Container.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Mesh.h" -#include "MeshBuilder.h" -#include "RefinementStrategy.h" -#include "MeshCleanup.h" -#include "TriangulationStrategy.h" -#include "QuadLayerStrategy.h" -#include "SmoothingStrategy.h" +#include "TQMesh.h" namespace MeshTests { diff --git a/src/tests/tests_MeshCleanup.cpp b/src/tests/tests_MeshCleanup.cpp index b8d0f79..654544a 100644 --- a/src/tests/tests_MeshCleanup.cpp +++ b/src/tests/tests_MeshCleanup.cpp @@ -6,25 +6,9 @@ * on usage and license. */ -#include -#include - -#include - #include "tests.h" #include "TestBuilder.h" - -#include "VecND.h" -#include "Testing.h" -#include "Timer.h" -#include "Container.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Mesh.h" -#include "MeshCleanup.h" -#include "EntityChecks.h" +#include "TQMesh.h" namespace CleanupTests { diff --git a/src/tests/tests_MeshGenerator.cpp b/src/tests/tests_MeshGenerator.cpp index ab1a50c..57ade70 100644 --- a/src/tests/tests_MeshGenerator.cpp +++ b/src/tests/tests_MeshGenerator.cpp @@ -6,28 +6,9 @@ * on usage and license. */ -#include -#include - -#include - #include "tests.h" - -#include "VecND.h" -#include "Testing.h" -#include "Timer.h" -#include "Container.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Mesh.h" -#include "MeshGenerator.h" -#include "MeshMerger.h" -#include "RefinementStrategy.h" -#include "MeshCleanup.h" -#include "SmoothingStrategy.h" -#include "EntityChecks.h" +#include "TestBuilder.h" +#include "TQMesh.h" namespace MeshGeneratorTests { diff --git a/src/tests/tests_ParaReader.cpp b/src/tests/tests_ParaReader.cpp index 7dda9ea..35db20e 100644 --- a/src/tests/tests_ParaReader.cpp +++ b/src/tests/tests_ParaReader.cpp @@ -6,14 +6,8 @@ * on usage and license. */ -#include -#include -#include - #include "tests.h" - -#include "ParaReader.h" -#include "Log.h" +#include "TQMesh.h" namespace ParaReaderTests { diff --git a/src/tests/tests_Quad.cpp b/src/tests/tests_Quad.cpp index 03ceb90..abe334e 100644 --- a/src/tests/tests_Quad.cpp +++ b/src/tests/tests_Quad.cpp @@ -6,22 +6,8 @@ * on usage and license. */ -#include -#include - #include "tests.h" - -#include "Testing.h" -#include "VecND.h" -#include "Timer.h" -#include "Container.h" - -#include "utils.h" -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Front.h" -#include "Quad.h" +#include "TQMesh.h" namespace QuadTests { diff --git a/src/tests/tests_SizeFunction.cpp b/src/tests/tests_SizeFunction.cpp index a0905a7..2583455 100644 --- a/src/tests/tests_SizeFunction.cpp +++ b/src/tests/tests_SizeFunction.cpp @@ -6,23 +6,8 @@ * on usage and license. */ -#include -#include -#include - -#include - #include "tests.h" - -#include "VecND.h" -#include "Testing.h" -#include "Timer.h" -#include "Container.h" - -#include "utils.h" -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" +#include "TQMesh.h" namespace SizeFunctionTests { diff --git a/src/tests/tests_SmoothingStrategy.cpp b/src/tests/tests_SmoothingStrategy.cpp index a2f035b..833b9b5 100644 --- a/src/tests/tests_SmoothingStrategy.cpp +++ b/src/tests/tests_SmoothingStrategy.cpp @@ -6,21 +6,8 @@ * on usage and license. */ -#include -#include - -#include - #include "tests.h" - -#include "VecND.h" -#include "Testing.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Mesh.h" -#include "SmoothingStrategy.h" +#include "TQMesh.h" namespace MeshSmootherTests { diff --git a/src/tests/tests_Triangle.cpp b/src/tests/tests_Triangle.cpp index b285bbc..26cf379 100644 --- a/src/tests/tests_Triangle.cpp +++ b/src/tests/tests_Triangle.cpp @@ -6,22 +6,8 @@ * on usage and license. */ -#include -#include - #include "tests.h" - -#include "utils.h" -#include "VecND.h" -#include "Timer.h" -#include "Container.h" -#include "Testing.h" - -#include "Vertex.h" -#include "Edge.h" -#include "Domain.h" -#include "Front.h" -#include "Triangle.h" +#include "TQMesh.h" namespace TriangleTests { diff --git a/src/tests/tests_Vertex.cpp b/src/tests/tests_Vertex.cpp index a5ceee3..d8944b5 100644 --- a/src/tests/tests_Vertex.cpp +++ b/src/tests/tests_Vertex.cpp @@ -6,18 +6,8 @@ * on usage and license. */ -#include -#include - #include "tests.h" - -#include "VecND.h" -#include "MathUtility.h" -#include "Testing.h" - -#include "Vertex.h" -#include "Triangle.h" -#include "Quad.h" +#include "TQMesh.h" namespace VertexTests {