From 2b7fba1b0efd5931e28b7bf5ff4604d913ce075b Mon Sep 17 00:00:00 2001 From: Aik-Siong Koh Date: Thu, 30 Nov 2023 21:48:26 -0700 Subject: [PATCH] Edits for MacOS --- OndselSolver/FullColumn.cpp | 2 -- OndselSolver/MBDynBody.h | 2 +- OndselSolver/MBDynDrive.h | 2 +- OndselSolver/MBDynGravity.h | 2 +- OndselSolver/MBDynItem.cpp | 7 ++++++- OndselSolver/MBDynItem.h | 1 + OndselSolver/MBDynJoint.h | 2 +- OndselSolver/MBDynReference.h | 2 +- OndselSolver/MBDynStructural.h | 2 +- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/OndselSolver/FullColumn.cpp b/OndselSolver/FullColumn.cpp index ae0ee14..e689f73 100644 --- a/OndselSolver/FullColumn.cpp +++ b/OndselSolver/FullColumn.cpp @@ -9,7 +9,5 @@ #include #include "FullColumn.h" -#include "FullRow.h" -#include "FullMatrix.h" using namespace MbD; diff --git a/OndselSolver/MBDynBody.h b/OndselSolver/MBDynBody.h index f93df5a..2151fdc 100644 --- a/OndselSolver/MBDynBody.h +++ b/OndselSolver/MBDynBody.h @@ -14,7 +14,7 @@ namespace MbD { { public: void initialize() override; - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readMass(std::vector& args); void readInertiaMatrix(std::vector& args); void createASMT() override; diff --git a/OndselSolver/MBDynDrive.h b/OndselSolver/MBDynDrive.h index a4dad0a..31425e4 100644 --- a/OndselSolver/MBDynDrive.h +++ b/OndselSolver/MBDynDrive.h @@ -13,7 +13,7 @@ namespace MbD { class MBDynDrive : public MBDynElement { public: - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readFunction(std::vector& args); void createASMT() override; diff --git a/OndselSolver/MBDynGravity.h b/OndselSolver/MBDynGravity.h index 4dd9f0e..0ae1a80 100644 --- a/OndselSolver/MBDynGravity.h +++ b/OndselSolver/MBDynGravity.h @@ -13,7 +13,7 @@ namespace MbD { class MBDynGravity : public MBDynElement { public: - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readFunction(std::vector& args); void createASMT() override; diff --git a/OndselSolver/MBDynItem.cpp b/OndselSolver/MBDynItem.cpp index ffa1e0d..93d822c 100644 --- a/OndselSolver/MBDynItem.cpp +++ b/OndselSolver/MBDynItem.cpp @@ -34,6 +34,11 @@ void MbD::MBDynItem::parseMBDyn(std::vector& lines) assert(false); } +void MbD::MBDynItem::parseMBDyn(std::string line) +{ + assert(false); +} + std::vector MbD::MBDynItem::collectArgumentsFor(std::string title, std::string& statement) { size_t previousPos = 0; @@ -67,7 +72,7 @@ std::vector MbD::MBDynItem::collectArgumentsFor(std::string title, //Need to find matching '"' auto it = std::find_if(arguments.begin() + 1, arguments.end(), [](const std::string& s) { auto nn = std::count(s.begin(), s.end(), '"'); - if ((nn % 2) == 1) return true; + return (nn % 2) == 1; }); std::vector needToCombineArgs(arguments.begin(), it + 1); arguments.erase(arguments.begin(), it + 1); diff --git a/OndselSolver/MBDynItem.h b/OndselSolver/MBDynItem.h index a994c01..c8082ec 100644 --- a/OndselSolver/MBDynItem.h +++ b/OndselSolver/MBDynItem.h @@ -31,6 +31,7 @@ namespace MbD { void noop(); //void setName(std::string str); virtual void parseMBDyn(std::vector& lines); + virtual void parseMBDyn(std::string line); static std::vector collectArgumentsFor(std::string title, std::string& statement); std::vector::iterator findLineWith(std::vector& lines, std::vector& tokens); bool lineHasTokens(const std::string& line, std::vector& tokens); diff --git a/OndselSolver/MBDynJoint.h b/OndselSolver/MBDynJoint.h index be2f68e..ccca9a1 100644 --- a/OndselSolver/MBDynJoint.h +++ b/OndselSolver/MBDynJoint.h @@ -15,7 +15,7 @@ namespace MbD { { public: void initialize() override; - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readMarkerI(std::vector& args); void readMarkerJ(std::vector& args); void readClampMarkerJ(std::vector& args); diff --git a/OndselSolver/MBDynReference.h b/OndselSolver/MBDynReference.h index 5867816..dfe9f90 100644 --- a/OndselSolver/MBDynReference.h +++ b/OndselSolver/MBDynReference.h @@ -15,7 +15,7 @@ namespace MbD { { public: void initialize() override; - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readVelocity(std::vector& args); void readOmega(std::vector& args); diff --git a/OndselSolver/MBDynStructural.h b/OndselSolver/MBDynStructural.h index d38b3d3..542cd5b 100644 --- a/OndselSolver/MBDynStructural.h +++ b/OndselSolver/MBDynStructural.h @@ -14,7 +14,7 @@ namespace MbD { { public: MBDynStructural(); - void parseMBDyn(std::string line); + void parseMBDyn(std::string line) override; void readVelocity(std::vector& args); void readOmega(std::vector& args); void createASMT() override;