Commit 3c94da51 authored by Pries, Jason's avatar Pries, Jason
Browse files

Don't pass shared_ptr by reference

parent 0abb4580
......@@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.2)
project(Oersted)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 --coverage -fopenmp")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -fopenmp")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 --coverage -fopenmp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -fopenmp")
include_directories(./lib/)
include_directories(./lib/Eigen/)
......
......@@ -40,7 +40,7 @@ set(SOURCE_FILES
./src/Constellation.h ./src/Constellation.cpp
./src/Contour.h ./src/Contour.cpp
src/BoundingBall.cpp src/BoundingBall.h)
src/BoundingBall.cpp src/BoundingBall.h src/CylindricalAirgap.cpp src/CylindricalAirgap.h)
add_library(sketch SHARED ${SOURCE_FILES})
......
......@@ -203,7 +203,7 @@ void Sketch::save_as<SaveMethod::Rasterize>(std::string path, std::string file_n
fs.close();
}
std::vector<PeriodicBoundaryPair> Sketch::select_periodic_boundary_pairs(std::shared_ptr<Vertex const> const &v0, double_t angle) const {
std::vector<PeriodicBoundaryPair> Sketch::select_periodic_boundary_pairs(std::shared_ptr<Vertex const> v0, double_t angle) const {
std::vector<PeriodicBoundaryPair> cbp;
std::vector<std::shared_ptr<Curve const>> bc = Boundary->curves();
......@@ -247,7 +247,7 @@ std::vector<PeriodicBoundaryPair> Sketch::select_periodic_boundary_pairs(std::sh
return cbp;
}
std::vector<std::shared_ptr<Curve const>> Sketch::select_radial_boundary(std::shared_ptr<Vertex const> const &v0, double_t radius) const {
std::vector<std::shared_ptr<Curve const>> Sketch::select_radial_boundary(std::shared_ptr<Vertex const> v0, double_t radius) const {
std::vector<std::shared_ptr<Curve const>> rb;
std::vector<std::shared_ptr<Curve const>> bc = Boundary->curves();
......@@ -262,7 +262,7 @@ std::vector<std::shared_ptr<Curve const>> Sketch::select_radial_boundary(std::sh
return rb;
}
std::shared_ptr<Vertex const> Sketch::select_periodic_vertex(std::shared_ptr<Vertex const> const &v, std::shared_ptr<Vertex const> const &origin, double_t angle) const {
std::shared_ptr<Vertex const> Sketch::select_periodic_vertex(std::shared_ptr<Vertex const> v, std::shared_ptr<Vertex const> origin, double_t angle) const {
for(auto const &v_test : Verticies) {
if (v_test->is_identical(v, origin, angle)) {
return v_test;
......
......@@ -43,9 +43,9 @@ public:
bool build(); // TODO: Detailed return enum
double characteristic_length() const;
double_t characteristic_length() const;
double solve(); // TODO: Detailed return enum
double_t solve(); // TODO: Detailed return enum
void add_element(std::shared_ptr<Constraint> c);
......@@ -57,7 +57,7 @@ public:
void add_parameter(std::shared_ptr<Variable> v) { add_parameter(Variables, v); };
void perturb(Eigen::VectorXd &delta, double scale) const;
void perturb(Eigen::VectorXd &delta, double_t scale) const;
void update_linearization(Eigen::MatrixXd &J, Eigen::VectorXd &r) const;
......@@ -83,11 +83,11 @@ public:
std::vector<std::shared_ptr<Curve const>> const curves() { return std::vector<std::shared_ptr<Curve const>>{Curves.begin(), Curves.end()}; };
std::vector<PeriodicBoundaryPair> select_periodic_boundary_pairs(std::shared_ptr<Vertex const> const &v0, double_t angle) const;
std::vector<PeriodicBoundaryPair> select_periodic_boundary_pairs(std::shared_ptr<Vertex const> v0, double_t angle) const;
std::vector<std::shared_ptr<Curve const>> select_radial_boundary(std::shared_ptr<Vertex const> const &v0, double_t radius) const;
std::vector<std::shared_ptr<Curve const>> select_radial_boundary(std::shared_ptr<Vertex const> v0, double_t radius) const;
std::shared_ptr<Vertex const> select_periodic_vertex(std::shared_ptr<Vertex const> const &v1, std::shared_ptr<Vertex const> const &origin, double_t angle) const;
std::shared_ptr<Vertex const> select_periodic_vertex(std::shared_ptr<Vertex const> v1, std::shared_ptr<Vertex const> origin, double_t angle) const;
std::vector<std::shared_ptr<Contour const>> select_contours(BoundingBall bb) const;
......
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