Skip to content

Commit

Permalink
Put includes into TQMesh.h and update examples / application for it
Browse files Browse the repository at this point in the history
  • Loading branch information
FloSewn committed Apr 30, 2024
1 parent 3afa4e4 commit b0996b6
Show file tree
Hide file tree
Showing 43 changed files with 140 additions and 298 deletions.
19 changes: 19 additions & 0 deletions scripts/examples_tqmesh.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 1 addition & 5 deletions src/algorithm/Boundary.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
*/
#pragma once

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include "STLHeaders.h"

#include "VecND.h"
#include "Geometry.h"
Expand Down
7 changes: 1 addition & 6 deletions src/algorithm/Domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
*/
#pragma once

#include <vector> // std::vector
#include <memory> // std::shared_ptr
#include <utility> // std::move
#include <array> // std::array
#include <functional> // std::function

#include "STLHeaders.h"
#include "Boundary.h"

namespace TQMesh {
Expand Down
3 changes: 1 addition & 2 deletions src/algorithm/Edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/
#pragma once

#include <iomanip>
#include <algorithm>
#include "STLHeaders.h"

#include "Geometry.h"
#include "VecND.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/EdgeList.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <stdexcept>
#include "STLHeaders.h"

#include "Container.h"
#include "utils.h"
Expand Down
3 changes: 1 addition & 2 deletions src/algorithm/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/
#pragma once

#include <string>
#include <exception>
#include "STLHeaders.h"

namespace TQMesh {

Expand Down
7 changes: 1 addition & 6 deletions src/algorithm/Front.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
*/
#pragma once

#include <list>
#include <stdexcept>
#include <memory>
#include <vector>
#include <algorithm>
#include <numeric>
#include "STLHeaders.h"

#include "VecND.h"
#include "Geometry.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/FrontUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "Vertex.h"
#include "Edge.h"
Expand Down
4 changes: 1 addition & 3 deletions src/algorithm/Mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
*/
#pragma once

#include <algorithm>
#include <limits.h>
#include "STLHeaders.h"

#include "VecND.h"
//#include "VtkIO.h"

#include "utils.h"
#include "Vertex.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/MeshBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "utils.h"

Expand Down
3 changes: 1 addition & 2 deletions src/algorithm/MeshCleanup.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/
#pragma once

#include <algorithm>
#include <limits.h>
#include "STLHeaders.h"

#include "VecND.h"

Expand Down
4 changes: 1 addition & 3 deletions src/algorithm/MeshGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
#pragma once

#include <algorithm>
#include <memory>
#include <limits.h>
#include "STLHeaders.h"

#include "VecND.h"

Expand Down
3 changes: 1 addition & 2 deletions src/algorithm/MeshMerger.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/
#pragma once

#include <vector>
#include <utility>
#include "STLHeaders.h"

#include "Mesh.h"
#include "MeshCleanup.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/ModificationStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "VecND.h"

Expand Down
4 changes: 1 addition & 3 deletions src/algorithm/Quad.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
#pragma once

#include <iostream>
#include <list>
#include <array>
#include "STLHeaders.h"

#include "VecND.h"
#include "Geometry.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/QuadLayerStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "utils.h"
#include "Vertex.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/RefinementStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "VecND.h"

Expand Down
28 changes: 28 additions & 0 deletions src/algorithm/STLHeaders.h
Original file line number Diff line number Diff line change
@@ -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 <vector>
#include <list>
#include <iomanip>
#include <memory>
#include <algorithm>
#include <numeric>
#include <utility>
#include <array>
#include <functional>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <exception>
#include <cassert>
#include <float.h>
#include <limits.h>
#include <cmath>
#include <stdexcept>
49 changes: 49 additions & 0 deletions src/algorithm/TQMesh.h
Original file line number Diff line number Diff line change
@@ -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 <TQMeshConfig.h>

#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"

4 changes: 1 addition & 3 deletions src/algorithm/Triangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
#pragma once

#include <iostream>
#include <list>
#include <array>
#include "STLHeaders.h"

#include "VecND.h"
#include "Geometry.h"
Expand Down
2 changes: 1 addition & 1 deletion src/algorithm/TriangulationStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#pragma once

#include <vector>
#include "STLHeaders.h"

#include "Vertex.h"
#include "Edge.h"
Expand Down
4 changes: 1 addition & 3 deletions src/algorithm/Vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
#pragma once

#include <list>
#include <iomanip>
#include <algorithm>
#include "STLHeaders.h"

#include "Geometry.h"
#include "VecND.h"
Expand Down
6 changes: 1 addition & 5 deletions src/algorithm/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
*/
#pragma once

#include <functional>
#include <cassert>
#include <float.h>
#include <limits.h>
#include <cmath>
#include "STLHeaders.h"

#include "Helpers.h"

Expand Down
17 changes: 1 addition & 16 deletions src/app/TQMeshApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,9 @@
*/
#pragma once

#include <iostream>
#include <cstdlib>
#include <sstream>
#include <vector>


#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;
Expand Down
10 changes: 1 addition & 9 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@
* Refer to the accompanying documentation for details
* on usage and license.
*/
#include <iostream>
#include <cstdlib>
#include <sstream>

#include <TQMeshConfig.h>

#include "Log.h"

#include "TQMesh.h"
#include "TQMeshApp.h"


using CppUtils::LOG_PROPERTIES;
using CppUtils::LOG;
using CppUtils::LogLevel::INFO;
Expand Down
11 changes: 4 additions & 7 deletions src/app/size_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
* Refer to the accompanying documentation for details
* on usage and license.
*/
#include <string>

#include "utils.h"
#include "VecND.h"
#include "Domain.h"

#include "size_function.h"
#include "TQMesh.h"

#ifdef TQMESH_USE_EXPRTK
#include "exprtk.h"
Expand All @@ -27,6 +21,9 @@ static exprtk::expression<double> expression;
static exprtk::parser<double> parser;
#endif

using namespace CppUtils;
using namespace TQMesh;

/********************************************************************
* Initialize the user defined size from a given input string
*******************************************************************/
Expand Down
4 changes: 1 addition & 3 deletions src/app/size_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
*/
#pragma once

#include "utils.h"
#include "VecND.h"
#include "Domain.h"
#include "TQMesh.h"

using namespace CppUtils;
using namespace TQMesh;
Expand Down
Loading

0 comments on commit b0996b6

Please sign in to comment.