Commit 805a374d authored by Pries, Jason's avatar Pries, Jason

Exploring ways to change targeted save directories during compilation to ease...

Exploring ways to change targeted save directories during compilation to ease building on local machine and OLCF resources
parent f944cea3
......@@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.2)
project(Oersted)
find_package(MPI REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Boost REQUIRED)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
include_directories(./lib/)
......
......@@ -2,7 +2,7 @@
#include "globalobjective.h"
#include "model.h"
#define SAVE_DIR "./output/"
#define SUB_DIR "./output/"
int main(int argc, char** argv) {
MPI_Init(NULL,NULL);
......@@ -29,7 +29,7 @@ int main(int argc, char** argv) {
Swarm swarm{ds,go,swarm_size,objective_tolerance,maximum_iterations,std::greater<double_t>(),global_objective_keys()};
if (rank == 0) {
swarm.set_output_file(SAVE_DIR,"sws");
swarm.set_output_file(SUB_DIR,"sws");
}
double_t dw{1.0/(N-1.0)};
......
#!/usr/bin/env bash
# TODO: use variable to read in default save directory
mkdir -p build
cd build
cmake .. && make
export CXX="${CXX:mpic++}"
export CXXFLAGS="$CXXFLAGS -DSAVEDIR=$MEMBERWORK/phy119"
cmake ..
make
#./test/run_tests
......
#include "Library_Integration_Test.hpp"
#define SAVE_DIR "/Oersted/test/output/Integration/"
#define SUB_DIR std::string("/Oersted/test/output/Integration/")
TEST(Full_Circle, Magnetostatic_Uniform_Current_Density) {
// Create Sketch
......@@ -28,7 +28,7 @@ TEST(Full_Circle, Magnetostatic_Uniform_Current_Density) {
EXPECT_EQ(sk.size_contours(), 1);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("full_circle_sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("full_circle_sketch"));
// Create Refineable Mesh
Mesh me{sk};
......@@ -40,7 +40,7 @@ TEST(Full_Circle, Magnetostatic_Uniform_Current_Density) {
me.refine();
me.save_as(SAVE_DIR, std::string("full_circle_mesh"));
me.save_as(SUB_DIR, std::string("full_circle_mesh"));
// Convert to FiniteElementMesh
auto fem = std::make_shared<FiniteElementMesh<1,1>>(me);
......@@ -102,7 +102,7 @@ TEST(Full_Circle, Magnetostatic_Uniform_Current_Density) {
// Save
Eigen::VectorXd vv = msph.recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("full_circle_magnetostatic_uniform_current_density"));
fem->write_scalar(vv, SUB_DIR, std::string("full_circle_magnetostatic_uniform_current_density"));
// Test
msph.linearize(solution);
......@@ -180,7 +180,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, "sixth_circle_mirror_copy_sketch");
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, "sixth_circle_mirror_copy_sketch");
periodic_boundary = sk.select_periodic_boundary_pairs(v0, 60.0);
{
......@@ -255,7 +255,7 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("sixth_circle_mirror_copy_mesh"));
me.save_as(SUB_DIR, std::string("sixth_circle_mirror_copy_mesh"));
// Create FiniteElementMesh
fem = std::make_shared<FiniteElementMesh<1, 1>>(me);
......@@ -361,7 +361,7 @@ TEST_F(Sixth_Circle_Mirror_Copy, Magnetostatic_Uniform_Current_Density_Periodic)
// A = a_f * r^2 + c_f in forced inner region
// A = a_h * log(r) + c_h in homogeneous outer region
Eigen::VectorXd vv = msph.recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("sixth_circle_uniform_current_density_periodic"));
fem->write_scalar(vv, SUB_DIR, std::string("sixth_circle_uniform_current_density_periodic"));
double_t a_f = -0.5;
double_t c_f = -2.0 * a_f * std::log(2.0) - a_f;
......@@ -455,7 +455,7 @@ TEST_F(Sixth_Circle_Mirror_Copy, Magnetostatic_Uniform_Current_Density_Antieriod
// Bounds are obtained from the Fourier series approximation of the square wave current density
Eigen::VectorXd vv = msph.recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("sixth_circle_uniform_current_density_antiperiodic"));
fem->write_scalar(vv, SUB_DIR, std::string("sixth_circle_uniform_current_density_antiperiodic"));
double_t a_f = -2.0 / (5.0);
double_t b_f = -384.0 / 321.0 * a_f;
......@@ -522,7 +522,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, "sixth_circle_sketch");
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, "sixth_circle_sketch");
periodic_boundary = sk.select_periodic_boundary_pairs(v0, 60.0);
{
......@@ -597,7 +597,7 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("sixth_circle_mesh"));
me.save_as(SUB_DIR, std::string("sixth_circle_mesh"));
// Create FiniteElementMesh
fem = std::make_shared<FiniteElementMesh<1, 1>>(me);
......@@ -724,7 +724,7 @@ TEST_F(Sixth_Circle, Magnetostatic_Uniform_Current_Density_Periodic_Rotation) {
// A = a_f * r^2 + c_f in forced inner region
// A = a_h * log(r) + c_h in homogeneous outer region
Eigen::VectorXd vv = msph.recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("one_sixth_circle_uniform_current_density_periodic_rotation_") + std::to_string(iter));
fem->write_scalar(vv, SUB_DIR, std::string("one_sixth_circle_uniform_current_density_periodic_rotation_") + std::to_string(iter));
double_t a_f = -0.5;
double_t c_f = -2.0 * a_f * std::log(2.0) - a_f;
......@@ -826,7 +826,7 @@ TEST_F(Sixth_Circle, Magnetostatic_Uniform_Current_Density_Antiperiodic_Rotation
// Bounds are obtained from the Fourier series approximation of the square wave current density
Eigen::VectorXd vv = msph.recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("sixth_circle_uniform_current_density_antiperiodic_") + std::to_string(iter));
fem->write_scalar(vv, SUB_DIR, std::string("sixth_circle_uniform_current_density_antiperiodic_") + std::to_string(iter));
double_t a_f = -2.0 / (5.0);
double_t b_f = -384.0 / 321.0 * a_f;
......@@ -997,7 +997,7 @@ public:
residual = sk.solve();
EXPECT_LE(residual, FLT_EPSILON * rro);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("salient_pole_synchrel_sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("salient_pole_synchrel_sketch"));
bool result = sk.build();
EXPECT_TRUE(result);
......@@ -1024,7 +1024,7 @@ public:
EXPECT_TRUE(me.edges_are_valid());
EXPECT_TRUE(me.edges_are_optimal());
me.save_as(SAVE_DIR, std::string("salient_pole_synchrel_mesh"));
me.save_as(SUB_DIR, std::string("salient_pole_synchrel_mesh"));
//me.MaximumElementSize = 5.0e-3;
me.MinimumElementQuality = 0.5;
......@@ -1032,7 +1032,7 @@ public:
// Refine and save
me.refine();
me.save_as(SAVE_DIR, std::string("salient_pole_synchrel_mesh"));
me.save_as(SUB_DIR, std::string("salient_pole_synchrel_mesh"));
// Create FiniteElementMesh
fem = std::make_shared<FiniteElementMesh<2, 2>>(me); // TODO: Look at speeding this up somehow, try row major sparse matrix operators, sparse vectors for evaluation of magnetization
......@@ -1176,11 +1176,11 @@ TEST_F(Salient_Pole_Synchrel, Test) {
// Save image
Eigen::VectorXd vv = msph->recover_boundary(solution->v);
fem->write_scalar(vv, SAVE_DIR, std::string("salient_pole_syncrel_A_") + std::to_string(iter));
fem->write_scalar(vv, SUB_DIR, std::string("salient_pole_syncrel_A_") + std::to_string(iter));
Eigen::ArrayXd Bx = msph->derivatives().dy(0).transpose() * solution->v;
Eigen::ArrayXd By = -msph->derivatives().dx(0).transpose() * solution->v;
fem->write_vector(Bx, By, SAVE_DIR, std::string("salient_pole_synchrel_B_") + std::to_string(iter));
fem->write_vector(Bx, By, SUB_DIR, std::string("salient_pole_synchrel_B_") + std::to_string(iter));
// Increment Position
*position += step;
......
......@@ -36,7 +36,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("sketch"));
BoundingBall bi = BoundingBall{0.0,0.0,1.0+FLT_EPSILON};
BoundingBall bo = BoundingBall{0.0,0.0,2.0+FLT_EPSILON};
......@@ -64,10 +64,10 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("mesh"));
me.save_as(SUB_DIR, std::string("mesh"));
}
std::string SAVE_DIR = "/Oersted/output/Integration/test_Annuli/";
std::string SUB_DIR = "/Oersted/output/Integration/test_Annuli/";
std::vector<std::shared_ptr<Curve>> inner_boundaries;
std::vector<std::shared_ptr<Curve>> outer_boundaries;
......
......@@ -25,7 +25,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("sketch"));
}
void SetUp_Mesh() {
......@@ -40,12 +40,12 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("mesh"));
me.save_as(SUB_DIR, std::string("mesh"));
circle_contour = me.select_contour(Point{0.0,0.0});
}
std::string SAVE_DIR = "/Oersted/output/Integration/test_Circle/";
std::string SUB_DIR = "/Oersted/output/Integration/test_Circle/";
std::vector<std::shared_ptr<Curve>> boundaries;
......
......@@ -32,7 +32,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("sketch"));
BoundingBall bi = BoundingBall{0.0,0.0,1.0+FLT_EPSILON};
BoundingBall bo = BoundingBall{0.0,0.0,2.0+FLT_EPSILON};
......@@ -64,10 +64,10 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("mesh"));
me.save_as(SUB_DIR, std::string("mesh"));
}
std::string SAVE_DIR = "/Oersted/output/Integration/test_HalfAnnuli/";
std::string SUB_DIR = "/Oersted/output/Integration/test_HalfAnnuli/";
std::shared_ptr<Vertex> origin;
......@@ -140,8 +140,8 @@ public:
auto v = ms->recover_boundary(sol->v);
auto f = ms->recover_boundary(sol->f);
fem->write_scalar(v, SAVE_DIR, std::string("mihf") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(f, SAVE_DIR, std::string("mihf_J_") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(v, SUB_DIR, std::string("mihf") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(f, SUB_DIR, std::string("mihf_J_") + std::to_string(P) + std::to_string(Q));
test_mihf_solution(v, tol);
};
......@@ -260,8 +260,8 @@ public:
auto v = ms->recover_boundary(sol->v);
auto f = ms->recover_boundary(sol->f);
fem->write_scalar(v, SAVE_DIR, std::string("mcsf") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(f, SAVE_DIR, std::string("mcsf_J_") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(v, SUB_DIR, std::string("mcsf") + std::to_string(P) + std::to_string(Q));
fem->write_scalar(f, SUB_DIR, std::string("mcsf_J_") + std::to_string(P) + std::to_string(Q));
test_mcsf_solution(v, tol0, tol1, tol2, tolf);
};
......
......@@ -24,7 +24,7 @@ public:
bool result = sk.build();
ASSERT_TRUE(result);
sk.save_as<SaveMethod::Rasterize>(SAVE_DIR, std::string("sketch"));
sk.save_as<SaveMethod::Rasterize>(SUB_DIR, std::string("sketch"));
}
void SetUp_Mesh() {
......@@ -40,12 +40,12 @@ public:
bool result = me.refine();
ASSERT_TRUE(result);
me.save_as(SAVE_DIR, std::string("mesh"));
me.save_as(SUB_DIR, std::string("mesh"));
square_contour = me.select_contour(Point{0.5,0.5});
}
std::string SAVE_DIR = "/Oersted/test/output/Integration/test_Square/";
std::string SUB_DIR = "/Oersted/test/output/Integration/test_Square/";
std::vector<std::shared_ptr<Curve>> boundaries;
......
......@@ -21,7 +21,7 @@ TEST(Mesh, create_triangle_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
std::vector<size_t> vmap = map_verticies_to_points({v0, v1, v2}, m);
......@@ -86,7 +86,7 @@ TEST(Mesh, create_triangle_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_square_domain) {
......@@ -112,7 +112,7 @@ TEST(Mesh, create_square_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test number of verticies, edges, triangles
std::vector<size_t> vmap = map_verticies_to_points({v0, v1, v2, v3}, m);
......@@ -172,7 +172,7 @@ TEST(Mesh, create_square_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_narrow_diamond_domain) {
......@@ -198,7 +198,7 @@ TEST(Mesh, create_narrow_diamond_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test number of verticies, edges, triangles
EXPECT_TRUE(m.size_points() == 4);
......@@ -249,7 +249,7 @@ TEST(Mesh, create_narrow_diamond_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_narrow_rectangle_domain) {
......@@ -278,7 +278,7 @@ TEST(Mesh, create_narrow_rectangle_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test number of verticies, edges, triangles
EXPECT_TRUE(m.size_points() == 6);
......@@ -320,7 +320,7 @@ TEST(Mesh, create_narrow_rectangle_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_half_circle_domain) {
......@@ -343,7 +343,7 @@ TEST(Mesh, create_half_circle_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test number of verticies, edges, triangles
EXPECT_EQ(m.size_points(), 10);
......@@ -368,7 +368,7 @@ TEST(Mesh, create_half_circle_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_horseshoe_domain) {
......@@ -395,7 +395,7 @@ TEST(Mesh, create_horseshoe_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
{ // Test triangles, possibly redundant
for (size_t i = 0; i < m.size_edges(); ++i) {
......@@ -428,7 +428,7 @@ TEST(Mesh, create_horseshoe_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_three_layer_airgap) {
......@@ -496,7 +496,7 @@ TEST(Mesh, create_three_layer_airgap) {
sketch.build();
sketch.save_as<SaveMethod::Rasterize>(SAVE_DIR, "three_layer_airgap");
sketch.save_as<SaveMethod::Rasterize>(SUB_DIR, "three_layer_airgap");
Mesh mesh{sketch};
......@@ -538,7 +538,7 @@ TEST(Mesh, create_I_shaped_domain) {
double res_norm = s.solve();
EXPECT_LE(res_norm, FLT_EPSILON);
s.save_as<SaveMethod::Rasterize>(SAVE_DIR, test_name);
s.save_as<SaveMethod::Rasterize>(SUB_DIR, test_name);
bool result = s.build();
ASSERT_TRUE(result);
......@@ -549,7 +549,7 @@ TEST(Mesh, create_I_shaped_domain) {
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test validity, optimality
edges_are_valid(m);
......@@ -565,7 +565,7 @@ TEST(Mesh, create_I_shaped_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_corner_square_domain) {
......@@ -600,7 +600,7 @@ TEST(Mesh, create_corner_square_domain) {
Mesh m{s};
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
// Test number of vertices, edges, triangles
EXPECT_TRUE(m.num_points() == 9);
......@@ -626,7 +626,7 @@ TEST(Mesh, create_corner_square_domain) {
m.MinimumElementSize = 0.01;
m.MinimumElementQuality = 0.1;
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST(Mesh, create_square_in_square_domain) {
......@@ -659,7 +659,7 @@ TEST(Mesh, create_square_in_square_domain) {
bool result = s.build();
ASSERT_TRUE(result);
s.save_as<SaveMethod::Rasterize>(SAVE_DIR, test_name);
s.save_as<SaveMethod::Rasterize>(SUB_DIR, test_name);
Mesh m{s};
m.MaximumElementSize = 0.1;
......@@ -668,14 +668,14 @@ TEST(Mesh, create_square_in_square_domain) {
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
edges_are_valid(m);
edges_are_optimal(m);
m.refine();
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
class HalfCircleInSquare : public ::testing::Test {
......@@ -729,7 +729,7 @@ TEST_F(HalfCircleInSquare, create) {
Mesh m{s};
s.save_as<SaveMethod::Rasterize>(SAVE_DIR, test_name);
s.save_as<SaveMethod::Rasterize>(SUB_DIR, test_name);
m.MaximumElementSize = 0.1;
m.MinimumElementSize = 0.01;
......@@ -737,7 +737,7 @@ TEST_F(HalfCircleInSquare, create) {
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
edges_are_valid(m);
edges_are_optimal(m);
......@@ -747,7 +747,7 @@ TEST_F(HalfCircleInSquare, create) {
edges_are_valid(m);
edges_are_optimal(m);
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST_F(HalfCircleInSquare, uniform_circle) {
......@@ -758,7 +758,7 @@ TEST_F(HalfCircleInSquare, uniform_circle) {
bool result = s.build();
ASSERT_TRUE(result);
s.save_as<SaveMethod::Rasterize>(SAVE_DIR, test_name);
s.save_as<SaveMethod::Rasterize>(SUB_DIR, test_name);
Mesh m{s};
......@@ -771,7 +771,7 @@ TEST_F(HalfCircleInSquare, uniform_circle) {
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
edges_are_valid(m);
edges_are_optimal(m);
......@@ -785,7 +785,7 @@ TEST_F(HalfCircleInSquare, uniform_circle) {
EXPECT_TRUE(bc->is_uniform(m));
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
TEST_F(HalfCircleInSquare, mapped_boundary) {
......@@ -796,7 +796,7 @@ TEST_F(HalfCircleInSquare, mapped_boundary) {
bool result = s.build();
ASSERT_TRUE(result);
s.save_as<SaveMethod::Rasterize>(SAVE_DIR, test_name);
s.save_as<SaveMethod::Rasterize>(SUB_DIR, test_name);
ContinuousBoundaryPair cbp{l1,l3,false};
......@@ -810,7 +810,7 @@ TEST_F(HalfCircleInSquare, mapped_boundary) {
m.create();
m.save_as(SAVE_DIR, test_name + "_mesh");
m.save_as(SUB_DIR, test_name + "_mesh");
edges_are_valid(m);
edges_are_optimal(m);
......@@ -820,7 +820,7 @@ TEST_F(HalfCircleInSquare, mapped_boundary) {
edges_are_valid(m);
edges_are_optimal(m);
m.save_as(SAVE_DIR, test_name + "_mesh_refine_algorithm");
m.save_as(SUB_DIR, test_name + "_mesh_refine_algorithm");
}
/*
......@@ -1200,5 +1200,5 @@ TEST(Mesh, Discontinuous_CircularArc_Boundary) {
GTEST_FATAL_FAILURE_("Mesh creation fails with overlapping boundaries");
//me.create();
//me.save_as(SAVE_DIR, std::string("Discontinuous_CircularArc_Boundary"));
//me.save_as(SUB_DIR, std::string("Discontinuous_CircularArc_Boundary"));
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
#include "Mesh.hpp"
#include "Mest_Test_Utility.h"
#define SAVE_DIR "/test/output/Mesh/"
#define SUB_DIR "/Oersted/test/output/Mesh/"
#define TOL 4e-8
#endif //OERSTED_TEST_MESH_HPP
......@@ -89,7 +89,7 @@ void forced_refinement(Mesh &m, std::string file_name, size_t num_refines) {
catch (const std::exception except) {
throw;
}
m.save_as(SAVE_DIR, file_name + "_" + std::to_string(i));
m.save_as(SUB_DIR, file_name + "_" + std::to_string(i));
edges_are_valid(m);
edges_are_optimal(m);
......
......@@ -31,7 +31,7 @@ TEST_F(Distributed_Winding_Stator, basic_test) {
EXPECT_LE(sketch.solve(), 100e-3 * FLT_EPSILON);
sketch.save_as<SaveMethod::Rasterize>(SAVE_DIR,"Distributed_Winding_Stator");
sketch.save_as<SaveMethod::Rasterize>(SUB_DIR,"Distributed_Winding_Stator");
EXPECT_TRUE(sketch.build());
......@@ -41,5 +41,5 @@ TEST_F(Distributed_Winding_Stator, basic_test) {
mesh.MinimumElementQuality = 0.5;
EXPECT_TRUE(mesh.refine());
mesh.save_as(SAVE_DIR,"Distributed_Winding_Stator");
mesh.save_as(SUB_DIR,"Distributed_Winding_Stator");
}
\ No newline at end of file
......@@ -12,6 +12,6 @@
#include <random>
#define SAVE_DIR "/Oersted/test/output/Model Templates/"
#define SUB_DIR "/Oersted/test/output/Model Templates/"
#endif //OERSTED_TEST_MODELTEMPLATES_HPP
\ No newline at end of file
......@@ -694,11 +694,11 @@ TEST_F(Synchronous_Reluctance_Machine, test) {
create_sketch(model, params);
model.sketch.save_as<SaveMethod::Rasterize>(SAVE_DIR,"Synchronous_Reluctance_Machine");
model.sketch.save_as<SaveMethod::Rasterize>(SUB_DIR,"Synchronous_Reluctance_Machine");
create_mesh(model, params);
model.mesh.save_as(SAVE_DIR,"Synchronous_Reluctance_Machine");
model.mesh.save_as(SUB_DIR,"Synchronous_Reluctance_Machine");
create_physics(model,params);
......
......@@ -30,7 +30,7 @@ TEST_F(Synchronous_Reluctance_Rotor, basic_test) {
EXPECT_LE(sketch.solve(), 100e-3 * FLT_EPSILON); //TODO: CHECK CONVERGENCE TOLERANCE DURING SKETCH::SOLVE() TO REDUCE REQUIRED ITERATIONS
sketch.save_as<SaveMethod::Rasterize>(SAVE_DIR,"Synchronous_Reluctance_Rotor");
sketch.save_as<SaveMethod::Rasterize>(SUB_DIR,"Synchronous_Reluctance_Rotor");
EXPECT_TRUE(sketch.build());