From b9ba0976f2b7620eeb64a4b8b54824dc3ce5395d Mon Sep 17 00:00:00 2001 From: Aik-Siong Koh Date: Tue, 9 Sep 2025 16:39:39 -0600 Subject: [PATCH] Replace assert(false) with throw SimulationStoppingError(To be implemented.) --- OndselSolver/ASMTAssembly.cpp | 16 +-- OndselSolver/ASMTForceTorque.cpp | 6 +- OndselSolver/ASMTItem.cpp | 20 +-- OndselSolver/ASMTItemIJ.cpp | 2 +- OndselSolver/ASMTMotion.cpp | 4 +- OndselSolver/ASMTPart.cpp | 2 +- OndselSolver/ASMTRefCurve.cpp | 4 +- OndselSolver/ASMTRefSurface.cpp | 4 +- OndselSolver/ASMTSpatialContainer.cpp | 8 +- OndselSolver/AccNewtonRaphson.cpp | 2 +- .../AllowZRotationConstraintIqctJqc.cpp | 2 +- OndselSolver/AngleZConstraintIJ.cpp | 2 +- OndselSolver/BasicIntegrator.cpp | 2 +- OndselSolver/ConstVelConstraintIJ.cpp | 4 +- OndselSolver/Constraint.cpp | 4 +- OndselSolver/DiagonalMatrix.h | 4 +- OndselSolver/DifferenceOperator.cpp | 2 +- OndselSolver/DistanceConstraintIJ.cpp | 2 +- OndselSolver/DistanceConstraintIqctJqc.cpp | 2 +- OndselSolver/DistancexyConstraintIJ.cpp | 2 +- OndselSolver/DistxyIecJec.cpp | 2 +- OndselSolver/EndFramec.cpp | 4 +- OndselSolver/EulerAngles.h | 4 +- OndselSolver/EulerParameters.h | 2 +- OndselSolver/ExternalSystem.cpp | 12 +- OndselSolver/FullColumn.h | 4 +- OndselSolver/FullMatrix.h | 7 +- OndselSolver/FullRow.h | 2 +- OndselSolver/FullVector.h | 9 +- OndselSolver/FunctionWithManyArgs.cpp | 2 +- OndselSolver/FunctionX.cpp | 8 +- OndselSolver/GEFullMat.cpp | 10 +- OndselSolver/GEFullMatFullPv.cpp | 2 +- OndselSolver/GEFullMatParPv.cpp | 4 +- OndselSolver/GESpMat.cpp | 6 +- OndselSolver/GESpMatFullPv.cpp | 2 +- OndselSolver/GESpMatParPvMarkoFast.cpp | 2 +- OndselSolver/GESpMatParPvPrecise.cpp | 2 +- OndselSolver/GearConstraintIJ.cpp | 2 +- OndselSolver/ICKineIntegrator.cpp | 10 +- OndselSolver/Integral.cpp | 2 +- OndselSolver/IntegratorInterface.cpp | 5 +- OndselSolver/Item.cpp | 122 +++++++++--------- OndselSolver/KineIntegrator.cpp | 10 +- OndselSolver/KinematicIeJe.cpp | 120 ++++++++--------- OndselSolver/LDUFullMat.cpp | 10 +- OndselSolver/LDUSpMat.cpp | 6 +- OndselSolver/LimitIJ.cpp | 2 +- OndselSolver/LinearMultiStepMethod.cpp | 6 +- OndselSolver/MatrixDecomposition.cpp | 14 +- OndselSolver/NewtonRaphson.cpp | 4 +- OndselSolver/PosICDragLimitNewtonRaphson.cpp | 2 +- OndselSolver/PosICNewtonRaphson.cpp | 2 +- OndselSolver/RackPinConstraintIJ.cpp | 6 +- OndselSolver/RedundantConstraint.cpp | 2 +- OndselSolver/ScalarNewtonRaphson.cpp | 2 +- OndselSolver/ScrewConstraintIJ.cpp | 6 +- OndselSolver/Solver.cpp | 15 ++- OndselSolver/StableBackwardDifference.cpp | 2 +- OndselSolver/Symbolic.cpp | 22 ++-- OndselSolver/SymbolicParser.cpp | 2 +- OndselSolver/SystemNewtonRaphson.cpp | 4 +- OndselSolver/SystemSolver.cpp | 6 +- OndselSolver/VectorNewtonRaphson.cpp | 6 +- OndselSolver/VelSolver.cpp | 2 +- 65 files changed, 287 insertions(+), 283 deletions(-) diff --git a/OndselSolver/ASMTAssembly.cpp b/OndselSolver/ASMTAssembly.cpp index 9e980f6..27e9054 100644 --- a/OndselSolver/ASMTAssembly.cpp +++ b/OndselSolver/ASMTAssembly.cpp @@ -659,7 +659,7 @@ void MbD::ASMTAssembly::readKinematicIJs(std::vector& lines) void MbD::ASMTAssembly::readKinematicIJ(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTAssembly::readConstraintSets(std::vector& lines) @@ -752,7 +752,7 @@ void MbD::ASMTAssembly::readJoints(std::vector& lines) joint = CREATE::With(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } jointsLines.erase(jointsLines.begin()); joint->parseASMT(jointsLines); @@ -787,7 +787,7 @@ void MbD::ASMTAssembly::readMotions(std::vector& lines) motion = CREATE::With(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } motionsLines.erase(motionsLines.begin()); motion->parseASMT(motionsLines); @@ -816,7 +816,7 @@ void MbD::ASMTAssembly::readLimits(std::vector& lines) limit = ASMTTranslationLimit::With(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } limitsLines.erase(limitsLines.begin()); limit->parseASMT(limitsLines); @@ -835,7 +835,7 @@ void MbD::ASMTAssembly::readGeneralConstraintSets(std::vector& line auto it = std::find(lines.begin(), lines.end(), "\tForceTorques"); std::vector generalConstraintSetsLines(lines.begin(), it); while (!generalConstraintSetsLines.empty()) { - assert(false); + throw SimulationStoppingError("To be implemented."); } lines.erase(lines.begin(), it); } @@ -856,7 +856,7 @@ void MbD::ASMTAssembly::readForcesTorques(std::vector& lines) forceTorque->owner = this; } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } lines.erase(lines.begin(), it); @@ -1092,7 +1092,7 @@ void MbD::ASMTAssembly::runDraggingLog(const std::string& fileName) void MbD::ASMTAssembly::outputFor(AnalysisType) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTAssembly::preMbDrun(std::shared_ptr mbdSys) @@ -1112,7 +1112,7 @@ void MbD::ASMTAssembly::preMbDrunDragStep(std::shared_ptr mbdSys, std::s void MbD::ASMTAssembly::postMbDrun() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTAssembly::calcCharacteristicDimensions() diff --git a/OndselSolver/ASMTForceTorque.cpp b/OndselSolver/ASMTForceTorque.cpp index a1c217d..7927575 100644 --- a/OndselSolver/ASMTForceTorque.cpp +++ b/OndselSolver/ASMTForceTorque.cpp @@ -12,15 +12,15 @@ using namespace MbD; void MbD::ASMTForceTorque::updateFromMbD() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTForceTorque::compareResults(AnalysisType) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTForceTorque::outputResults(AnalysisType) { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/ASMTItem.cpp b/OndselSolver/ASMTItem.cpp index f408475..b9f808e 100644 --- a/OndselSolver/ASMTItem.cpp +++ b/OndselSolver/ASMTItem.cpp @@ -53,7 +53,7 @@ void MbD::ASMTItem::setName(const std::string& str) void MbD::ASMTItem::parseASMT(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } std::string MbD::ASMTItem::popOffTop(std::vector& args) @@ -141,7 +141,7 @@ bool MbD::ASMTItem::readBool(const std::string& line) return false; } else { - assert(false); + throw SimulationStoppingError("To be implemented."); return false; } } @@ -188,37 +188,37 @@ void MbD::ASMTItem::deleteMbD() void MbD::ASMTItem::createMbD(std::shared_ptr, std::shared_ptr) { noop(); - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::updateForFrame([[maybe_unused]] size_t index) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::updateFromInitiallyAssembledState() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::updateFromInputState() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::updateFromMbD() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::compareResults(AnalysisType) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::outputResults(AnalysisType) { - assert(false); + throw SimulationStoppingError("To be implemented."); } std::shared_ptr MbD::ASMTItem::mbdUnits() @@ -301,7 +301,7 @@ void MbD::ASMTItem::storeOnLevelName(std::ofstream& os, size_t level) void MbD::ASMTItem::storeOnTimeSeries(std::ofstream&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTItem::logString(const std::string& str) diff --git a/OndselSolver/ASMTItemIJ.cpp b/OndselSolver/ASMTItemIJ.cpp index 89968d9..1adbd2e 100644 --- a/OndselSolver/ASMTItemIJ.cpp +++ b/OndselSolver/ASMTItemIJ.cpp @@ -175,6 +175,6 @@ void MbD::ASMTItemIJ::createMbD(std::shared_ptr mbdSys, std::shared_ptr< std::shared_ptr MbD::ASMTItemIJ::mbdClassNew() { - assert(false); + throw SimulationStoppingError("To be implemented."); return std::shared_ptr(); } diff --git a/OndselSolver/ASMTMotion.cpp b/OndselSolver/ASMTMotion.cpp index 79108c7..ffde5f0 100644 --- a/OndselSolver/ASMTMotion.cpp +++ b/OndselSolver/ASMTMotion.cpp @@ -36,12 +36,12 @@ void ASMTMotion::initMarkers() void ASMTMotion::storeOnLevel(std::ofstream&, size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void ASMTMotion::storeOnTimeSeries(std::ofstream&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTMotion::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) diff --git a/OndselSolver/ASMTPart.cpp b/OndselSolver/ASMTPart.cpp index d34e9db..c6fc6d1 100644 --- a/OndselSolver/ASMTPart.cpp +++ b/OndselSolver/ASMTPart.cpp @@ -55,7 +55,7 @@ void MbD::ASMTPart::readFeatureOrder(std::vector& lines) // extrusion->owner = this; // } // else { - // assert(false); + // throw SimulationStoppingError("To be implemented."); // } //} lines.erase(lines.begin(), it); diff --git a/OndselSolver/ASMTRefCurve.cpp b/OndselSolver/ASMTRefCurve.cpp index f418be9..2c766b1 100644 --- a/OndselSolver/ASMTRefCurve.cpp +++ b/OndselSolver/ASMTRefCurve.cpp @@ -13,10 +13,10 @@ using namespace MbD; void MbD::ASMTRefCurve::parseASMT(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTRefCurve::storeOnLevel(std::ofstream&, size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/ASMTRefSurface.cpp b/OndselSolver/ASMTRefSurface.cpp index 2f02744..e54d34e 100644 --- a/OndselSolver/ASMTRefSurface.cpp +++ b/OndselSolver/ASMTRefSurface.cpp @@ -13,10 +13,10 @@ using namespace MbD; void MbD::ASMTRefSurface::parseASMT(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTRefSurface::storeOnLevel(std::ofstream&, size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/ASMTSpatialContainer.cpp b/OndselSolver/ASMTSpatialContainer.cpp index 27dee14..9326dba 100644 --- a/OndselSolver/ASMTSpatialContainer.cpp +++ b/OndselSolver/ASMTSpatialContainer.cpp @@ -119,7 +119,7 @@ void MbD::ASMTSpatialContainer::readRefCurves(std::vector& lines) void MbD::ASMTSpatialContainer::readRefCurve(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTSpatialContainer::readRefSurfaces(std::vector& lines) @@ -139,7 +139,7 @@ void MbD::ASMTSpatialContainer::readRefSurfaces(std::vector& lines) void MbD::ASMTSpatialContainer::readRefSurface(std::vector&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ASMTSpatialContainer::readXs(std::vector& lines) @@ -345,13 +345,13 @@ std::shared_ptr> MbD::ASMTSpatialContainer::qEp() FColDsptr MbD::ASMTSpatialContainer::vOcmO() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } FColDsptr MbD::ASMTSpatialContainer::omeOpO() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } diff --git a/OndselSolver/AccNewtonRaphson.cpp b/OndselSolver/AccNewtonRaphson.cpp index a690141..588d0fe 100644 --- a/OndselSolver/AccNewtonRaphson.cpp +++ b/OndselSolver/AccNewtonRaphson.cpp @@ -136,7 +136,7 @@ void MbD::AccNewtonRaphson::handleSingularMatrix() this->logSingularMatrixMessage(); matrixSolver->throwSingularMatrixError("AccAccNewtonRaphson"); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } } diff --git a/OndselSolver/AllowZRotationConstraintIqctJqc.cpp b/OndselSolver/AllowZRotationConstraintIqctJqc.cpp index e72851a..b1f8c1f 100644 --- a/OndselSolver/AllowZRotationConstraintIqctJqc.cpp +++ b/OndselSolver/AllowZRotationConstraintIqctJqc.cpp @@ -50,7 +50,7 @@ void MbD::AllowZRotationConstraintIqctJqc::postInput() void MbD::AllowZRotationConstraintIqctJqc::postPosIC() { //self becomeRedundantConstraint - assert(false); + throw SimulationStoppingError("To be implemented."); } std::string MbD::AllowZRotationConstraintIqctJqc::constraintSpec() diff --git a/OndselSolver/AngleZConstraintIJ.cpp b/OndselSolver/AngleZConstraintIJ.cpp index 2e6a271..01d039d 100644 --- a/OndselSolver/AngleZConstraintIJ.cpp +++ b/OndselSolver/AngleZConstraintIJ.cpp @@ -33,7 +33,7 @@ void MbD::AngleZConstraintIJ::calcPostDynCorrectorIteration() void MbD::AngleZConstraintIJ::initthezIeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::AngleZConstraintIJ::initialize() diff --git a/OndselSolver/BasicIntegrator.cpp b/OndselSolver/BasicIntegrator.cpp index 5bbe0bc..e7f9b1b 100644 --- a/OndselSolver/BasicIntegrator.cpp +++ b/OndselSolver/BasicIntegrator.cpp @@ -76,7 +76,7 @@ void BasicIntegrator::incrementTime() void BasicIntegrator::incrementTry() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void BasicIntegrator::initialize() diff --git a/OndselSolver/ConstVelConstraintIJ.cpp b/OndselSolver/ConstVelConstraintIJ.cpp index 72dc7fc..1a7b02e 100644 --- a/OndselSolver/ConstVelConstraintIJ.cpp +++ b/OndselSolver/ConstVelConstraintIJ.cpp @@ -34,12 +34,12 @@ void ConstVelConstraintIJ::calcPostDynCorrectorIteration() void MbD::ConstVelConstraintIJ::initA01IeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ConstVelConstraintIJ::initA10IeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void ConstVelConstraintIJ::initialize() diff --git a/OndselSolver/Constraint.cpp b/OndselSolver/Constraint.cpp index 7f067b2..dffa648 100644 --- a/OndselSolver/Constraint.cpp +++ b/OndselSolver/Constraint.cpp @@ -112,7 +112,7 @@ void Constraint::fillPosICError(FColDsptr col) void Constraint::removeRedundantConstraints(std::shared_ptr>) { //My owner should handle this. - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Constraint::setConstant(double value) @@ -123,7 +123,7 @@ void MbD::Constraint::setConstant(double value) void Constraint::reactivateRedundantConstraints() { //My owner should handle this. - assert(false); + throw SimulationStoppingError("To be implemented."); } bool Constraint::isRedundant() diff --git a/OndselSolver/DiagonalMatrix.h b/OndselSolver/DiagonalMatrix.h index b8efb97..90cbb75 100644 --- a/OndselSolver/DiagonalMatrix.h +++ b/OndselSolver/DiagonalMatrix.h @@ -68,7 +68,7 @@ namespace MbD { template inline DiagMatsptr DiagonalMatrix::times(T) { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline FColsptr DiagonalMatrix::timesFullColumn(FColsptr fullCol) @@ -133,7 +133,7 @@ namespace MbD { template inline double DiagonalMatrix::maxMagnitude() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } template diff --git a/OndselSolver/DifferenceOperator.cpp b/OndselSolver/DifferenceOperator.cpp index fb457bc..0c7c638 100644 --- a/OndselSolver/DifferenceOperator.cpp +++ b/OndselSolver/DifferenceOperator.cpp @@ -47,7 +47,7 @@ void DifferenceOperator::initialize() void MbD::DifferenceOperator::initializeLocally() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void DifferenceOperator::setiStep(size_t i) diff --git a/OndselSolver/DistanceConstraintIJ.cpp b/OndselSolver/DistanceConstraintIJ.cpp index 7a36a40..3fece7f 100644 --- a/OndselSolver/DistanceConstraintIJ.cpp +++ b/OndselSolver/DistanceConstraintIJ.cpp @@ -32,7 +32,7 @@ aG = distIeJe->value() - aConstant; void MbD::DistanceConstraintIJ::init_distIeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::DistanceConstraintIJ::initialize() diff --git a/OndselSolver/DistanceConstraintIqctJqc.cpp b/OndselSolver/DistanceConstraintIqctJqc.cpp index 2808dcf..07768d4 100644 --- a/OndselSolver/DistanceConstraintIqctJqc.cpp +++ b/OndselSolver/DistanceConstraintIqctJqc.cpp @@ -12,7 +12,7 @@ using namespace MbD; MbD::DistanceConstraintIqctJqc::DistanceConstraintIqctJqc(EndFrmsptr frmi, EndFrmsptr frmj) : DistanceConstraintIqcJqc(frmi, frmj) { - assert(false); + throw SimulationStoppingError("To be implemented."); } ConstraintType MbD::DistanceConstraintIqctJqc::type() diff --git a/OndselSolver/DistancexyConstraintIJ.cpp b/OndselSolver/DistancexyConstraintIJ.cpp index 62b8e9c..ea3c191 100644 --- a/OndselSolver/DistancexyConstraintIJ.cpp +++ b/OndselSolver/DistancexyConstraintIJ.cpp @@ -34,7 +34,7 @@ void MbD::DistancexyConstraintIJ::calcPostDynCorrectorIteration() void MbD::DistancexyConstraintIJ::init_xyIeJeIe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::DistancexyConstraintIJ::initialize() diff --git a/OndselSolver/DistxyIecJec.cpp b/OndselSolver/DistxyIecJec.cpp index d380d64..5e6d282 100644 --- a/OndselSolver/DistxyIecJec.cpp +++ b/OndselSolver/DistxyIecJec.cpp @@ -45,7 +45,7 @@ void MbD::DistxyIecJec::initializeLocally() void MbD::DistxyIecJec::init_xyIeJeIe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::DistxyIecJec::postInput() diff --git a/OndselSolver/EndFramec.cpp b/OndselSolver/EndFramec.cpp index 660fb9b..877e5e8 100644 --- a/OndselSolver/EndFramec.cpp +++ b/OndselSolver/EndFramec.cpp @@ -52,12 +52,12 @@ void EndFramec::initializeLocally() void EndFramec::initEndFrameqct() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::EndFramec::initEndFrameqct2() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void EndFramec::calcPostDynCorrectorIteration() diff --git a/OndselSolver/EulerAngles.h b/OndselSolver/EulerAngles.h index abc6c38..61d0dfe 100644 --- a/OndselSolver/EulerAngles.h +++ b/OndselSolver/EulerAngles.h @@ -40,7 +40,7 @@ namespace MbD { template inline void EulerAngles::initialize() { - assert(false); + throw SimulationStoppingError("To be implemented."); } template<> inline void EulerAngles::calc() @@ -91,7 +91,7 @@ namespace MbD { template inline void EulerAngles::calc() { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline std::shared_ptr> EulerAngles::differentiateWRT(T var) diff --git a/OndselSolver/EulerParameters.h b/OndselSolver/EulerParameters.h index 8df4a14..ab5f187 100644 --- a/OndselSolver/EulerParameters.h +++ b/OndselSolver/EulerParameters.h @@ -383,7 +383,7 @@ inline std::shared_ptr> EulerParameters::times(d template inline std::shared_ptr> EulerParameters::times(T) { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline std::shared_ptr> diff --git a/OndselSolver/ExternalSystem.cpp b/OndselSolver/ExternalSystem.cpp index 693f1e7..ea9e34a 100644 --- a/OndselSolver/ExternalSystem.cpp +++ b/OndselSolver/ExternalSystem.cpp @@ -27,7 +27,7 @@ void MbD::ExternalSystem::preMbDrun(std::shared_ptr mbdSys) //freecadAssemblyObject->preMbDrun(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } @@ -48,7 +48,7 @@ void MbD::ExternalSystem::updateFromMbD() //freecadAssemblyObject->updateFromMbD(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } @@ -67,7 +67,7 @@ void MbD::ExternalSystem::outputFor(AnalysisType type) //freecadAssemblyObject->outputResults(type); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } @@ -78,17 +78,17 @@ void MbD::ExternalSystem::logString(const std::string& str) void MbD::ExternalSystem::logString(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ExternalSystem::runOndselPiston() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ExternalSystem::runPiston() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ExternalSystem::postMbDrun() diff --git a/OndselSolver/FullColumn.h b/OndselSolver/FullColumn.h index 936968d..a67e8a4 100644 --- a/OndselSolver/FullColumn.h +++ b/OndselSolver/FullColumn.h @@ -89,7 +89,7 @@ namespace MbD { template inline FColsptr FullColumn::times(T) { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline FColsptr FullColumn::negated() @@ -204,7 +204,7 @@ namespace MbD { template inline FColsptr FullColumn::simplified() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColsptr(); } template diff --git a/OndselSolver/FullMatrix.h b/OndselSolver/FullMatrix.h index f8e5fc7..a2c7962 100644 --- a/OndselSolver/FullMatrix.h +++ b/OndselSolver/FullMatrix.h @@ -15,6 +15,7 @@ #include "RowTypeMatrix.h" #include "FullColumn.h" #include "FullRow.h" +#include "SimulationStoppingError.h" namespace MbD { template @@ -395,7 +396,7 @@ namespace MbD { template inline FMatsptr FullMatrix::times(T) { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline FMatsptr FullMatrix::transposeTimesFullMatrix(FMatsptr fullMat) @@ -499,13 +500,13 @@ namespace MbD { template inline double FullMatrix::sumOfSquares() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } template inline void FullMatrix::zeroSelf() { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline FMatsptr FullMatrix::copy() diff --git a/OndselSolver/FullRow.h b/OndselSolver/FullRow.h index cf049af..54ff9f4 100644 --- a/OndselSolver/FullRow.h +++ b/OndselSolver/FullRow.h @@ -71,7 +71,7 @@ namespace MbD { template inline FRowsptr FullRow::times(T) { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline FRowsptr FullRow::negated() diff --git a/OndselSolver/FullVector.h b/OndselSolver/FullVector.h index 73f7bb9..2223adf 100644 --- a/OndselSolver/FullVector.h +++ b/OndselSolver/FullVector.h @@ -11,6 +11,7 @@ #include #include "Array.h" +#include "SimulationStoppingError.h" namespace MbD { template @@ -80,7 +81,7 @@ namespace MbD { template inline double FullVector::sumOfSquares() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } template @@ -98,7 +99,7 @@ namespace MbD { template inline void FullVector::zeroSelf() { - assert(false); + throw SimulationStoppingError("To be implemented."); } template inline void FullVector::atiplusFullVector(size_t i1, std::shared_ptr> fullVec) @@ -141,7 +142,7 @@ namespace MbD { template inline double FullVector::maxMagnitude() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } template<> @@ -190,7 +191,7 @@ namespace MbD { inline std::shared_ptr> FullVector::clonesptr() { //Return shallow copy of *this wrapped in shared_ptr - assert(false); + throw SimulationStoppingError("To be implemented."); return std::make_shared>(*this); } template diff --git a/OndselSolver/FunctionWithManyArgs.cpp b/OndselSolver/FunctionWithManyArgs.cpp index d89c56b..87c1706 100644 --- a/OndselSolver/FunctionWithManyArgs.cpp +++ b/OndselSolver/FunctionWithManyArgs.cpp @@ -49,7 +49,7 @@ void MbD::FunctionWithManyArgs::createMbD(std::shared_ptr mbdSys, std::s void MbD::FunctionWithManyArgs::arguments(Symsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } bool MbD::FunctionWithManyArgs::isConstant() diff --git a/OndselSolver/FunctionX.cpp b/OndselSolver/FunctionX.cpp index 289ea46..e453631 100644 --- a/OndselSolver/FunctionX.cpp +++ b/OndselSolver/FunctionX.cpp @@ -33,7 +33,7 @@ void MbD::FunctionX::arguments(Symsptr args) Symsptr MbD::FunctionX::copyWith(Symsptr arg) { - assert(false); + throw SimulationStoppingError("To be implemented."); return Symsptr(); } @@ -75,7 +75,7 @@ Symsptr MbD::FunctionX::differentiateWRT(Symsptr var) Symsptr MbD::FunctionX::differentiateWRTx() { - assert(false); + throw SimulationStoppingError("To be implemented."); return Symsptr(); } @@ -86,7 +86,7 @@ void MbD::FunctionX::createMbD(std::shared_ptr mbdSys, std::shared_ptrsetValue(oldVal); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } return answer; } diff --git a/OndselSolver/GEFullMat.cpp b/OndselSolver/GEFullMat.cpp index a02516f..afe470b 100644 --- a/OndselSolver/GEFullMat.cpp +++ b/OndselSolver/GEFullMat.cpp @@ -14,7 +14,7 @@ using namespace MbD; void GEFullMat::forwardEliminateWithPivot(size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GEFullMat::backSubstituteIntoDU() @@ -35,17 +35,17 @@ void GEFullMat::backSubstituteIntoDU() void GEFullMat::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GEFullMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GEFullMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } double GEFullMat::getmatrixArowimaxMagnitude(size_t i) @@ -68,6 +68,6 @@ FColDsptr GEFullMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr ful FColDsptr GEFullMat::basicSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } diff --git a/OndselSolver/GEFullMatFullPv.cpp b/OndselSolver/GEFullMatFullPv.cpp index 7722934..7f5946c 100644 --- a/OndselSolver/GEFullMatFullPv.cpp +++ b/OndselSolver/GEFullMatFullPv.cpp @@ -55,5 +55,5 @@ void GEFullMatFullPv::doPivoting(size_t p) void GEFullMatFullPv::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/GEFullMatParPv.cpp b/OndselSolver/GEFullMatParPv.cpp index 4ee5d01..d5ed681 100644 --- a/OndselSolver/GEFullMatParPv.cpp +++ b/OndselSolver/GEFullMatParPv.cpp @@ -46,10 +46,10 @@ void GEFullMatParPv::doPivoting(size_t p) void GEFullMatParPv::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GEFullMatParPv::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/GESpMat.cpp b/OndselSolver/GESpMat.cpp index 83ab84f..0141e8f 100644 --- a/OndselSolver/GESpMat.cpp +++ b/OndselSolver/GESpMat.cpp @@ -33,18 +33,18 @@ FColDsptr GESpMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCo FColDsptr GESpMat::basicSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } void GESpMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GESpMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } double GESpMat::getmatrixArowimaxMagnitude(size_t i) diff --git a/OndselSolver/GESpMatFullPv.cpp b/OndselSolver/GESpMatFullPv.cpp index 7cd8e2d..e225639 100644 --- a/OndselSolver/GESpMatFullPv.cpp +++ b/OndselSolver/GESpMatFullPv.cpp @@ -140,7 +140,7 @@ void GESpMatFullPv::backSubstituteIntoDU() void GESpMatFullPv::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void GESpMatFullPv::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) diff --git a/OndselSolver/GESpMatParPvMarkoFast.cpp b/OndselSolver/GESpMatParPvMarkoFast.cpp index 864e82a..fb72e15 100644 --- a/OndselSolver/GESpMatParPvMarkoFast.cpp +++ b/OndselSolver/GESpMatParPvMarkoFast.cpp @@ -16,7 +16,7 @@ using namespace MbD; void GESpMatParPvMarkoFast::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) { - //assert(false); + //throw SimulationStoppingError("To be implemented."); //"Optimized for speed." if (m != spMat->nrow() || n != spMat->ncol()) { m = spMat->nrow(); diff --git a/OndselSolver/GESpMatParPvPrecise.cpp b/OndselSolver/GESpMatParPvPrecise.cpp index b0f9000..106a31a 100644 --- a/OndselSolver/GESpMatParPvPrecise.cpp +++ b/OndselSolver/GESpMatParPvPrecise.cpp @@ -78,7 +78,7 @@ void GESpMatParPvPrecise::doPivoting(size_t p) void GESpMatParPvPrecise::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) { - //assert(false); + //throw SimulationStoppingError("To be implemented."); //"A conditioned copy of aMatrix is solved." if (m != spMat->nrow() || n != spMat->ncol()) { m = spMat->nrow(); diff --git a/OndselSolver/GearConstraintIJ.cpp b/OndselSolver/GearConstraintIJ.cpp index 26eb8ed..02e777a 100644 --- a/OndselSolver/GearConstraintIJ.cpp +++ b/OndselSolver/GearConstraintIJ.cpp @@ -50,7 +50,7 @@ void MbD::GearConstraintIJ::initializeLocally() void MbD::GearConstraintIJ::initorbitsIJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::GearConstraintIJ::postInput() diff --git a/OndselSolver/ICKineIntegrator.cpp b/OndselSolver/ICKineIntegrator.cpp index 1fdfcd4..aa0dc72 100644 --- a/OndselSolver/ICKineIntegrator.cpp +++ b/OndselSolver/ICKineIntegrator.cpp @@ -20,12 +20,12 @@ void ICKineIntegrator::runInitialConditionTypeSolution() void ICKineIntegrator::iStep(size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void ICKineIntegrator::selectOrder() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void ICKineIntegrator::preRun() @@ -36,15 +36,15 @@ void ICKineIntegrator::preRun() void ICKineIntegrator::firstStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void ICKineIntegrator::subsequentSteps() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ICKineIntegrator::nextStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/Integral.cpp b/OndselSolver/Integral.cpp index 51b70df..1d0ddde 100644 --- a/OndselSolver/Integral.cpp +++ b/OndselSolver/Integral.cpp @@ -8,7 +8,7 @@ MbD::Integral::Integral(Symsptr arg) : ExpressionX(arg) MbD::Integral::Integral(Symsptr, Symsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Integral::arguments(Symsptr args) diff --git a/OndselSolver/IntegratorInterface.cpp b/OndselSolver/IntegratorInterface.cpp index af6b3a0..5bafd42 100644 --- a/OndselSolver/IntegratorInterface.cpp +++ b/OndselSolver/IntegratorInterface.cpp @@ -11,6 +11,7 @@ #include "IntegratorInterface.h" #include "SystemSolver.h" #include "BasicQuasiIntegrator.h" +#include "SimulationStoppingError.h" using namespace MbD; @@ -60,7 +61,7 @@ void IntegratorInterface::incrementTime(double tnew) void IntegratorInterface::postFirstStep() { - assert(false); //Not used. + throw SimulationStoppingError("To be implemented."); //Not used. //system->postFirstStep(); //if (integrator->istep > 0) { // //"Noise make checking at the start unreliable." @@ -72,7 +73,7 @@ void IntegratorInterface::postFirstStep() void IntegratorInterface::interpolateAt(double) { //"Interpolate for system state at tArg and leave system in that state." - assert(false); + throw SimulationStoppingError("To be implemented."); //auto yout = integrator->yDerivat(0, tArg); //auto ydotout = integrator->yDerivat(1, tArg); //auto yddotout = integrator->yDerivat(2, tArg); diff --git a/OndselSolver/Item.cpp b/OndselSolver/Item.cpp index 4435d5d..994a253 100644 --- a/OndselSolver/Item.cpp +++ b/OndselSolver/Item.cpp @@ -56,25 +56,25 @@ void Item::initializeLocally() bool MbD::Item::isJointForce() { - assert(false); + throw SimulationStoppingError("To be implemented."); return false; } bool MbD::Item::isJointTorque() { - assert(false); + throw SimulationStoppingError("To be implemented."); return false; } bool MbD::Item::isKinedotIJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return false; } bool MbD::Item::isKineIJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return false; } @@ -94,7 +94,7 @@ void Item::calcPostDynCorrectorIteration() void MbD::Item::checkForCollisionDiscontinuityBetweenand(double, double) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::removeRedundantConstraints(std::shared_ptr>) @@ -103,17 +103,17 @@ void Item::removeRedundantConstraints(std::shared_ptr>) void MbD::Item::setpqsumu(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::setpqsumuddot(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::setpqsumudot(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::reactivateRedundantConstraints() @@ -122,7 +122,7 @@ void Item::reactivateRedundantConstraints() void MbD::Item::registerName() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillPosKineError(FColDsptr) @@ -135,32 +135,32 @@ void Item::fillPosKineJacob(SpMatDsptr) void MbD::Item::fillpqsumu(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillpqsumudot(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillEssenConstraints(std::shared_ptr>>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillPerpenConstraints(std::shared_ptr>>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillpFpy(SpMatDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillpFpydot(SpMatDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillRedundantConstraints(std::shared_ptr>>) @@ -169,27 +169,27 @@ void Item::fillRedundantConstraints(std::shared_ptr>>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillDispConstraints(std::shared_ptr>>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillDynError(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillqsu(FColDsptr) @@ -210,7 +210,7 @@ void Item::setqsulam(FColDsptr) void MbD::Item::simUpdateAll() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::preDyn() @@ -225,12 +225,12 @@ void Item::preDyn() void MbD::Item::preDynCorrector() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preDynCorrectorIteration() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::postDyn() @@ -245,12 +245,12 @@ void Item::postDyn() void MbD::Item::postDynCorrector() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postDynCorrectorIteration() { - assert(false); + throw SimulationStoppingError("To be implemented."); } std::string Item::classname() @@ -268,12 +268,12 @@ void Item::preDynFirstStep() void MbD::Item::preDynOutput() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preDynPredictor() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::postDynFirstStep() @@ -283,12 +283,12 @@ void Item::postDynFirstStep() void MbD::Item::postDynOutput() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postDynPredictor() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::preDynStep() @@ -297,7 +297,7 @@ void Item::preDynStep() void MbD::Item::preICRestart() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::postDynStep() @@ -313,13 +313,13 @@ void Item::storeDynState() double MbD::Item::suggestSmallerOrAcceptCollisionFirstStepSize(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } double MbD::Item::suggestSmallerOrAcceptCollisionStepSize(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } @@ -357,12 +357,12 @@ void Item::fillqsudot(FColDsptr) void MbD::Item::fillqsudotPlam(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillqsudotPlamDeriv(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillqsudotWeights(DiagMatDsptr) @@ -383,12 +383,12 @@ void Item::setqsudotlam(FColDsptr) void MbD::Item::setqsudotPlam(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::setqsudotPlamDeriv(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::preAccIC() @@ -398,32 +398,32 @@ void Item::preAccIC() void MbD::Item::preCollision() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preCollisionCorrector() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preCollisionCorrectorIteration() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preCollisionDerivativeIC() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preCollisionPredictor() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::preCollisionStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::postAccIC() @@ -436,27 +436,27 @@ void Item::postAccICIteration() void MbD::Item::postCollisionCorrector() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postCollisionCorrectorIteration() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postCollisionDerivativeIC() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postCollisionPredictor() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postCollisionStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillqsuddotlam(FColDsptr) @@ -473,27 +473,27 @@ void Item::fillAccICIterJacob(SpMatDsptr) void MbD::Item::fillCollisionDerivativeICError(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillCollisionDerivativeICJacob(SpMatDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillCollisionError(FColDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillCollisionpFpy(SpMatDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::fillCollisionpFpydot(SpMatDsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::setqsudot(FColDsptr) @@ -506,13 +506,13 @@ void Item::setqsuddotlam(FColDsptr) std::shared_ptr Item::stateData() { - assert(false); + throw SimulationStoppingError("To be implemented."); return std::shared_ptr(); } void MbD::Item::storeCollisionState() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::discontinuityAtaddTypeTo(double, std::shared_ptr>) @@ -521,7 +521,7 @@ void Item::discontinuityAtaddTypeTo(double, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } double Item::checkForDynDiscontinuityBetweenand(double, double t) @@ -551,17 +551,17 @@ void Item::logString(const std::string& str) void MbD::Item::logStringwithArgument(const std::string&, const std::string&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::logStringwithArguments(const std::string&, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::normalImpulse(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::prePosIC() @@ -580,7 +580,7 @@ void Item::prePosKine() void MbD::Item::preStatic() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::postPosIC() @@ -594,12 +594,12 @@ void Item::postPosICIteration() void MbD::Item::postStatic() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Item::postStaticIteration() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Item::fillPosICError(FColDsptr) diff --git a/OndselSolver/KineIntegrator.cpp b/OndselSolver/KineIntegrator.cpp index 709d8b1..a4755a9 100644 --- a/OndselSolver/KineIntegrator.cpp +++ b/OndselSolver/KineIntegrator.cpp @@ -22,17 +22,17 @@ void KineIntegrator::preRun() void KineIntegrator::firstStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void KineIntegrator::subsequentSteps() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void KineIntegrator::nextStep() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void KineIntegrator::runInitialConditionTypeSolution() @@ -44,10 +44,10 @@ void KineIntegrator::runInitialConditionTypeSolution() void KineIntegrator::iStep(size_t) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void KineIntegrator::selectOrder() { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/KinematicIeJe.cpp b/OndselSolver/KinematicIeJe.cpp index 8f3f2e5..db13bd5 100644 --- a/OndselSolver/KinematicIeJe.cpp +++ b/OndselSolver/KinematicIeJe.cpp @@ -26,330 +26,330 @@ bool MbD::KinematicIeJe::isKineIJ() void MbD::KinematicIeJe::calc_pvaluepXI() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluepEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpXI() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEIpEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluepXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluepEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEIpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEIpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXJpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXJpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEJpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluepXK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluepEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEIpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXJpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEJpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEKpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_pvaluept() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvalueptpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_value() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXIpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEIpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXJpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEJpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepXKpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::KinematicIeJe::calc_ppvaluepEKpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); } FRowDsptr MbD::KinematicIeJe::pvaluepXI() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::pvaluepEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXIpXI() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXIpEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEIpEI() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FRowDsptr MbD::KinematicIeJe::pvaluepXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::pvaluepEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXIpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXIpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEIpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEIpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXJpXJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXJpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEJpEJ() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FRowDsptr MbD::KinematicIeJe::pvaluepXK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::pvaluepEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXIpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEIpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepXJpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEJpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } FMatDsptr MbD::KinematicIeJe::ppvaluepEKpEK() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FMatDsptr(); } double MbD::KinematicIeJe::pvaluept() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } double MbD::KinematicIeJe::ppvalueptpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } FRowDsptr MbD::KinematicIeJe::ppvaluepXIpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::ppvaluepEIpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::ppvaluepXJpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::ppvaluepEJpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::ppvaluepXKpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } FRowDsptr MbD::KinematicIeJe::ppvaluepEKpt() { - assert(false); + throw SimulationStoppingError("To be implemented."); return FRowDsptr(); } double MbD::KinematicIeJe::value() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } diff --git a/OndselSolver/LDUFullMat.cpp b/OndselSolver/LDUFullMat.cpp index e56ee62..8c39111 100644 --- a/OndselSolver/LDUFullMat.cpp +++ b/OndselSolver/LDUFullMat.cpp @@ -19,18 +19,18 @@ FColDsptr LDUFullMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fu FColDsptr LDUFullMat::basicSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } void LDUFullMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void LDUFullMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void LDUFullMat::forwardEliminateWithPivot(size_t p) @@ -57,7 +57,7 @@ void LDUFullMat::forwardEliminateWithPivot(size_t p) void LDUFullMat::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void LDUFullMat::preSolvesaveOriginal(FMatDsptr fullMat, bool saveOriginal) @@ -107,7 +107,7 @@ void LDUFullMat::decomposesaveOriginal(FMatDsptr fullMat, bool saveOriginal) void LDUFullMat::decomposesaveOriginal(SpMatDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } FMatDsptr LDUFullMat::inversesaveOriginal(FMatDsptr fullMat, bool saveOriginal) diff --git a/OndselSolver/LDUSpMat.cpp b/OndselSolver/LDUSpMat.cpp index 9efabc7..a866fde 100644 --- a/OndselSolver/LDUSpMat.cpp +++ b/OndselSolver/LDUSpMat.cpp @@ -20,17 +20,17 @@ FColDsptr LDUSpMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullC void LDUSpMat::decomposesaveOriginal(FMatDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void LDUSpMat::decomposesaveOriginal(SpMatDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } FColDsptr LDUSpMat::forAndBackSubsaveOriginal(FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } diff --git a/OndselSolver/LimitIJ.cpp b/OndselSolver/LimitIJ.cpp index 3d48759..7b499cc 100644 --- a/OndselSolver/LimitIJ.cpp +++ b/OndselSolver/LimitIJ.cpp @@ -12,7 +12,7 @@ bool MbD::LimitIJ::satisfied() const else if (type == "=>") { return constraint->aG > -tol; } - assert(false); + throw SimulationStoppingError("To be implemented."); return true; } diff --git a/OndselSolver/LinearMultiStepMethod.cpp b/OndselSolver/LinearMultiStepMethod.cpp index 44b0efd..29024b4 100644 --- a/OndselSolver/LinearMultiStepMethod.cpp +++ b/OndselSolver/LinearMultiStepMethod.cpp @@ -32,13 +32,13 @@ FColDsptr MbD::LinearMultiStepMethod::derivativeatpresentpast(size_t n, double t FColDsptr MbD::LinearMultiStepMethod::derivativepresentpast(size_t, FColDsptr, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } double MbD::LinearMultiStepMethod::pvdotpv() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } @@ -51,6 +51,6 @@ FColDsptr MbD::LinearMultiStepMethod::derivativepresentpastpresentDerivativepast FColDsptr, std::shared_ptr>, FColDsptr, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } diff --git a/OndselSolver/MatrixDecomposition.cpp b/OndselSolver/MatrixDecomposition.cpp index 7692ab6..5206232 100644 --- a/OndselSolver/MatrixDecomposition.cpp +++ b/OndselSolver/MatrixDecomposition.cpp @@ -12,7 +12,7 @@ using namespace MbD; FColDsptr MbD::MatrixDecomposition::forAndBackSubsaveOriginal(FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } @@ -28,31 +28,31 @@ void MatrixDecomposition::applyRowOrderOnRightHandSideB() FColDsptr MbD::MatrixDecomposition::basicSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } void MbD::MatrixDecomposition::forwardSubstituteIntoL() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::MatrixDecomposition::backSubstituteIntoU() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::MatrixDecomposition::forwardSubstituteIntoLD() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::MatrixDecomposition::postSolve() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::MatrixDecomposition::preSolvesaveOriginal(FMatDsptr, bool) { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/NewtonRaphson.cpp b/OndselSolver/NewtonRaphson.cpp index 6da502d..f73c55f 100644 --- a/OndselSolver/NewtonRaphson.cpp +++ b/OndselSolver/NewtonRaphson.cpp @@ -39,7 +39,7 @@ void NewtonRaphson::initializeLocally() void NewtonRaphson::run() { - assert(false); + throw SimulationStoppingError("To be implemented."); //self preRun. //self initializeLocally. //self initializeGlobally. @@ -98,7 +98,7 @@ bool NewtonRaphson::isConverged() void NewtonRaphson::askSystemToUpdate() { - assert(false); + throw SimulationStoppingError("To be implemented."); } bool NewtonRaphson::isConvergedToNumericalLimit() diff --git a/OndselSolver/PosICDragLimitNewtonRaphson.cpp b/OndselSolver/PosICDragLimitNewtonRaphson.cpp index 32d1208..564f12e 100644 --- a/OndselSolver/PosICDragLimitNewtonRaphson.cpp +++ b/OndselSolver/PosICDragLimitNewtonRaphson.cpp @@ -32,7 +32,7 @@ void MbD::PosICDragLimitNewtonRaphson::initializeGlobally() void MbD::PosICDragLimitNewtonRaphson::setdragParts(std::shared_ptr>> dragParts) { (void) dragParts; - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::PosICDragLimitNewtonRaphson::run() diff --git a/OndselSolver/PosICNewtonRaphson.cpp b/OndselSolver/PosICNewtonRaphson.cpp index 14ce0d3..b581e82 100644 --- a/OndselSolver/PosICNewtonRaphson.cpp +++ b/OndselSolver/PosICNewtonRaphson.cpp @@ -121,7 +121,7 @@ void PosICNewtonRaphson::handleSingularMatrix() this->lookForRedundantConstraints(); matrixSolver = this->matrixSolverClassNew(); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } } diff --git a/OndselSolver/RackPinConstraintIJ.cpp b/OndselSolver/RackPinConstraintIJ.cpp index d4fb062..94eaee5 100644 --- a/OndselSolver/RackPinConstraintIJ.cpp +++ b/OndselSolver/RackPinConstraintIJ.cpp @@ -35,17 +35,17 @@ void MbD::RackPinConstraintIJ::calcPostDynCorrectorIteration() void MbD::RackPinConstraintIJ::init_xthez() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::RackPinConstraintIJ::initxIeJeIe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::RackPinConstraintIJ::initthezIeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::RackPinConstraintIJ::initialize() diff --git a/OndselSolver/RedundantConstraint.cpp b/OndselSolver/RedundantConstraint.cpp index f49e708..3c11eaf 100644 --- a/OndselSolver/RedundantConstraint.cpp +++ b/OndselSolver/RedundantConstraint.cpp @@ -106,7 +106,7 @@ void RedundantConstraint::setqsuddotlam(FColDsptr) void RedundantConstraint::discontinuityAtaddTypeTo(double, std::shared_ptr>) { //"Reactivate all constraints." - assert(false); + throw SimulationStoppingError("To be implemented."); //| newSelf | //newSelf : = self constraint. //newSelf discontinuityAt : tstartNew addTypeTo : collection. diff --git a/OndselSolver/ScalarNewtonRaphson.cpp b/OndselSolver/ScalarNewtonRaphson.cpp index 58b976c..5f00f85 100644 --- a/OndselSolver/ScalarNewtonRaphson.cpp +++ b/OndselSolver/ScalarNewtonRaphson.cpp @@ -13,7 +13,7 @@ using namespace MbD; void ScalarNewtonRaphson::initializeGlobally() { - assert(false); + throw SimulationStoppingError("To be implemented."); //x = system->x; } diff --git a/OndselSolver/ScrewConstraintIJ.cpp b/OndselSolver/ScrewConstraintIJ.cpp index ab3c314..d9c82df 100644 --- a/OndselSolver/ScrewConstraintIJ.cpp +++ b/OndselSolver/ScrewConstraintIJ.cpp @@ -37,17 +37,17 @@ void MbD::ScrewConstraintIJ::calcPostDynCorrectorIteration() void MbD::ScrewConstraintIJ::init_zthez() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ScrewConstraintIJ::initzIeJeIe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ScrewConstraintIJ::initthezIeJe() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::ScrewConstraintIJ::initialize() diff --git a/OndselSolver/Solver.cpp b/OndselSolver/Solver.cpp index 9c9e5de..866ae24 100644 --- a/OndselSolver/Solver.cpp +++ b/OndselSolver/Solver.cpp @@ -10,6 +10,7 @@ #include "Solver.h" #include +#include "SimulationStoppingError.h" using namespace MbD; @@ -28,22 +29,22 @@ void Solver::initializeLocally() void Solver::initializeGlobally() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Solver::assignEquationNumbers() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Solver::run() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Solver::preRun() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Solver::finalize() @@ -56,15 +57,15 @@ void Solver::reportStats() void Solver::postRun() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void Solver::logString(const std::string&) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Solver::handleSingularMatrix() { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/StableBackwardDifference.cpp b/OndselSolver/StableBackwardDifference.cpp index 3b1be83..0551182 100644 --- a/OndselSolver/StableBackwardDifference.cpp +++ b/OndselSolver/StableBackwardDifference.cpp @@ -43,7 +43,7 @@ FColDsptr MbD::StableBackwardDifference::derivativepresentpastpresentDerivativep size_t, FColDsptr, std::shared_ptr>, FColDsptr, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); return FColDsptr(); } diff --git a/OndselSolver/Symbolic.cpp b/OndselSolver/Symbolic.cpp index 75bcbb6..70b2a71 100644 --- a/OndselSolver/Symbolic.cpp +++ b/OndselSolver/Symbolic.cpp @@ -82,13 +82,13 @@ void Symbolic::initialize() Symsptr MbD::Symbolic::differentiateWRT(Symsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); return Symsptr(); } Symsptr MbD::Symbolic::integrateWRT(Symsptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); return Symsptr(); } @@ -123,13 +123,13 @@ Symsptr MbD::Symbolic::expandUntil(std::shared_ptr> Symsptr Symbolic::expandUntil(Symsptr sptr, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); return sptr; } Symsptr Symbolic::simplifyUntil(Symsptr sptr, std::shared_ptr>) { - assert(false); + throw SimulationStoppingError("To be implemented."); return sptr; } @@ -168,7 +168,7 @@ std::ostream& Symbolic::printOn(std::ostream& s) const std::shared_ptr> Symbolic::getTerms() { - assert(false); + throw SimulationStoppingError("To be implemented."); return std::make_shared>(); } @@ -179,31 +179,31 @@ void MbD::Symbolic::addTerm(Symsptr trm) double Symbolic::getValue() { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } double MbD::Symbolic::getValue(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); return 0.0; } void MbD::Symbolic::setValue(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); } void MbD::Symbolic::createMbD(std::shared_ptr, std::shared_ptr) { - assert(false); + throw SimulationStoppingError("To be implemented."); return; } Symsptr MbD::Symbolic::clonesptr() { //Return shallow copy of *this wrapped in shared_ptr - assert(false); + throw SimulationStoppingError("To be implemented."); return std::make_shared(*this); } @@ -219,7 +219,7 @@ bool MbD::Symbolic::isVariable() void MbD::Symbolic::setIntegrationConstant(double) { - assert(false); + throw SimulationStoppingError("To be implemented."); } Symsptr MbD::Symbolic::raisedTo(Symsptr x, Symsptr y) diff --git a/OndselSolver/SymbolicParser.cpp b/OndselSolver/SymbolicParser.cpp index 35fd923..9be1bc8 100644 --- a/OndselSolver/SymbolicParser.cpp +++ b/OndselSolver/SymbolicParser.cpp @@ -492,7 +492,7 @@ void MbD::SymbolicParser::notifyat(const std::string&, int) const source->seekg(0); auto contents = source->str(); source->seekg(p); - assert(false); + throw SimulationStoppingError("To be implemented."); //SyntaxErrorException new //targetClass : class; //messageText: aString; diff --git a/OndselSolver/SystemNewtonRaphson.cpp b/OndselSolver/SystemNewtonRaphson.cpp index 364c247..1a32f85 100644 --- a/OndselSolver/SystemNewtonRaphson.cpp +++ b/OndselSolver/SystemNewtonRaphson.cpp @@ -29,7 +29,7 @@ void SystemNewtonRaphson::initializeGlobally() void MbD::SystemNewtonRaphson::assignEquationNumbers() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void SystemNewtonRaphson::createVectorsAndMatrices() @@ -79,7 +79,7 @@ void SystemNewtonRaphson::handleSingularMatrix() matrixSolver->throwSingularMatrixError("SystemNewtonRaphson"); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } } diff --git a/OndselSolver/SystemSolver.cpp b/OndselSolver/SystemSolver.cpp index 7926f17..4429359 100644 --- a/OndselSolver/SystemSolver.cpp +++ b/OndselSolver/SystemSolver.cpp @@ -38,7 +38,7 @@ using namespace MbD; void SystemSolver::setSystem(Solver*) { //Do not use - assert(false); + throw SimulationStoppingError("To be implemented."); } void SystemSolver::initialize() @@ -297,7 +297,7 @@ std::shared_ptr>> SystemSolver::allConst void SystemSolver::postNewtonRaphson() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void SystemSolver::partsJointsMotionsForcesTorquesDo(const std::function)>& f) @@ -317,7 +317,7 @@ void MbD::SystemSolver::partsJointsMotionsLimitsForcesTorquesDo(const std::funct void SystemSolver::discontinuityBlock() { - assert(false); + throw SimulationStoppingError("To be implemented."); } double SystemSolver::startTime() diff --git a/OndselSolver/VectorNewtonRaphson.cpp b/OndselSolver/VectorNewtonRaphson.cpp index ed2d5ca..60c4f29 100644 --- a/OndselSolver/VectorNewtonRaphson.cpp +++ b/OndselSolver/VectorNewtonRaphson.cpp @@ -20,7 +20,7 @@ using namespace MbD; void VectorNewtonRaphson::initializeGlobally() { - assert(false); + throw SimulationStoppingError("To be implemented."); //system->fillVarVector(x); } @@ -40,7 +40,7 @@ std::shared_ptr VectorNewtonRaphson::matrixSolverClassNew() void VectorNewtonRaphson::fillY() { - assert(false); + throw SimulationStoppingError("To be implemented."); } void VectorNewtonRaphson::calcyNorm() @@ -80,5 +80,5 @@ void VectorNewtonRaphson::xEqualxoldPlusdx() void VectorNewtonRaphson::handleSingularMatrix() { - assert(false); + throw SimulationStoppingError("To be implemented."); } diff --git a/OndselSolver/VelSolver.cpp b/OndselSolver/VelSolver.cpp index 4853f8b..b62cb70 100644 --- a/OndselSolver/VelSolver.cpp +++ b/OndselSolver/VelSolver.cpp @@ -37,7 +37,7 @@ void VelSolver::handleSingularMatrix() matrixSolver->throwSingularMatrixError("VelSolver"); } else { - assert(false); + throw SimulationStoppingError("To be implemented."); } } }