Commit ab0789a3 authored by JasonPries's avatar JasonPries
Browse files

Rename clashing classes in different libraries

parent bfdf46cc
......@@ -4,12 +4,12 @@ set(SOURCE_FILES
./include/Mesh.hpp
./src/BoundaryConstraint.h ./src/BoundaryConstraint.cpp
./src/DartConstraint.h ./src/DartConstraint.cpp
./src/Edge.h ./src/Edge.cpp
./src/InsertionQueuer.h ./src/InsertionQueuer.cpp
./src/Mesh.h ./src/Mesh.cpp
./src/Point.h ./src/Point.cpp
./src/Triangle.h ./src/Triangle.cpp
./src/DartConstraint.h ./src/DartConstraint.cpp
./src/Edge.h ./src/Edge.cpp
./src/InsertionQueuer.h ./src/InsertionQueuer.cpp
./src/Mesh.h ./src/Mesh.cpp
./src/Point.h ./src/Point.cpp
./src/DartTriangle.h ./src/DartTriangle.cpp
)
add_library(mesh SHARED ${SOURCE_FILES})
......
#ifndef OERSTED_MESH_HPP
#define OERSTED_MESH_HPP
#include "../src/BoundaryConstraint.h"
#include "../src/DartConstraint.h"
#include "../src/DartTriangle.h"
#include "../src/Edge.h"
#include "../src/InsertionQueuer.h"
#include "../src/Mesh.h"
......
#include "DartTriangle.h"
#ifndef OERSTED_DARTTRIANGLE_H
#define OERSTED_DARTTRIANGLE_H
#include <cstddef>
#include <cstdint>
class DartTriangle {
public:
DartTriangle() : Edge{SIZE_MAX}, Contour{SIZE_MAX} {};
DartTriangle(size_t e, size_t c) : Edge{e}, Contour{c} {};
size_t Edge;
size_t Contour;
};
#endif //OERSTED_DARTTRIANGLE_H
......@@ -12,7 +12,7 @@
#include "Edge.h"
#include "InsertionQueuer.h"
#include "Point.h"
#include "Triangle.h"
#include "DartTriangle.h"
enum class LocateTriangleResult {
Interior, Exterior, Boundary, Point // TODO: Enumerate cases in function when triangle is located by a point near the boundary
......@@ -159,7 +159,7 @@ protected:
std::vector<std::shared_ptr<BoundaryConstraint>> BoundaryConstraints;
std::vector<Triangle> Triangles;
std::vector<DartTriangle> Triangles;
std::vector<std::unique_ptr<InsertionQueuer>> Queue;
......
#ifndef OERSTED_TRIANGLE_H
#define OERSTED_TRIANGLE_H
#include <cstddef>
#include <cstdint>
class Triangle {
public:
Triangle() : Edge{SIZE_MAX}, Contour{SIZE_MAX} {};
Triangle(size_t e, size_t c) : Edge{e}, Contour{c} {};
size_t Edge;
size_t Contour;
};
#endif //OERSTED_TRIANGLE_H
......@@ -18,7 +18,7 @@
// TODO: Higher level classes should implement interfaces with appropriate physics grammar
// TODO: Implement material property dependencies using pointers to virtual member functions
enum class Variable {
enum class FieldVariable {
MagneticVectorPotential = 1,
A = 1,
MagneticFluxDensity = 2,
......@@ -84,12 +84,12 @@ protected:
DerivativeMatrixGroup<QuadraturePoints> Derivatives;
};
template<size_t Dimension, size_t ElementOrder, size_t QuadratureOrder, Variable V>
template<size_t Dimension, size_t ElementOrder, size_t QuadratureOrder, FieldVariable V>
class Magnetostatic : public PhysicsData<Dimension, ElementOrder, QuadratureOrder>, public PhysicsInterface {
};
template<size_t ElementOrder, size_t QuadratureOrder>
class Magnetostatic<2, ElementOrder, QuadratureOrder, Variable::MagneticVectorPotential> : public PhysicsData<2, ElementOrder, QuadratureOrder>, public PhysicsInterface {
class Magnetostatic<2, ElementOrder, QuadratureOrder, FieldVariable::MagneticVectorPotential> : public PhysicsData<2, ElementOrder, QuadratureOrder>, public PhysicsInterface {
public:
using PhysicsData<2, ElementOrder, QuadratureOrder>::QuadraturePoints;
......
......@@ -26,9 +26,8 @@ set(SOURCE_FILES
Physics/test_Physics.hpp
Physics/test_FiniteElementMesh.cpp
#Physics/test_Discretization.cpp
#Physics/test_Curl.cpp
#Physics/test_Physics.cpp
LibraryIntegration/test_Library_Integration.hpp
LibraryIntegration/test_Mesh_to_FEM.cpp
UseCases/test_UseCases.hpp
UseCases/test_Stator.cpp
......
#ifndef OERSTED_TEST_LIBRARY_INTEGRATION_H
#define OERSTED_TEST_LIBRARY_INTEGRATION_H
#include "Sketch.hpp"
#include "Mesh.hpp"
#include "Quadrature.hpp"
#include "Physics.hpp"
#endif //OERSTED_TEST_LIBRARY_INTEGRATION_H
#include "test_Library_Integration.hpp"
\ No newline at end of file
......@@ -72,7 +72,7 @@ TEST_F(MasterTriangle, magnetostatic) {
//TODO: This isn't really testing anything...
static constexpr size_t Q = 1;
Magnetostatic<2, 1, Q, Variable::A> ms(femesh);
Magnetostatic<2, 1, Q, FieldVariable::A> ms(femesh);
ms.time(1.0);
auto ff = [](double t) { return 1.0 * t; };
......@@ -363,7 +363,7 @@ TEST_F(SimpleSquare, magnetostatic_forcing) {
// TODO: Applied in reverse order, Motion->BoundaryCondition->Forcing,
// TODO: Or, TimeVarying->TimeInvariant->Forcing?
Magnetostatic<2, 1, 2, Variable::A> ms{femesh};
Magnetostatic<2, 1, 2, FieldVariable::A> ms{femesh};
ms.time(1.0);
ms.build_matrices();
......@@ -569,7 +569,7 @@ public:
};
TEST_F(TwoRegionHexagon, magnetostatic_forcing_air) {
Magnetostatic<2, 1, 1, Variable::A> ms{femesh};
Magnetostatic<2, 1, 1, FieldVariable::A> ms{femesh};
ms.time(0.0);
// Test without boundary conditions
......@@ -659,7 +659,7 @@ TEST_F(TwoRegionHexagon, magnetostatic_forcing_air) {
TEST_F(TwoRegionHexagon, magnetostatic_forcing_1000) {
femesh.region(1)->material(Linear1000);
Magnetostatic<2, 1, 1, Variable::A> ms{femesh};
Magnetostatic<2, 1, 1, FieldVariable::A> ms{femesh};
ms.time(0.0);
ms.build_matrices();
......@@ -790,7 +790,7 @@ public:
TEST_F(TwoRegionQuarterOctagon, magnetostatic_periodic) {
// Initialize physics
Magnetostatic<2, 1, 1, Variable::A> ms{femesh};
Magnetostatic<2, 1, 1, FieldVariable::A> ms{femesh};
ms.time(0.0);
// Add conditions
......@@ -867,7 +867,7 @@ TEST_F(TwoRegionQuarterOctagon, magnetostatic_periodic) {
TEST_F(TwoRegionQuarterOctagon, magnetostatic_antiperiodic) {
// Initialize physics
Magnetostatic<2, 1, 1, Variable::A> ms{femesh};
Magnetostatic<2, 1, 1, FieldVariable::A> ms{femesh};
ms.time(0.0);
// Add conditions
......@@ -1086,7 +1086,7 @@ public:
TEST_F(TwoRegionHexagonRotation, magnetostatic_forcing) {
// Tests sliding interface condition for implementing virtual rotational motion
Magnetostatic<2, 1, 1, Variable::A> ms{femesh};
Magnetostatic<2, 1, 1, FieldVariable::A> ms{femesh};
ms.time(0.0);
auto f_positive = [](double t) { return 1.0; };
......
......@@ -52,7 +52,7 @@ TEST(Contour, Triangle_CW) {
EXPECT_TRUE(cont == cont);
}
TEST(Contour, Triangle) {
TEST(Contour, DartTriangle) {
Sketch s;
auto v0 = s.new_element<Vertex>(1.0, 0.0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment