diff --git a/OndselSolver/ASMTAssembly.cpp b/OndselSolver/ASMTAssembly.cpp index a2f9669..2150f7a 100644 --- a/OndselSolver/ASMTAssembly.cpp +++ b/OndselSolver/ASMTAssembly.cpp @@ -521,7 +521,7 @@ void MbD::ASMTAssembly::readKinematicIJs(std::vector& lines) } -void MbD::ASMTAssembly::readKinematicIJ(std::vector& lines) +void MbD::ASMTAssembly::readKinematicIJ(std::vector&) { assert(false); } @@ -847,7 +847,7 @@ void MbD::ASMTAssembly::readMotionSeries(std::vector& lines) motion->readMotionSeries(lines); } -void MbD::ASMTAssembly::outputFor(AnalysisType type) +void MbD::ASMTAssembly::outputFor(AnalysisType) { assert(false); } @@ -1273,13 +1273,13 @@ void MbD::ASMTAssembly::storeOnTimeSeries(std::ofstream& os) if (times->empty()) return; os << "TimeSeries" << std::endl; os << "Number\tInput\t"; - for (int i = 1; i < times->size(); i++) + for (int i = 1; i < (int)times->size(); i++) { os << i << '\t'; } os << std::endl; os << "Time\tInput\t"; - for (int i = 1; i < times->size(); i++) + for (int i = 1; i < (int)times->size(); i++) { os << times->at(i) << '\t'; } diff --git a/OndselSolver/ASMTConstraintSet.cpp b/OndselSolver/ASMTConstraintSet.cpp index bd1f36c..a5359d4 100644 --- a/OndselSolver/ASMTConstraintSet.cpp +++ b/OndselSolver/ASMTConstraintSet.cpp @@ -14,7 +14,7 @@ using namespace MbD; -void MbD::ASMTConstraintSet::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) +void MbD::ASMTConstraintSet::createMbD(std::shared_ptr mbdSys, std::shared_ptr) { //self dataSeries : OrderedCollection new. //self discontinuities : OrderedCollection new. @@ -57,14 +57,14 @@ void MbD::ASMTConstraintSet::updateFromMbD() tzs->push_back(aTIO->at(2)); } -void MbD::ASMTConstraintSet::compareResults(AnalysisType type) +void MbD::ASMTConstraintSet::compareResults(AnalysisType) { if (infxs == nullptr || infxs->empty()) return; auto mbdUnts = mbdUnits(); - auto factor = 1.0e-6; - auto forceTol = mbdUnts->force * factor; - auto torqueTol = mbdUnts->torque * factor; - auto i = fxs->size() - 1; + //auto factor = 1.0e-6; + //auto forceTol = mbdUnts->force * factor; + //auto torqueTol = mbdUnts->torque * factor; + //auto i = fxs->size() - 1; //assert(Numeric::equaltol(fxs->at(i), infxs->at(i), forceTol)); //assert(Numeric::equaltol(fys->at(i), infys->at(i), forceTol)); //assert(Numeric::equaltol(fzs->at(i), infzs->at(i), forceTol)); @@ -73,6 +73,6 @@ void MbD::ASMTConstraintSet::compareResults(AnalysisType type) //assert(Numeric::equaltol(tzs->at(i), intzs->at(i), torqueTol)); } -void MbD::ASMTConstraintSet::outputResults(AnalysisType type) +void MbD::ASMTConstraintSet::outputResults(AnalysisType) { } diff --git a/OndselSolver/ASMTForceTorque.cpp b/OndselSolver/ASMTForceTorque.cpp index 0ab7c3a..a1c217d 100644 --- a/OndselSolver/ASMTForceTorque.cpp +++ b/OndselSolver/ASMTForceTorque.cpp @@ -15,12 +15,12 @@ void MbD::ASMTForceTorque::updateFromMbD() assert(false); } -void MbD::ASMTForceTorque::compareResults(AnalysisType type) +void MbD::ASMTForceTorque::compareResults(AnalysisType) { assert(false); } -void MbD::ASMTForceTorque::outputResults(AnalysisType type) +void MbD::ASMTForceTorque::outputResults(AnalysisType) { assert(false); } diff --git a/OndselSolver/ASMTItem.cpp b/OndselSolver/ASMTItem.cpp index 4fd9c51..0f81a50 100644 --- a/OndselSolver/ASMTItem.cpp +++ b/OndselSolver/ASMTItem.cpp @@ -51,7 +51,7 @@ void MbD::ASMTItem::setName(std::string str) name = str; } -void MbD::ASMTItem::parseASMT(std::vector& lines) +void MbD::ASMTItem::parseASMT(std::vector&) { assert(false); } @@ -149,7 +149,7 @@ void MbD::ASMTItem::deleteMbD() mbdObject = nullptr; } -void MbD::ASMTItem::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) +void MbD::ASMTItem::createMbD(std::shared_ptr, std::shared_ptr) { noop(); assert(false); @@ -160,12 +160,12 @@ void MbD::ASMTItem::updateFromMbD() assert(false); } -void MbD::ASMTItem::compareResults(AnalysisType type) +void MbD::ASMTItem::compareResults(AnalysisType) { assert(false); } -void MbD::ASMTItem::outputResults(AnalysisType type) +void MbD::ASMTItem::outputResults(AnalysisType) { assert(false); } @@ -183,7 +183,7 @@ std::shared_ptr MbD::ASMTItem::sptrConstant(double value) return std::make_shared(value); } -void MbD::ASMTItem::storeOnLevel(std::ofstream& os, int level) +void MbD::ASMTItem::storeOnLevel(std::ofstream&, int) { noop(); assert(false); @@ -229,7 +229,7 @@ void MbD::ASMTItem::storeOnLevelBool(std::ofstream& os, int level, bool value) void MbD::ASMTItem::storeOnLevelArray(std::ofstream& os, int level, std::vector array) { storeOnLevelTabs(os, level); - for (int i = 0; i < array.size(); i++) + for (int i = 0; i < (int)array.size(); i++) { os << array[i] << '\t'; } @@ -242,7 +242,7 @@ void MbD::ASMTItem::storeOnLevelName(std::ofstream& os, int level) storeOnLevelString(os, level + 1, name); } -void MbD::ASMTItem::storeOnTimeSeries(std::ofstream& os) +void MbD::ASMTItem::storeOnTimeSeries(std::ofstream&) { assert(false); } diff --git a/OndselSolver/ASMTItemIJ.cpp b/OndselSolver/ASMTItemIJ.cpp index de459aa..c5e0f9a 100644 --- a/OndselSolver/ASMTItemIJ.cpp +++ b/OndselSolver/ASMTItemIJ.cpp @@ -108,37 +108,37 @@ void MbD::ASMTItemIJ::storeOnLevel(std::ofstream& os, int level) void MbD::ASMTItemIJ::storeOnTimeSeries(std::ofstream& os) { os << "FXonI\t"; - for (int i = 0; i < fxs->size(); i++) + for (int i = 0; i < (int)fxs->size(); i++) { os << fxs->at(i) << '\t'; } os << std::endl; os << "FYonI\t"; - for (int i = 0; i < fys->size(); i++) + for (int i = 0; i < (int)fys->size(); i++) { os << fys->at(i) << '\t'; } os << std::endl; os << "FZonI\t"; - for (int i = 0; i < fzs->size(); i++) + for (int i = 0; i < (int)fzs->size(); i++) { os << fzs->at(i) << '\t'; } os << std::endl; os << "TXonI\t"; - for (int i = 0; i < txs->size(); i++) + for (int i = 0; i < (int)txs->size(); i++) { os << txs->at(i) << '\t'; } os << std::endl; os << "TYonI\t"; - for (int i = 0; i < tys->size(); i++) + for (int i = 0; i < (int)tys->size(); i++) { os << tys->at(i) << '\t'; } os << std::endl; os << "TZonI\t"; - for (int i = 0; i < tzs->size(); i++) + for (int i = 0; i < (int)tzs->size(); i++) { os << tzs->at(i) << '\t'; } diff --git a/OndselSolver/ASMTMarker.cpp b/OndselSolver/ASMTMarker.cpp index c356bf6..e99bf74 100644 --- a/OndselSolver/ASMTMarker.cpp +++ b/OndselSolver/ASMTMarker.cpp @@ -50,7 +50,7 @@ namespace MbD { return aApm; } - void ASMTMarker::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) + void ASMTMarker::createMbD(std::shared_ptr, std::shared_ptr mbdUnits) { auto mkr = CREATE::With(name.c_str()); auto prt = std::static_pointer_cast(partOrAssembly()->mbdObject); diff --git a/OndselSolver/ASMTMotion.cpp b/OndselSolver/ASMTMotion.cpp index 884e482..c7d4da1 100644 --- a/OndselSolver/ASMTMotion.cpp +++ b/OndselSolver/ASMTMotion.cpp @@ -32,12 +32,12 @@ namespace MbD { { } - void ASMTMotion::storeOnLevel(std::ofstream& os, int level) + void ASMTMotion::storeOnLevel(std::ofstream&, int) { assert(false); } - void ASMTMotion::storeOnTimeSeries(std::ofstream& os) + void ASMTMotion::storeOnTimeSeries(std::ofstream&) { assert(false); } diff --git a/OndselSolver/ASMTRefCurve.cpp b/OndselSolver/ASMTRefCurve.cpp index b95dbe4..3846491 100644 --- a/OndselSolver/ASMTRefCurve.cpp +++ b/OndselSolver/ASMTRefCurve.cpp @@ -11,12 +11,12 @@ using namespace MbD; -void MbD::ASMTRefCurve::parseASMT(std::vector& lines) +void MbD::ASMTRefCurve::parseASMT(std::vector&) { assert(false); } -void MbD::ASMTRefCurve::storeOnLevel(std::ofstream& os, int level) +void MbD::ASMTRefCurve::storeOnLevel(std::ofstream&, int) { assert(false); } diff --git a/OndselSolver/ASMTRefSurface.cpp b/OndselSolver/ASMTRefSurface.cpp index 883bdd9..980f0a6 100644 --- a/OndselSolver/ASMTRefSurface.cpp +++ b/OndselSolver/ASMTRefSurface.cpp @@ -11,12 +11,12 @@ using namespace MbD; -void MbD::ASMTRefSurface::parseASMT(std::vector& lines) +void MbD::ASMTRefSurface::parseASMT(std::vector&) { assert(false); } -void MbD::ASMTRefSurface::storeOnLevel(std::ofstream& os, int level) +void MbD::ASMTRefSurface::storeOnLevel(std::ofstream&, int) { assert(false); } diff --git a/OndselSolver/ASMTSpatialContainer.cpp b/OndselSolver/ASMTSpatialContainer.cpp index ab8a5fd..64762ea 100644 --- a/OndselSolver/ASMTSpatialContainer.cpp +++ b/OndselSolver/ASMTSpatialContainer.cpp @@ -117,7 +117,7 @@ void MbD::ASMTSpatialContainer::readRefCurves(std::vector& lines) lines.erase(lines.begin(), it); } -void MbD::ASMTSpatialContainer::readRefCurve(std::vector& lines) +void MbD::ASMTSpatialContainer::readRefCurve(std::vector&) { assert(false); } @@ -137,7 +137,7 @@ void MbD::ASMTSpatialContainer::readRefSurfaces(std::vector& lines) lines.erase(lines.begin(), it); } -void MbD::ASMTSpatialContainer::readRefSurface(std::vector& lines) +void MbD::ASMTSpatialContainer::readRefSurface(std::vector&) { assert(false); } @@ -371,7 +371,7 @@ void MbD::ASMTSpatialContainer::updateFromMbD() alpzs->push_back(alpOPO->at(2)); } -void MbD::ASMTSpatialContainer::compareResults(AnalysisType type) +void MbD::ASMTSpatialContainer::compareResults(AnalysisType) { if (inxs == nullptr || inxs->empty()) return; auto mbdUnts = mbdUnits(); @@ -442,7 +442,7 @@ void MbD::ASMTSpatialContainer::compareResults(AnalysisType type) } } -void MbD::ASMTSpatialContainer::outputResults(AnalysisType type) +void MbD::ASMTSpatialContainer::outputResults(AnalysisType) { if (inxs != nullptr && !inxs->empty()) return; auto i = xs->size() - 1; @@ -603,109 +603,109 @@ void MbD::ASMTSpatialContainer::storeOnLevelRefSurfaces(std::ofstream& os, int l void MbD::ASMTSpatialContainer::storeOnTimeSeries(std::ofstream& os) { os << "X\t"; - for (int i = 0; i < xs->size(); i++) + for (int i = 0; i < (int)xs->size(); i++) { os << xs->at(i) << '\t'; } os << std::endl; os << "Y\t"; - for (int i = 0; i < ys->size(); i++) + for (int i = 0; i < (int)ys->size(); i++) { os << ys->at(i) << '\t'; } os << std::endl; os << "Z\t"; - for (int i = 0; i < zs->size(); i++) + for (int i = 0; i < (int)zs->size(); i++) { os << zs->at(i) << '\t'; } os << std::endl; os << "Bryantx\t"; - for (int i = 0; i < bryxs->size(); i++) + for (int i = 0; i < (int)bryxs->size(); i++) { os << bryxs->at(i) << '\t'; } os << std::endl; os << "Bryanty\t"; - for (int i = 0; i < bryys->size(); i++) + for (int i = 0; i < (int)bryys->size(); i++) { os << bryys->at(i) << '\t'; } os << std::endl; os << "Bryantz\t"; - for (int i = 0; i < bryzs->size(); i++) + for (int i = 0; i < (int)bryzs->size(); i++) { os << bryzs->at(i) << '\t'; } os << std::endl; os << "VX\t"; - for (int i = 0; i < vxs->size(); i++) + for (int i = 0; i < (int)vxs->size(); i++) { os << vxs->at(i) << '\t'; } os << std::endl; os << "VY\t"; - for (int i = 0; i < vys->size(); i++) + for (int i = 0; i < (int)vys->size(); i++) { os << vys->at(i) << '\t'; } os << std::endl; os << "VZ\t"; - for (int i = 0; i < vzs->size(); i++) + for (int i = 0; i < (int)vzs->size(); i++) { os << vzs->at(i) << '\t'; } os << std::endl; os << "OmegaX\t"; - for (int i = 0; i < omexs->size(); i++) + for (int i = 0; i < (int)omexs->size(); i++) { os << omexs->at(i) << '\t'; } os << std::endl; os << "OmegaY\t"; - for (int i = 0; i < omeys->size(); i++) + for (int i = 0; i < (int)omeys->size(); i++) { os << omeys->at(i) << '\t'; } os << std::endl; os << "OmegaZ\t"; - for (int i = 0; i < omezs->size(); i++) + for (int i = 0; i < (int)omezs->size(); i++) { os << omezs->at(i) << '\t'; } os << std::endl; os << "AX\t"; - for (int i = 0; i < axs->size(); i++) + for (int i = 0; i < (int)axs->size(); i++) { os << axs->at(i) << '\t'; } os << std::endl; os << "AY\t"; - for (int i = 0; i < ays->size(); i++) + for (int i = 0; i < (int)ays->size(); i++) { os << ays->at(i) << '\t'; } os << std::endl; os << "AZ\t"; - for (int i = 0; i < azs->size(); i++) + for (int i = 0; i < (int)azs->size(); i++) { os << azs->at(i) << '\t'; } os << std::endl; os << "AlphaX\t"; - for (int i = 0; i < alpxs->size(); i++) + for (int i = 0; i < (int)alpxs->size(); i++) { os << alpxs->at(i) << '\t'; } os << std::endl; os << "AlphaY\t"; - for (int i = 0; i < alpys->size(); i++) + for (int i = 0; i < (int)alpys->size(); i++) { os << alpys->at(i) << '\t'; } os << std::endl; os << "AlphaZ\t"; - for (int i = 0; i < alpzs->size(); i++) + for (int i = 0; i < (int)alpzs->size(); i++) { os << alpzs->at(i) << '\t'; } diff --git a/OndselSolver/ASMTTime.cpp b/OndselSolver/ASMTTime.cpp index 52284a1..0a0ca93 100644 --- a/OndselSolver/ASMTTime.cpp +++ b/OndselSolver/ASMTTime.cpp @@ -30,12 +30,12 @@ void MbD::ASMTTime::createMbD(std::shared_ptr mbdSys, std::shared_ptrxexpression(mbdTime, geoTime->simplified(geoTime)); } -Symsptr MbD::ASMTTime::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::ASMTTime::expandUntil(Symsptr sptr, std::shared_ptr>) { return sptr; } -Symsptr MbD::ASMTTime::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::ASMTTime::simplifyUntil(Symsptr sptr, std::shared_ptr>) { return sptr; } diff --git a/OndselSolver/AccNewtonRaphson.cpp b/OndselSolver/AccNewtonRaphson.cpp index ffe6fd5..89d485e 100644 --- a/OndselSolver/AccNewtonRaphson.cpp +++ b/OndselSolver/AccNewtonRaphson.cpp @@ -49,7 +49,7 @@ void AccNewtonRaphson::assignEquationNumbers() con->iG = eqnNo; eqnNo += 1; } - auto lastEqnNo = eqnNo - 1; + //auto lastEqnNo = eqnNo - 1; nEqns = eqnNo; //C++ uses index 0. n = nEqns; } diff --git a/OndselSolver/Array.h b/OndselSolver/Array.h index 7ce0bec..c509bd7 100644 --- a/OndselSolver/Array.h +++ b/OndselSolver/Array.h @@ -66,14 +66,14 @@ namespace MbD { template inline void Array::copyFrom(std::shared_ptr> x) { - for (int i = 0; i < x->size(); i++) { + for (int i = 0; i < (int)x->size(); i++) { this->at(i) = x->at(i); } } template inline void Array::zeroSelf() { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i) = (T)0; } } @@ -110,7 +110,7 @@ namespace MbD { inline double Array::maxMagnitudeOfVector() { double answer = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double mag = std::abs(this->at(i)); if (answer < mag) answer = mag; @@ -120,7 +120,7 @@ namespace MbD { template inline void Array::equalArrayAt(std::shared_ptr> array, int i) { - for (int ii = 0; ii < this->size(); ii++) + for (int ii = 0; ii < (int)this->size(); ii++) { this->at(ii) = array->at((int)i + ii); } @@ -168,7 +168,7 @@ namespace MbD { template inline void Array::magnifySelf(T factor) { - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { this->atitimes(i, factor); } diff --git a/OndselSolver/CADSystem.cpp b/OndselSolver/CADSystem.cpp index a3e00ff..3ea4e70 100644 --- a/OndselSolver/CADSystem.cpp +++ b/OndselSolver/CADSystem.cpp @@ -28,7 +28,7 @@ using namespace MbD; -void CADSystem::outputFor(AnalysisType type) +void CADSystem::outputFor(AnalysisType) { auto str = std::to_string(mbdSystem->mbdTimeValue()); this->logString(str); @@ -45,7 +45,7 @@ void CADSystem::logString(std::string& str) std::cout << str << std::endl; } -void CADSystem::logString(double value) +void CADSystem::logString(double) { } @@ -834,7 +834,7 @@ void CADSystem::runPiston() TheSystem->runKINEMATIC(TheSystem); } -void MbD::CADSystem::preMbDrun(std::shared_ptr mbdSys) +void MbD::CADSystem::preMbDrun(std::shared_ptr) { } diff --git a/OndselSolver/Constant.cpp b/OndselSolver/Constant.cpp index d6b44d1..7ae62d8 100644 --- a/OndselSolver/Constant.cpp +++ b/OndselSolver/Constant.cpp @@ -21,7 +21,7 @@ Constant::Constant(double val) : Variable(val) { } -Symsptr MbD::Constant::differentiateWRT(Symsptr var) +Symsptr MbD::Constant::differentiateWRT(Symsptr) { return sptrConstant(0.0); } @@ -37,7 +37,7 @@ Symsptr MbD::Constant::integrateWRT(Symsptr var) return std::make_shared(var, coeffs); } -Symsptr MbD::Constant::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Constant::expandUntil(Symsptr sptr, std::shared_ptr>) { return sptr; } @@ -62,7 +62,7 @@ bool MbD::Constant::isOne() return value == 1.0; } -void MbD::Constant::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) +void MbD::Constant::createMbD(std::shared_ptr, std::shared_ptr) { return; } @@ -72,7 +72,7 @@ double MbD::Constant::getValue() return value; } -double MbD::Constant::getValue(double arg) +double MbD::Constant::getValue(double) { return value; } diff --git a/OndselSolver/Constraint.cpp b/OndselSolver/Constraint.cpp index 2ecc3eb..5b5c8ef 100644 --- a/OndselSolver/Constraint.cpp +++ b/OndselSolver/Constraint.cpp @@ -108,7 +108,7 @@ void Constraint::fillPosICError(FColDsptr col) col->atiplusNumber(iG, aG); } -void Constraint::removeRedundantConstraints(std::shared_ptr> redundantEqnNos) +void Constraint::removeRedundantConstraints(std::shared_ptr>) { //My owner should handle this. assert(false); @@ -162,10 +162,30 @@ void Constraint::setqsuddotlam(FColDsptr col) lam = col->at(iG); } -void Constraint::addToJointForceI(FColDsptr col) +void Constraint::addToJointForceI(FColDsptr) { } -void Constraint::addToJointTorqueI(FColDsptr col) +void Constraint::addToJointTorqueI(FColDsptr) { } + +void Constraint::fillConstraints(std::shared_ptr>> allConstraints) { + Item::fillConstraints(allConstraints); +} + +void Constraint::fillRedundantConstraints(std::shared_ptr>> redunConstraints) { + Item::fillRedundantConstraints(redunConstraints); +} + +void Constraint::fillDispConstraints(std::shared_ptr>> dispConstraints) { + Item::fillDispConstraints(dispConstraints); +} + +void Constraint::fillEssenConstraints(std::shared_ptr>> essenConstraints) { + Item::fillEssenConstraints(essenConstraints); +} + +void Constraint::fillPerpenConstraints(std::shared_ptr>> perpenConstraints) { + Item::fillPerpenConstraints(perpenConstraints); +} diff --git a/OndselSolver/Constraint.h b/OndselSolver/Constraint.h index 0efdb89..917e197 100644 --- a/OndselSolver/Constraint.h +++ b/OndselSolver/Constraint.h @@ -25,14 +25,19 @@ namespace MbD { virtual void addToJointForceI(FColDsptr col); virtual void addToJointTorqueI(FColDsptr col); void fillAccICIterJacob(SpMatDsptr mat) override; + void fillConstraints(std::shared_ptr>> allConstraints) override; virtual void fillConstraints(std::shared_ptr sptr, std::shared_ptr>> allConstraints); + void fillDispConstraints(std::shared_ptr>> dispConstraints) override; virtual void fillDispConstraints(std::shared_ptr sptr, std::shared_ptr>> dispConstraints); + void fillEssenConstraints(std::shared_ptr>> essenConstraints) override; virtual void fillEssenConstraints(std::shared_ptr sptr, std::shared_ptr>> essenConstraints); + void fillPerpenConstraints(std::shared_ptr>> perpenConstraints) override; virtual void fillPerpenConstraints(std::shared_ptr sptr, std::shared_ptr>> perpenConstraints); void fillPosICError(FColDsptr col) override; void fillPosKineError(FColDsptr col) override; void fillqsuddotlam(FColDsptr col) override; void fillqsulam(FColDsptr col) override; + void fillRedundantConstraints(std::shared_ptr>> redunConstraints) override; virtual void fillRedundantConstraints(std::shared_ptr sptr, std::shared_ptr>> redunConstraints); virtual bool isRedundant(); void postInput() override; diff --git a/OndselSolver/DiagonalMatrix.h b/OndselSolver/DiagonalMatrix.h index 69c0c28..c2efd13 100644 --- a/OndselSolver/DiagonalMatrix.h +++ b/OndselSolver/DiagonalMatrix.h @@ -60,13 +60,13 @@ namespace MbD { template inline void DiagonalMatrix::atiputDiagonalMatrix(int i, std::shared_ptr> diagMat) { - for (int ii = 0; ii < diagMat->size(); ii++) + for (int ii = 0; ii < (int)diagMat->size(); ii++) { this->at(i + ii) = diagMat->at(ii); } } template - inline DiagMatsptr DiagonalMatrix::times(T factor) + inline DiagMatsptr DiagonalMatrix::times(T) { assert(false); } @@ -98,7 +98,7 @@ namespace MbD { inline double DiagonalMatrix::sumOfSquares() { double sum = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i); sum += element * element; @@ -114,7 +114,7 @@ namespace MbD { template<> inline void DiagonalMatrix::zeroSelf() { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i) = 0.0; } } @@ -122,7 +122,7 @@ namespace MbD { inline double DiagonalMatrix::maxMagnitude() { double max = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i); if (element < 0.0) element = -element; @@ -141,7 +141,7 @@ namespace MbD { { s << "DiagMat["; s << this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { s << ", " << this->at(i); } diff --git a/OndselSolver/DifferenceOperator.cpp b/OndselSolver/DifferenceOperator.cpp index d71efe9..d7aa7fc 100644 --- a/OndselSolver/DifferenceOperator.cpp +++ b/OndselSolver/DifferenceOperator.cpp @@ -18,7 +18,7 @@ using namespace MbD; FRowDsptr DifferenceOperator::OneOverFactorials = []() { auto oneOverFactorials = std::make_shared>(10); - for (int i = 0; i < oneOverFactorials->size(); i++) + for (int i = 0; i < (int)oneOverFactorials->size(); i++) { oneOverFactorials->at(i) = 1.0 / std::tgamma(i + 1); } diff --git a/OndselSolver/EulerAngleszxz.h b/OndselSolver/EulerAngleszxz.h index 55dc48f..6bacdef 100644 --- a/OndselSolver/EulerAngleszxz.h +++ b/OndselSolver/EulerAngleszxz.h @@ -36,7 +36,7 @@ namespace MbD { template inline void EulerAngleszxz::calc() { - double zero = 0.0; + //double zero = 0.0; double phi = this->at(0); double sphi = sin(phi); double cphi = cos(phi); diff --git a/OndselSolver/ExternalSystem.cpp b/OndselSolver/ExternalSystem.cpp index 9cc0b32..e886be8 100644 --- a/OndselSolver/ExternalSystem.cpp +++ b/OndselSolver/ExternalSystem.cpp @@ -46,7 +46,7 @@ void MbD::ExternalSystem::logString(std::string& str) std::cout << str << std::endl; } -void MbD::ExternalSystem::logString(double value) +void MbD::ExternalSystem::logString(double) { assert(false); } diff --git a/OndselSolver/FullColumn.h b/OndselSolver/FullColumn.h index a3a06a7..735c040 100644 --- a/OndselSolver/FullColumn.h +++ b/OndselSolver/FullColumn.h @@ -87,7 +87,7 @@ namespace MbD { return answer; } template - inline FColsptr FullColumn::times(T a) + inline FColsptr FullColumn::times(T) { assert(false); } @@ -99,7 +99,7 @@ namespace MbD { template inline void FullColumn::atiputFullColumn(int i, FColsptr fullCol) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { this->at(i + ii) = fullCol->at(ii); } @@ -107,7 +107,7 @@ namespace MbD { template inline void FullColumn::atiplusFullColumn(int i, FColsptr fullCol) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { this->at(i + ii) += fullCol->at(ii); } @@ -116,7 +116,7 @@ namespace MbD { inline void FullColumn::equalSelfPlusFullColumnAt(FColsptr fullCol, int ii) { //self is subcolumn of fullCol - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { this->at(i) += fullCol->at(ii + i); } @@ -124,7 +124,7 @@ namespace MbD { template inline void FullColumn::atiminusFullColumn(int i1, FColsptr fullCol) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { int i = i1 + ii; this->at(i) -= fullCol->at(ii); @@ -158,7 +158,7 @@ namespace MbD { template inline void FullColumn::atiplusFullColumntimes(int i1, FColsptr fullCol, T factor) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { int i = i1 + ii; this->at(i) += fullCol->at(ii) * factor; @@ -238,7 +238,7 @@ namespace MbD { { s << "FullCol{"; s << this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { s << ", " << this->at(i); } diff --git a/OndselSolver/FullMatrix.h b/OndselSolver/FullMatrix.h index cc3a842..cfbcea2 100644 --- a/OndselSolver/FullMatrix.h +++ b/OndselSolver/FullMatrix.h @@ -337,14 +337,14 @@ namespace MbD { template<> inline void FullMatrix::zeroSelf() { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i)->zeroSelf(); } } template<> inline void FullMatrix::identity() { this->zeroSelf(); - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i)->at(i) = 1.0; } } @@ -388,7 +388,7 @@ namespace MbD { return answer; } template - inline FMatsptr FullMatrix::times(T a) + inline FMatsptr FullMatrix::times(T) { assert(false); } @@ -459,7 +459,7 @@ namespace MbD { template inline void FullMatrix::atijputFullColumn(int i1, int j1, FColsptr fullCol) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { this->at(i1 + ii)->at(j1) = fullCol->at(ii); } @@ -485,7 +485,7 @@ namespace MbD { inline double FullMatrix::sumOfSquares() { double sum = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { sum += this->at(i)->sumOfSquares(); } @@ -532,7 +532,7 @@ namespace MbD { template inline void FullMatrix::magnifySelf(T factor) { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i)->magnifySelf(factor); } } @@ -540,7 +540,7 @@ namespace MbD { inline std::ostream& FullMatrix::printOn(std::ostream& s) const { s << "FullMat[" << std::endl; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { s << *(this->at(i)) << std::endl; } @@ -611,7 +611,7 @@ namespace MbD { inline T FullMatrix::trace() { T trace = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { trace += this->at(i)->at(i); } @@ -621,7 +621,7 @@ namespace MbD { inline double FullMatrix::maxMagnitude() { double max = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i)->maxMagnitude(); if (max < element) max = element; diff --git a/OndselSolver/FullMotion.cpp b/OndselSolver/FullMotion.cpp index 80c7032..71caf9d 100644 --- a/OndselSolver/FullMotion.cpp +++ b/OndselSolver/FullMotion.cpp @@ -16,7 +16,7 @@ MbD::FullMotion::FullMotion() { } -MbD::FullMotion::FullMotion(const char* str) +MbD::FullMotion::FullMotion(const char*) { } diff --git a/OndselSolver/FullRow.h b/OndselSolver/FullRow.h index 7a989a6..ab0483a 100644 --- a/OndselSolver/FullRow.h +++ b/OndselSolver/FullRow.h @@ -69,7 +69,7 @@ namespace MbD { return answer; } template - inline FRowsptr FullRow::times(T a) + inline FRowsptr FullRow::times(T) { assert(false); } @@ -107,7 +107,7 @@ namespace MbD { inline T FullRow::timesFullColumn(FullColumn* fullCol) { auto answer = this->at(0) * fullCol->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { answer += this->at(i) * fullCol->at(i); } @@ -187,7 +187,7 @@ namespace MbD { auto ncol = (int)this->size(); auto nelem = vecvec->at(0)->size(); auto answer = std::make_shared>(nelem); - for (int k = 0; k < nelem; k++) { + for (int k = 0; k < (int)nelem; k++) { auto sum = 0.0; for (int i = 0; i < ncol; i++) { @@ -202,7 +202,7 @@ namespace MbD { { s << "FullRow{"; s << this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { s << ", " << this->at(i); } diff --git a/OndselSolver/FullVector.h b/OndselSolver/FullVector.h index ee203ff..9d7e817 100644 --- a/OndselSolver/FullVector.h +++ b/OndselSolver/FullVector.h @@ -71,7 +71,7 @@ namespace MbD { inline double FullVector::sumOfSquares() { double sum = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i); sum += element * element; @@ -92,7 +92,7 @@ namespace MbD { template<> inline void FullVector::zeroSelf() { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i) = 0.0; } } @@ -104,7 +104,7 @@ namespace MbD { template inline void FullVector::atiplusFullVector(int i1, std::shared_ptr> fullVec) { - for (int ii = 0; ii < fullVec->size(); ii++) + for (int ii = 0; ii < (int)fullVec->size(); ii++) { auto i = i1 + ii; this->at(i) += fullVec->at(ii); @@ -113,7 +113,7 @@ namespace MbD { template inline void FullVector::atiplusFullVectortimes(int i1, std::shared_ptr> fullVec, T factor) { - for (int ii = 0; ii < fullVec->size(); ii++) + for (int ii = 0; ii < (int)fullVec->size(); ii++) { auto i = i1 + ii; this->at(i) += fullVec->at(ii) * factor; @@ -122,7 +122,7 @@ namespace MbD { template inline void FullVector::equalSelfPlusFullVectortimes(std::shared_ptr> fullVec, T factor) { - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { this->atiplusNumber(i, fullVec->at(i) * factor); } @@ -131,7 +131,7 @@ namespace MbD { inline double FullVector::maxMagnitude() { double max = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i); if (element < 0.0) element = -element; @@ -156,7 +156,7 @@ namespace MbD { inline double FullVector::length() { double ssq = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double elem = this->at(i); ssq += elem * elem; @@ -173,7 +173,7 @@ namespace MbD { template<> inline void FullVector::conditionSelfWithTol(double tol) { - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i); if (element < 0.0) element = -element; @@ -205,7 +205,7 @@ namespace MbD { //"Test if elements are increasing." //"Ok if spoilers are less than tol." auto next = this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { auto previous = next; next = this->at(i); @@ -219,7 +219,7 @@ namespace MbD { //"Test if elements are increasing." //"Ok if spoilers are less than tol." auto next = this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { auto previous = next; next = this->at(i); @@ -232,7 +232,7 @@ namespace MbD { { s << "FullVec{"; s << this->at(0); - for (int i = 1; i < this->size(); i++) + for (int i = 1; i < (int)this->size(); i++) { s << ", " << this->at(i); } diff --git a/OndselSolver/FunctionWithManyArgs.cpp b/OndselSolver/FunctionWithManyArgs.cpp index 311fe61..bd4b2e5 100644 --- a/OndselSolver/FunctionWithManyArgs.cpp +++ b/OndselSolver/FunctionWithManyArgs.cpp @@ -33,7 +33,7 @@ FunctionWithManyArgs::FunctionWithManyArgs(Symsptr term, Symsptr term1, Symsptr FunctionWithManyArgs::FunctionWithManyArgs(std::shared_ptr> _terms) { terms = std::make_shared>(); - for (int i = 0; i < _terms->size(); i++) + for (int i = 0; i < (int)_terms->size(); i++) terms->push_back(_terms->at(i)); } @@ -47,7 +47,7 @@ void MbD::FunctionWithManyArgs::createMbD(std::shared_ptr mbdSys, std::s for (auto& term : *terms) term->createMbD(mbdSys, mbdUnits); } -void MbD::FunctionWithManyArgs::arguments(Symsptr args) +void MbD::FunctionWithManyArgs::arguments(Symsptr) { assert(false); } diff --git a/OndselSolver/FunctionX.cpp b/OndselSolver/FunctionX.cpp index 90776ad..6a14800 100644 --- a/OndselSolver/FunctionX.cpp +++ b/OndselSolver/FunctionX.cpp @@ -24,7 +24,7 @@ void MbD::FunctionX::arguments(Symsptr args) xx = sum->terms->front(); } -Symsptr MbD::FunctionX::copyWith(Symsptr arg) +Symsptr MbD::FunctionX::copyWith(Symsptr) { assert(false); return Symsptr(); diff --git a/OndselSolver/GEFullMat.cpp b/OndselSolver/GEFullMat.cpp index 4d59d03..a89f65e 100644 --- a/OndselSolver/GEFullMat.cpp +++ b/OndselSolver/GEFullMat.cpp @@ -12,7 +12,7 @@ using namespace MbD; -void GEFullMat::forwardEliminateWithPivot(int p) +void GEFullMat::forwardEliminateWithPivot(int) { assert(false); } @@ -38,12 +38,12 @@ void GEFullMat::postSolve() assert(false); } -void GEFullMat::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +void GEFullMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); } -void GEFullMat::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +void GEFullMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { assert(false); } @@ -66,7 +66,7 @@ FColDsptr GEFullMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr ful return answerX; } -FColDsptr GEFullMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr GEFullMat::basicSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { assert(false); return FColDsptr(); diff --git a/OndselSolver/GEFullMatParPv.cpp b/OndselSolver/GEFullMatParPv.cpp index 2fc7d43..cd7ddfe 100644 --- a/OndselSolver/GEFullMatParPv.cpp +++ b/OndselSolver/GEFullMatParPv.cpp @@ -49,7 +49,7 @@ void GEFullMatParPv::postSolve() assert(false); } -void GEFullMatParPv::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +void GEFullMatParPv::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); } diff --git a/OndselSolver/GESpMat.cpp b/OndselSolver/GESpMat.cpp index b4b1121..4beccd3 100644 --- a/OndselSolver/GESpMat.cpp +++ b/OndselSolver/GESpMat.cpp @@ -31,18 +31,18 @@ FColDsptr GESpMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCo return answerX; } -FColDsptr GESpMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr GESpMat::basicSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); return FColDsptr(); } -void GESpMat::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +void GESpMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); } -void GESpMat::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +void GESpMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { assert(false); } diff --git a/OndselSolver/GearJoint.cpp b/OndselSolver/GearJoint.cpp index acebb65..9314f5d 100644 --- a/OndselSolver/GearJoint.cpp +++ b/OndselSolver/GearJoint.cpp @@ -17,7 +17,7 @@ MbD::GearJoint::GearJoint() { } -MbD::GearJoint::GearJoint(const char* str) +MbD::GearJoint::GearJoint(const char*) { } diff --git a/OndselSolver/GeneralSpline.cpp b/OndselSolver/GeneralSpline.cpp index 0e311ba..0c98d39 100644 --- a/OndselSolver/GeneralSpline.cpp +++ b/OndselSolver/GeneralSpline.cpp @@ -196,7 +196,7 @@ void MbD::GeneralSpline::calcNonCyclicIndexAndDelta() void MbD::GeneralSpline::calcIndexAndDelta() { - if (!(index < xs->size() - 1) || !(xs->at(index) <= xvalue) || !(xvalue < xs->at((int)index + 1))) { + if (!(index < (int)xs->size() - 1) || !(xs->at(index) <= xvalue) || !(xvalue < xs->at((int)index + 1))) { searchIndexFromto(0, (int)xs->size()); //Using range. } delta = xvalue - xs->at(index); @@ -245,14 +245,14 @@ std::ostream& MbD::GeneralSpline::printOn(std::ostream& s) const s << degree << ", " << std::endl; s << "xs{"; s << xs->at(0); - for (int i = 1; i < xs->size(); i++) + for (int i = 1; i < (int)xs->size(); i++) { s << ", " << xs->at(i); } s << "}, " << std::endl; s << "ys{"; s << ys->at(0); - for (int i = 1; i < ys->size(); i++) + for (int i = 1; i < (int)ys->size(); i++) { s << ", " << ys->at(i); } diff --git a/OndselSolver/ICKineIntegrator.cpp b/OndselSolver/ICKineIntegrator.cpp index c8d2df3..47b2002 100644 --- a/OndselSolver/ICKineIntegrator.cpp +++ b/OndselSolver/ICKineIntegrator.cpp @@ -18,7 +18,7 @@ void ICKineIntegrator::runInitialConditionTypeSolution() system->runAccICKine(); } -void ICKineIntegrator::iStep(int i) +void ICKineIntegrator::iStep(int) { assert(false); } diff --git a/OndselSolver/InLineJoint.cpp b/OndselSolver/InLineJoint.cpp index fc9ea44..31f9fab 100644 --- a/OndselSolver/InLineJoint.cpp +++ b/OndselSolver/InLineJoint.cpp @@ -13,7 +13,7 @@ MbD::InLineJoint::InLineJoint() { } -MbD::InLineJoint::InLineJoint(const char* str) +MbD::InLineJoint::InLineJoint(const char*) { } diff --git a/OndselSolver/InPlaneJoint.cpp b/OndselSolver/InPlaneJoint.cpp index af35567..0105a93 100644 --- a/OndselSolver/InPlaneJoint.cpp +++ b/OndselSolver/InPlaneJoint.cpp @@ -13,7 +13,7 @@ MbD::InPlaneJoint::InPlaneJoint() { } -MbD::InPlaneJoint::InPlaneJoint(const char* str) +MbD::InPlaneJoint::InPlaneJoint(const char*) { } diff --git a/OndselSolver/Integral.cpp b/OndselSolver/Integral.cpp index 0e21ab4..934e2e8 100644 --- a/OndselSolver/Integral.cpp +++ b/OndselSolver/Integral.cpp @@ -2,7 +2,7 @@ using namespace MbD; -MbD::Integral::Integral(Symsptr var, Symsptr integrand) +MbD::Integral::Integral(Symsptr, Symsptr) { assert(false); } @@ -15,7 +15,7 @@ void MbD::Integral::arguments(Symsptr args) expression = integrand->integrateWRT(xx); } -Symsptr MbD::Integral::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Integral::expandUntil(Symsptr, std::shared_ptr> set) { auto expand = expression->expandUntil(expression, set); auto answer = std::make_shared(); @@ -26,7 +26,7 @@ Symsptr MbD::Integral::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Integral::simplifyUntil(Symsptr, std::shared_ptr> set) { auto simple = expression->simplifyUntil(expression, set); auto answer = std::make_shared(); diff --git a/OndselSolver/Integrator.cpp b/OndselSolver/Integrator.cpp index 4994879..2504e0f 100644 --- a/OndselSolver/Integrator.cpp +++ b/OndselSolver/Integrator.cpp @@ -10,6 +10,6 @@ using namespace MbD; -void Integrator::setSystem(Solver* sys) +void Integrator::setSystem(Solver*) { } diff --git a/OndselSolver/IntegratorInterface.cpp b/OndselSolver/IntegratorInterface.cpp index 0907e34..3cb293a 100644 --- a/OndselSolver/IntegratorInterface.cpp +++ b/OndselSolver/IntegratorInterface.cpp @@ -69,7 +69,7 @@ void IntegratorInterface::postFirstStep() //this->checkForOutputThrough(integrator->t); } -void IntegratorInterface::interpolateAt(double tArg) +void IntegratorInterface::interpolateAt(double) { //"Interpolate for system state at tArg and leave system in that state." assert(false); diff --git a/OndselSolver/Item.cpp b/OndselSolver/Item.cpp index 10a88cd..52b7c4b 100644 --- a/OndselSolver/Item.cpp +++ b/OndselSolver/Item.cpp @@ -92,26 +92,26 @@ void Item::calcPostDynCorrectorIteration() { } -void MbD::Item::checkForCollisionDiscontinuityBetweenand(double impulsePrevious, double impulse) +void MbD::Item::checkForCollisionDiscontinuityBetweenand(double, double) { assert(false); } -void Item::removeRedundantConstraints(std::shared_ptr> redunEqnNos) +void Item::removeRedundantConstraints(std::shared_ptr>) { } -void MbD::Item::setpqsumu(FColDsptr col) +void MbD::Item::setpqsumu(FColDsptr) { assert(false); } -void MbD::Item::setpqsumuddot(FColDsptr col) +void MbD::Item::setpqsumuddot(FColDsptr) { assert(false); } -void MbD::Item::setpqsumudot(FColDsptr col) +void MbD::Item::setpqsumudot(FColDsptr) { assert(false); } @@ -125,91 +125,91 @@ void MbD::Item::registerName() assert(false); } -void Item::fillPosKineError(FColDsptr col) +void Item::fillPosKineError(FColDsptr) { } -void Item::fillPosKineJacob(SpMatDsptr mat) +void Item::fillPosKineJacob(SpMatDsptr) { } -void MbD::Item::fillpqsumu(FColDsptr col) +void MbD::Item::fillpqsumu(FColDsptr) { assert(false); } -void MbD::Item::fillpqsumudot(FColDsptr col) +void MbD::Item::fillpqsumudot(FColDsptr) { assert(false); } -void Item::fillEssenConstraints(std::shared_ptr>> essenConstraints) +void Item::fillEssenConstraints(std::shared_ptr>>) { assert(false); } -void MbD::Item::fillPerpenConstraints(std::shared_ptr>> perpenConstraints) +void MbD::Item::fillPerpenConstraints(std::shared_ptr>>) { assert(false); } -void MbD::Item::fillpFpy(SpMatDsptr mat) +void MbD::Item::fillpFpy(SpMatDsptr) { assert(false); } -void MbD::Item::fillpFpydot(SpMatDsptr mat) +void MbD::Item::fillpFpydot(SpMatDsptr) { assert(false); } -void Item::fillRedundantConstraints(std::shared_ptr>> redunConstraints) +void Item::fillRedundantConstraints(std::shared_ptr>>) { } -void MbD::Item::fillStaticError(FColDsptr col) +void MbD::Item::fillStaticError(FColDsptr) { assert(false); } -void MbD::Item::fillStaticJacob(FMatDsptr mat) +void MbD::Item::fillStaticJacob(FMatDsptr) { assert(false); } -void Item::fillConstraints(std::shared_ptr>> allConstraints) +void Item::fillConstraints(std::shared_ptr>>) { assert(false); } -void MbD::Item::fillDispConstraints(std::shared_ptr>> dispConstraints) +void MbD::Item::fillDispConstraints(std::shared_ptr>>) { assert(false); } -void MbD::Item::fillDynError(FColDsptr col) +void MbD::Item::fillDynError(FColDsptr) { assert(false); } -void Item::fillqsu(FColDsptr col) +void Item::fillqsu(FColDsptr) { } -void Item::fillqsuWeights(DiagMatDsptr diagMat) +void Item::fillqsuWeights(DiagMatDsptr) { } -void MbD::Item::fillqsuWeightsSmall(FColDsptr col) +void MbD::Item::fillqsuWeightsSmall(FColDsptr) { assert(false); } -void Item::fillqsulam(FColDsptr col) +void Item::fillqsulam(FColDsptr) { } -void Item::setqsulam(FColDsptr col) +void Item::setqsulam(FColDsptr) { } @@ -316,13 +316,13 @@ void Item::storeDynState() { } -double MbD::Item::suggestSmallerOrAcceptCollisionFirstStepSize(double hnew) +double MbD::Item::suggestSmallerOrAcceptCollisionFirstStepSize(double) { assert(false); return 0.0; } -double MbD::Item::suggestSmallerOrAcceptCollisionStepSize(double hnew) +double MbD::Item::suggestSmallerOrAcceptCollisionStepSize(double) { assert(false); return 0.0; @@ -356,47 +356,47 @@ void Item::postVelIC() { } -void Item::fillqsudot(FColDsptr col) +void Item::fillqsudot(FColDsptr) { } -void MbD::Item::fillqsudotPlam(FColDsptr col) +void MbD::Item::fillqsudotPlam(FColDsptr) { assert(false); } -void MbD::Item::fillqsudotPlamDeriv(FColDsptr col) +void MbD::Item::fillqsudotPlamDeriv(FColDsptr) { assert(false); } -void Item::fillqsudotWeights(DiagMatDsptr diagMat) +void Item::fillqsudotWeights(DiagMatDsptr) { } -void Item::fillVelICError(FColDsptr col) +void Item::fillVelICError(FColDsptr) { } -void Item::fillVelICJacob(SpMatDsptr mat) +void Item::fillVelICJacob(SpMatDsptr) { } -void MbD::Item::getString(std::string str) +void MbD::Item::getString(std::string) { assert(false); } -void Item::setqsudotlam(FColDsptr col) +void Item::setqsudotlam(FColDsptr) { } -void MbD::Item::setqsudotPlam(FColDsptr col) +void MbD::Item::setqsudotPlam(FColDsptr) { assert(false); } -void MbD::Item::setqsudotPlamDeriv(FColDsptr col) +void MbD::Item::setqsudotPlamDeriv(FColDsptr) { assert(false); } @@ -469,48 +469,48 @@ void MbD::Item::postCollisionStep() assert(false); } -void Item::fillqsuddotlam(FColDsptr col) +void Item::fillqsuddotlam(FColDsptr) { } -void Item::fillAccICIterError(FColDsptr col) +void Item::fillAccICIterError(FColDsptr) { } -void Item::fillAccICIterJacob(SpMatDsptr mat) +void Item::fillAccICIterJacob(SpMatDsptr) { } -void MbD::Item::fillCollisionDerivativeICError(FColDsptr col) +void MbD::Item::fillCollisionDerivativeICError(FColDsptr) { assert(false); } -void MbD::Item::fillCollisionDerivativeICJacob(SpMatDsptr mat) +void MbD::Item::fillCollisionDerivativeICJacob(SpMatDsptr) { assert(false); } -void MbD::Item::fillCollisionError(FColDsptr col) +void MbD::Item::fillCollisionError(FColDsptr) { assert(false); } -void MbD::Item::fillCollisionpFpy(SpMatDsptr mat) +void MbD::Item::fillCollisionpFpy(SpMatDsptr) { assert(false); } -void MbD::Item::fillCollisionpFpydot(SpMatDsptr mat) +void MbD::Item::fillCollisionpFpydot(SpMatDsptr) { assert(false); } -void Item::setqsudot(FColDsptr col) +void Item::setqsudot(FColDsptr) { } -void Item::setqsuddotlam(FColDsptr col) +void Item::setqsuddotlam(FColDsptr) { } @@ -525,16 +525,16 @@ void MbD::Item::storeCollisionState() assert(false); } -void Item::discontinuityAtaddTypeTo(double t, std::shared_ptr> disconTypes) +void Item::discontinuityAtaddTypeTo(double, std::shared_ptr>) { } -void MbD::Item::discontinuityAtICAddTo(std::shared_ptr> disconTypes) +void MbD::Item::discontinuityAtICAddTo(std::shared_ptr>) { assert(false); } -double Item::checkForDynDiscontinuityBetweenand(double tprev, double t) +double Item::checkForDynDiscontinuityBetweenand(double, double t) { //"Check for discontinuity in the last step defined by the interval (tprevious,t]." //"Default is assume no discontinuity and return t." @@ -546,7 +546,7 @@ void Item::constraintsReport() { } -void Item::setqsu(FColDsptr qsuOld) +void Item::setqsu(FColDsptr) { } @@ -565,17 +565,17 @@ void Item::logString(const char* chars) this->logString(str); } -void MbD::Item::logStringwithArgument(const char* chars, const char* chars1) +void MbD::Item::logStringwithArgument(const char*, const char*) { assert(false); } -void MbD::Item::logStringwithArguments(const char* chars, std::shared_ptr> arrayOfChars) +void MbD::Item::logStringwithArguments(const char*, std::shared_ptr>) { assert(false); } -void MbD::Item::normalImpulse(double imp) +void MbD::Item::normalImpulse(double) { assert(false); } @@ -618,14 +618,14 @@ void MbD::Item::postStaticIteration() assert(false); } -void Item::fillPosICError(FColDsptr col) +void Item::fillPosICError(FColDsptr) { } -void Item::fillPosICJacob(FMatDsptr mat) +void Item::fillPosICJacob(FMatDsptr) { } -void Item::fillPosICJacob(SpMatDsptr mat) +void Item::fillPosICJacob(SpMatDsptr) { } diff --git a/OndselSolver/Joint.cpp b/OndselSolver/Joint.cpp index 1c53930..334d207 100644 --- a/OndselSolver/Joint.cpp +++ b/OndselSolver/Joint.cpp @@ -134,7 +134,7 @@ void Joint::fillqsudot(FColDsptr col) constraintsDo([&](std::shared_ptr con) { con->fillqsudot(col); }); } -void Joint::fillqsudotWeights(DiagMatDsptr diagMat) +void Joint::fillqsudotWeights(DiagMatDsptr) { } @@ -170,7 +170,7 @@ void Joint::fillPosICJacob(SpMatDsptr mat) void Joint::removeRedundantConstraints(std::shared_ptr> redundantEqnNos) { - for (int i = 0; i < constraints->size(); i++) + for (int i = 0; i < (int)constraints->size(); i++) { auto& constraint = constraints->at(i); if (std::find(redundantEqnNos->begin(), redundantEqnNos->end(), constraint->iG) != redundantEqnNos->end()) { @@ -183,7 +183,7 @@ void Joint::removeRedundantConstraints(std::shared_ptr> redunda void Joint::reactivateRedundantConstraints() { - for (int i = 0; i < constraints->size(); i++) + for (int i = 0; i < (int)constraints->size(); i++) { auto& con = constraints->at(i); if (con->isRedundant()) { diff --git a/OndselSolver/KineIntegrator.cpp b/OndselSolver/KineIntegrator.cpp index df403eb..98d62a1 100644 --- a/OndselSolver/KineIntegrator.cpp +++ b/OndselSolver/KineIntegrator.cpp @@ -42,7 +42,7 @@ void KineIntegrator::runInitialConditionTypeSolution() system->runAccKine(); } -void KineIntegrator::iStep(int i) +void KineIntegrator::iStep(int) { assert(false); } diff --git a/OndselSolver/LDUFullMat.cpp b/OndselSolver/LDUFullMat.cpp index 5a7a4c7..6789150 100644 --- a/OndselSolver/LDUFullMat.cpp +++ b/OndselSolver/LDUFullMat.cpp @@ -17,18 +17,18 @@ FColDsptr LDUFullMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fu return answer; } -FColDsptr LDUFullMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr LDUFullMat::basicSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { assert(false); return FColDsptr(); } -void LDUFullMat::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +void LDUFullMat::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); } -void LDUFullMat::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +void LDUFullMat::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { assert(false); } @@ -105,7 +105,7 @@ void LDUFullMat::decomposesaveOriginal(FMatDsptr fullMat, bool saveOriginal) } } -void LDUFullMat::decomposesaveOriginal(SpMatDsptr spMat, bool saveOriginal) +void LDUFullMat::decomposesaveOriginal(SpMatDsptr, bool) { assert(false); } diff --git a/OndselSolver/LDUSpMat.cpp b/OndselSolver/LDUSpMat.cpp index eb3cbc2..e88a845 100644 --- a/OndselSolver/LDUSpMat.cpp +++ b/OndselSolver/LDUSpMat.cpp @@ -18,17 +18,17 @@ FColDsptr LDUSpMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullC return answer; } -void LDUSpMat::decomposesaveOriginal(FMatDsptr fullMat, bool saveOriginal) +void LDUSpMat::decomposesaveOriginal(FMatDsptr, bool) { assert(false); } -void LDUSpMat::decomposesaveOriginal(SpMatDsptr spMat, bool saveOriginal) +void LDUSpMat::decomposesaveOriginal(SpMatDsptr, bool) { assert(false); } -FColDsptr LDUSpMat::forAndBackSubsaveOriginal(FColDsptr fullCol, bool saveOriginal) +FColDsptr LDUSpMat::forAndBackSubsaveOriginal(FColDsptr, bool) { assert(false); return FColDsptr(); diff --git a/OndselSolver/LineInPlaneJoint.cpp b/OndselSolver/LineInPlaneJoint.cpp index 1dd3e40..a6c71e6 100644 --- a/OndselSolver/LineInPlaneJoint.cpp +++ b/OndselSolver/LineInPlaneJoint.cpp @@ -16,7 +16,7 @@ MbD::LineInPlaneJoint::LineInPlaneJoint() { } -MbD::LineInPlaneJoint::LineInPlaneJoint(const char* str) +MbD::LineInPlaneJoint::LineInPlaneJoint(const char*) { } diff --git a/OndselSolver/LinearMultiStepMethod.cpp b/OndselSolver/LinearMultiStepMethod.cpp index 3216f72..d1e8691 100644 --- a/OndselSolver/LinearMultiStepMethod.cpp +++ b/OndselSolver/LinearMultiStepMethod.cpp @@ -30,7 +30,7 @@ FColDsptr MbD::LinearMultiStepMethod::derivativeatpresentpast(int n, double t, F return answer; } -FColDsptr MbD::LinearMultiStepMethod::derivativepresentpast(int order, FColDsptr y, std::shared_ptr> ypast) +FColDsptr MbD::LinearMultiStepMethod::derivativepresentpast(int, FColDsptr, std::shared_ptr>) { assert(false); return FColDsptr(); @@ -47,9 +47,9 @@ double MbD::LinearMultiStepMethod::firstPastTimeNode() return timeNodes->at(0); } -FColDsptr MbD::LinearMultiStepMethod::derivativepresentpastpresentDerivativepastDerivative(int n, - FColDsptr y, std::shared_ptr> ypast, - FColDsptr ydot, std::shared_ptr> ydotpast) +FColDsptr MbD::LinearMultiStepMethod::derivativepresentpastpresentDerivativepastDerivative(int, + FColDsptr, std::shared_ptr>, + FColDsptr, std::shared_ptr>) { assert(false); return FColDsptr(); diff --git a/OndselSolver/MBDynGravity.cpp b/OndselSolver/MBDynGravity.cpp index a81a9a6..0fdbe45 100644 --- a/OndselSolver/MBDynGravity.cpp +++ b/OndselSolver/MBDynGravity.cpp @@ -45,7 +45,7 @@ void MbD::MBDynGravity::parseMBDyn(std::string line) gvec->magnifySelf(mag); } -void MbD::MBDynGravity::readFunction(std::vector& args) +void MbD::MBDynGravity::readFunction(std::vector&) { assert(false); noop(); diff --git a/OndselSolver/MBDynItem.cpp b/OndselSolver/MBDynItem.cpp index 93d822c..60e7ee8 100644 --- a/OndselSolver/MBDynItem.cpp +++ b/OndselSolver/MBDynItem.cpp @@ -29,12 +29,12 @@ void MbD::MBDynItem::noop() //No Operations } -void MbD::MBDynItem::parseMBDyn(std::vector& lines) +void MbD::MBDynItem::parseMBDyn(std::vector&) { assert(false); } -void MbD::MBDynItem::parseMBDyn(std::string line) +void MbD::MBDynItem::parseMBDyn(std::string) { assert(false); } diff --git a/OndselSolver/MBDynNode.cpp b/OndselSolver/MBDynNode.cpp index dfea1af..f75302d 100644 --- a/OndselSolver/MBDynNode.cpp +++ b/OndselSolver/MBDynNode.cpp @@ -8,7 +8,7 @@ void MbD::MBDynNode::initialize() { } -void MbD::MBDynNode::parseMBDyn(std::vector& lines) +void MbD::MBDynNode::parseMBDyn(std::vector&) { assert(false); } diff --git a/OndselSolver/MBDynSystem.cpp b/OndselSolver/MBDynSystem.cpp index 19854c0..bcde364 100644 --- a/OndselSolver/MBDynSystem.cpp +++ b/OndselSolver/MBDynSystem.cpp @@ -149,12 +149,12 @@ void MbD::MBDynSystem::outputFiles() auto movFile = filename.substr(0, filename.find_last_of('.')) + ".mov"; auto asmtAsm = asmtAssembly(); auto& asmtTimes = asmtAsm->times; - auto& asmtParts = asmtAsm->parts; - auto& asmtJoints = asmtAsm->joints; - auto& asmtMotions = asmtAsm->motions; + //auto& asmtParts = asmtAsm->parts; + //auto& asmtJoints = asmtAsm->joints; + //auto& asmtMotions = asmtAsm->motions; std::ofstream os(movFile); os << std::setprecision(static_cast(std::numeric_limits::digits10) + 1); - for (int i = 1; i < asmtTimes->size(); i++) + for (int i = 1; i < (int)asmtTimes->size(); i++) { for (auto& node : *nodes) { node->outputLine(i, os); @@ -248,7 +248,7 @@ void MbD::MBDynSystem::readElementsBlock(std::vector& lines) void MbD::MBDynSystem::eraseComments(std::vector& lines) { - for (int i = 0; i < lines.size(); i++) + for (int i = 0; i < (int)lines.size(); i++) { auto& line = lines[i]; auto it = line.find('#'); @@ -396,7 +396,7 @@ void MbD::MBDynSystem::parseMBDynVariables(std::vector& lines) auto userFunc = std::make_shared(str, 1.0); parser->parseUserFunction(userFunc); auto& sym = parser->stack->top(); - auto val = sym->getValue(); + //auto val = sym->getValue(); variables->insert(std::make_pair(variable, sym)); lines.erase(it); } diff --git a/OndselSolver/MarkerFrame.cpp b/OndselSolver/MarkerFrame.cpp index febbf6f..ac20528 100644 --- a/OndselSolver/MarkerFrame.cpp +++ b/OndselSolver/MarkerFrame.cpp @@ -42,7 +42,7 @@ void MarkerFrame::initializeLocally() { pprOmOpEpE = EulerParameters::ppApEpEtimesColumn(rpmp); ppAOmpEpE = EulerParameters::ppApEpEtimesMatrix(aApm); - for (int i = 0; i < endFrames->size(); i++) + for (int i = 0; i < (int)endFrames->size(); i++) { auto eFrmqc = std::dynamic_pointer_cast(endFrames->at(i)); if (eFrmqc) { diff --git a/OndselSolver/MatrixDecomposition.cpp b/OndselSolver/MatrixDecomposition.cpp index 9cc74ec..6695794 100644 --- a/OndselSolver/MatrixDecomposition.cpp +++ b/OndselSolver/MatrixDecomposition.cpp @@ -10,7 +10,7 @@ using namespace MbD; -FColDsptr MbD::MatrixDecomposition::forAndBackSubsaveOriginal(FColDsptr fullCol, bool saveOriginal) +FColDsptr MbD::MatrixDecomposition::forAndBackSubsaveOriginal(FColDsptr, bool) { assert(false); return FColDsptr(); @@ -26,7 +26,7 @@ void MatrixDecomposition::applyRowOrderOnRightHandSideB() rightHandSideB = answer; } -FColDsptr MbD::MatrixDecomposition::basicSolvewithsaveOriginal(FMatDsptr aMatrix, FColDsptr aVector, bool saveOriginal) +FColDsptr MbD::MatrixDecomposition::basicSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { assert(false); return FColDsptr(); @@ -52,7 +52,7 @@ void MbD::MatrixDecomposition::postSolve() assert(false); } -void MbD::MatrixDecomposition::preSolvesaveOriginal(FMatDsptr aMatrix, bool saveOriginal) +void MbD::MatrixDecomposition::preSolvesaveOriginal(FMatDsptr, bool) { assert(false); } diff --git a/OndselSolver/MatrixSolver.cpp b/OndselSolver/MatrixSolver.cpp index b4cb93b..f7ceccc 100644 --- a/OndselSolver/MatrixSolver.cpp +++ b/OndselSolver/MatrixSolver.cpp @@ -24,7 +24,7 @@ void MatrixSolver::initialize() singularPivotTolerance = 4 * std::numeric_limits::epsilon(); } -void MatrixSolver::setSystem(Solver* sys) +void MatrixSolver::setSystem(Solver*) { } @@ -53,7 +53,7 @@ FColDsptr MatrixSolver::timedSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr f return answerX; } -FColDsptr MatrixSolver::timedSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr MatrixSolver::timedSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { return FColDsptr(); } diff --git a/OndselSolver/MomentOfInertiaSolver.cpp b/OndselSolver/MomentOfInertiaSolver.cpp index 91c2dd9..ad92789 100644 --- a/OndselSolver/MomentOfInertiaSolver.cpp +++ b/OndselSolver/MomentOfInertiaSolver.cpp @@ -99,30 +99,30 @@ void MbD::MomentOfInertiaSolver::postSolve() { } -FColDsptr MbD::MomentOfInertiaSolver::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr MbD::MomentOfInertiaSolver::basicSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { return FColDsptr(); } -FColDsptr MbD::MomentOfInertiaSolver::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +FColDsptr MbD::MomentOfInertiaSolver::basicSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { return FColDsptr(); } -void MbD::MomentOfInertiaSolver::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal) +void MbD::MomentOfInertiaSolver::preSolvewithsaveOriginal(FMatDsptr, FColDsptr, bool) { } -void MbD::MomentOfInertiaSolver::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal) +void MbD::MomentOfInertiaSolver::preSolvewithsaveOriginal(SpMatDsptr, FColDsptr, bool) { } -double MbD::MomentOfInertiaSolver::getmatrixArowimaxMagnitude(int i) +double MbD::MomentOfInertiaSolver::getmatrixArowimaxMagnitude(int) { return 0.0; } -void MbD::MomentOfInertiaSolver::doPivoting(int p) +void MbD::MomentOfInertiaSolver::doPivoting(int) { } @@ -267,7 +267,7 @@ FColDsptr MbD::MomentOfInertiaSolver::eigenvectorFor(double lam) auto row1 = aJcmPcopy->at(1); auto row2 = aJcmPcopy->at(2); auto norm0 = row0->length(); - auto aaaa = row2->length(); + //auto aaaa = row2->length(); if ((row2->length() / norm0) > 1.0e-5) throw std::runtime_error("3rd row should be very small."); if ((row1->length() / norm0) > 1.0e-5) { e2 = 1.0; diff --git a/OndselSolver/Negative.cpp b/OndselSolver/Negative.cpp index e26c41e..fdf73fc 100644 --- a/OndselSolver/Negative.cpp +++ b/OndselSolver/Negative.cpp @@ -25,13 +25,13 @@ Symsptr MbD::Negative::differentiateWRTx() return sptrConstant(-1); } -Symsptr MbD::Negative::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Negative::expandUntil(Symsptr, std::shared_ptr> set) { auto expand = xx->expandUntil(xx, set); return std::make_shared(expand); } -Symsptr MbD::Negative::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Negative::simplifyUntil(Symsptr, std::shared_ptr> set) { auto simple = xx->simplifyUntil(xx, set); if (simple->isConstant()) { diff --git a/OndselSolver/NoRotationJoint.cpp b/OndselSolver/NoRotationJoint.cpp index 74cfe3a..d55f8e4 100644 --- a/OndselSolver/NoRotationJoint.cpp +++ b/OndselSolver/NoRotationJoint.cpp @@ -17,7 +17,7 @@ MbD::NoRotationJoint::NoRotationJoint() { } -MbD::NoRotationJoint::NoRotationJoint(const char* str) +MbD::NoRotationJoint::NoRotationJoint(const char*) { } diff --git a/OndselSolver/Numeric.h b/OndselSolver/Numeric.h index d4bd4e9..6068d09 100644 --- a/OndselSolver/Numeric.h +++ b/OndselSolver/Numeric.h @@ -27,7 +27,7 @@ namespace MbD { { T previous, next; next = vec->at(0); - for (int i = 1; i < vec->size(); i++) + for (int i = 1; i < (int)vec->size(); i++) { previous = next; next = vec->at(i); diff --git a/OndselSolver/Orientation.cpp b/OndselSolver/Orientation.cpp index 6f2bc33..0dfdea4 100644 --- a/OndselSolver/Orientation.cpp +++ b/OndselSolver/Orientation.cpp @@ -16,7 +16,7 @@ MbD::Orientation::Orientation() { } -MbD::Orientation::Orientation(const char* str) +MbD::Orientation::Orientation(const char*) { } diff --git a/OndselSolver/ParallelAxesJoint.cpp b/OndselSolver/ParallelAxesJoint.cpp index 0341856..380c0f3 100644 --- a/OndselSolver/ParallelAxesJoint.cpp +++ b/OndselSolver/ParallelAxesJoint.cpp @@ -16,7 +16,7 @@ MbD::ParallelAxesJoint::ParallelAxesJoint() { } -MbD::ParallelAxesJoint::ParallelAxesJoint(const char* str) +MbD::ParallelAxesJoint::ParallelAxesJoint(const char*) { } diff --git a/OndselSolver/Part.cpp b/OndselSolver/Part.cpp index 35063e0..7f24ef0 100644 --- a/OndselSolver/Part.cpp +++ b/OndselSolver/Part.cpp @@ -244,7 +244,7 @@ void Part::fillEssenConstraints(std::shared_ptrfillEssenConstraints(essenConstraints); } -void Part::fillRedundantConstraints(std::shared_ptr>> redunConstraints) +void Part::fillRedundantConstraints(std::shared_ptr>>) { } diff --git a/OndselSolver/PartFrame.cpp b/OndselSolver/PartFrame.cpp index 263cb32..24344cd 100644 --- a/OndselSolver/PartFrame.cpp +++ b/OndselSolver/PartFrame.cpp @@ -150,7 +150,7 @@ void PartFrame::removeRedundantConstraints(std::shared_ptr> red redunCon->constraint = aGeu; aGeu = redunCon; } - for (int i = 0; i < aGabs->size(); i++) + for (int i = 0; i < (int)aGabs->size(); i++) { auto& constraint = aGabs->at(i); if (std::find(redundantEqnNos->begin(), redundantEqnNos->end(), constraint->iG) != redundantEqnNos->end()) { @@ -164,7 +164,7 @@ void PartFrame::removeRedundantConstraints(std::shared_ptr> red void PartFrame::reactivateRedundantConstraints() { if (aGeu->isRedundant()) aGeu = std::dynamic_pointer_cast(aGeu)->constraint; - for (int i = 0; i < aGabs->size(); i++) + for (int i = 0; i < (int)aGabs->size(); i++) { auto& con = aGabs->at(i); if (con->isRedundant()) { @@ -250,7 +250,7 @@ void PartFrame::fillEssenConstraints(std::shared_ptr con) { con->fillEssenConstraints(con, essenConstraints); }); } -void PartFrame::fillRedundantConstraints(std::shared_ptr>> redunConstraints) +void PartFrame::fillRedundantConstraints(std::shared_ptr>>) { } diff --git a/OndselSolver/PerpendicularJoint.cpp b/OndselSolver/PerpendicularJoint.cpp index 228b769..a8c30ab 100644 --- a/OndselSolver/PerpendicularJoint.cpp +++ b/OndselSolver/PerpendicularJoint.cpp @@ -16,7 +16,7 @@ MbD::PerpendicularJoint::PerpendicularJoint() { } -MbD::PerpendicularJoint::PerpendicularJoint(const char* str) +MbD::PerpendicularJoint::PerpendicularJoint(const char*) { } diff --git a/OndselSolver/PiecewiseFunction.cpp b/OndselSolver/PiecewiseFunction.cpp index 5e88f89..71454e4 100644 --- a/OndselSolver/PiecewiseFunction.cpp +++ b/OndselSolver/PiecewiseFunction.cpp @@ -28,7 +28,7 @@ MbD::PiecewiseFunction::PiecewiseFunction(Symsptr var, std::shared_ptrinsert(transitions->end(), trans->begin(), trans->end()); } -Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr, std::shared_ptr> set) { auto expansions = std::make_shared>(); std::transform(functions->begin(), @@ -39,7 +39,7 @@ Symsptr MbD::PiecewiseFunction::expandUntil(Symsptr sptr, std::shared_ptr(xx, expansions, transitions); } -Symsptr MbD::PiecewiseFunction::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::PiecewiseFunction::simplifyUntil(Symsptr, std::shared_ptr> set) { auto simplifications = std::make_shared>(); std::transform(functions->begin(), @@ -70,7 +70,7 @@ Symsptr MbD::PiecewiseFunction::integrateWRT(Symsptr var) std::back_inserter(*integrals), [var](auto& func) { return func->integrateWRT(var); } ); - for (int i = 0; i < transitions->size(); i++) + for (int i = 0; i < (int)transitions->size(); i++) { auto x = transitions->at(i)->getValue(); auto fi = integrals->at(i)->getValue(x); @@ -85,7 +85,7 @@ Symsptr MbD::PiecewiseFunction::integrateWRT(Symsptr var) double MbD::PiecewiseFunction::getValue() { auto xval = xx->getValue(); - for (int i = 0; i < transitions->size(); i++) + for (int i = 0; i < (int)transitions->size(); i++) { if (xval < transitions->at(i)->getValue()) { return functions->at(i)->getValue(); @@ -99,14 +99,14 @@ std::ostream& MbD::PiecewiseFunction::printOn(std::ostream& s) const s << "PiecewiseFunction(" << *xx << ", " << std::endl; s << "functions{" << std::endl; s << *functions->at(0) << std::endl; - for (int i = 1; i < functions->size(); i++) + for (int i = 1; i < (int)functions->size(); i++) { s << *functions->at(i) << std::endl; } s << "}, " << std::endl; s << "transitions{" << std::endl; s << *transitions->at(0) << std::endl; - for (int i = 1; i < transitions->size(); i++) + for (int i = 1; i < (int)transitions->size(); i++) { s << *transitions->at(i) << std::endl; } diff --git a/OndselSolver/PlanarJoint.cpp b/OndselSolver/PlanarJoint.cpp index 5475775..a79fcfa 100644 --- a/OndselSolver/PlanarJoint.cpp +++ b/OndselSolver/PlanarJoint.cpp @@ -16,7 +16,7 @@ MbD::PlanarJoint::PlanarJoint() { } -MbD::PlanarJoint::PlanarJoint(const char* str) +MbD::PlanarJoint::PlanarJoint(const char*) { } diff --git a/OndselSolver/PointInPlaneJoint.cpp b/OndselSolver/PointInPlaneJoint.cpp index f3c5994..992db5a 100644 --- a/OndselSolver/PointInPlaneJoint.cpp +++ b/OndselSolver/PointInPlaneJoint.cpp @@ -15,7 +15,7 @@ MbD::PointInPlaneJoint::PointInPlaneJoint() { } -MbD::PointInPlaneJoint::PointInPlaneJoint(const char* str) +MbD::PointInPlaneJoint::PointInPlaneJoint(const char*) { } diff --git a/OndselSolver/Polynomial.cpp b/OndselSolver/Polynomial.cpp index d402249..2993686 100644 --- a/OndselSolver/Polynomial.cpp +++ b/OndselSolver/Polynomial.cpp @@ -29,10 +29,10 @@ MbD::Polynomial::Polynomial(Symsptr var, std::shared_ptr> c coeffs->insert(coeffs->end(), coefficients->begin(), coefficients->end()); } -Symsptr MbD::Polynomial::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Polynomial::expandUntil(Symsptr, std::shared_ptr> set) { auto newCoeffs = std::make_shared>(); - for (int i = 0; i < coeffs->size(); i++) + for (int i = 0; i < (int)coeffs->size(); i++) { auto coeff = coeffs->at(i); auto newCoeff = coeff->expandUntil(coeff, set); @@ -41,10 +41,10 @@ Symsptr MbD::Polynomial::expandUntil(Symsptr sptr, std::shared_ptr(xx, newCoeffs); } -Symsptr MbD::Polynomial::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Polynomial::simplifyUntil(Symsptr, std::shared_ptr> set) { auto newCoeffs = std::make_shared>(); - for (int i = 0; i < coeffs->size(); i++) + for (int i = 0; i < (int)coeffs->size(); i++) { auto coeff = coeffs->at(i); auto newCoeff = coeff->simplifyUntil(coeff, set); @@ -58,7 +58,7 @@ Symsptr MbD::Polynomial::differentiateWRTx() //Differentiate powers if (coeffs->size() == 1) return sptrConstant(0.0); auto newCoeffs = std::make_shared>(); - for (int i = 1; i < coeffs->size(); i++) + for (int i = 1; i < (int)coeffs->size(); i++) { auto newCoeff = i * coeffs->at(i)->getValue(); newCoeffs->push_back(sptrConstant(newCoeff)); @@ -80,7 +80,7 @@ Symsptr MbD::Polynomial::integrateWRT(Symsptr var) assert(xx == var); auto newCoeffs = std::make_shared>(); newCoeffs->push_back(sptrConstant(0.0)); - for (int i = 0; i < coeffs->size(); i++) + for (int i = 0; i < (int)coeffs->size(); i++) { auto newCoeff = coeffs->at(i)->getValue() / (i + 1); newCoeffs->push_back(sptrConstant(newCoeff)); @@ -93,7 +93,7 @@ double MbD::Polynomial::getValue() auto xvalue = xx->getValue(); auto xpower = 1.0; auto answer = 0.0; - for (int i = 0; i < coeffs->size(); i++) + for (int i = 0; i < (int)coeffs->size(); i++) { answer += coeffs->at(i)->getValue() * xpower; xpower *= xvalue; @@ -113,7 +113,7 @@ std::ostream& MbD::Polynomial::printOn(std::ostream& s) const s << *xx << ", "; s << "coeffs{"; s << *coeffs->at(0); - for (int i = 1; i < coeffs->size(); i++) + for (int i = 1; i < (int)coeffs->size(); i++) { s << ", " << *coeffs->at(i); } diff --git a/OndselSolver/PosICKineNewtonRaphson.cpp b/OndselSolver/PosICKineNewtonRaphson.cpp index cd846e8..14f6fd9 100644 --- a/OndselSolver/PosICKineNewtonRaphson.cpp +++ b/OndselSolver/PosICKineNewtonRaphson.cpp @@ -47,7 +47,7 @@ void PosICKineNewtonRaphson::assignEquationNumbers() con->iG = eqnNo; eqnNo += 1; } - auto lastEqnNo = eqnNo - 1; + //auto lastEqnNo = eqnNo - 1; nEqns = eqnNo; //C++ uses index 0. n = nEqns; } diff --git a/OndselSolver/PosICNewtonRaphson.cpp b/OndselSolver/PosICNewtonRaphson.cpp index ddfd8c2..69ffa42 100644 --- a/OndselSolver/PosICNewtonRaphson.cpp +++ b/OndselSolver/PosICNewtonRaphson.cpp @@ -110,11 +110,13 @@ void PosICNewtonRaphson::handleSingularMatrix() auto& r = *matrixSolver; std::string str = typeid(r).name(); if (str.find("GESpMatParPvMarkoFast") != std::string::npos) { - matrixSolver = CREATE::With(); - this->solveEquations(); + matrixSolver = CREATE::With(); + this->solveEquations(); } else { - str = typeid(*matrixSolver).name(); + auto& msRef = *matrixSolver.get(); // extrapolated to suppress warning + str = typeid(msRef).name(); + (void) msRef; // also for warning suppression if (str.find("GESpMatParPvPrecise") != std::string::npos) { this->lookForRedundantConstraints(); matrixSolver = this->matrixSolverClassNew(); diff --git a/OndselSolver/Power.cpp b/OndselSolver/Power.cpp index 75c1708..489d924 100644 --- a/OndselSolver/Power.cpp +++ b/OndselSolver/Power.cpp @@ -35,7 +35,7 @@ Symsptr MbD::Power::differentiateWRTy() return deriv->simplified(); } -Symsptr MbD::Power::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Power::simplifyUntil(Symsptr, std::shared_ptr>) { assert(false); return Symsptr(); diff --git a/OndselSolver/Product.cpp b/OndselSolver/Product.cpp index 488efd0..ee3b0cf 100644 --- a/OndselSolver/Product.cpp +++ b/OndselSolver/Product.cpp @@ -29,7 +29,7 @@ Symsptr MbD::Product::differentiateWRT(Symsptr var) } ); auto derivativeTerms = std::make_shared>(); - for (int i = 0; i < terms->size(); i++) + for (int i = 0; i < (int)terms->size(); i++) { auto& derivative = derivatives->at(i); auto newTermFunctions = std::make_shared>(*terms); @@ -103,7 +103,7 @@ Symsptr Product::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr Product::simplifyUntil(Symsptr, std::shared_ptr> set) { auto itr = std::find_if(set->begin(), set->end(), [this](Symsptr sym) {return this == (sym.get()); }); if (itr != set->end()) { @@ -146,7 +146,7 @@ std::ostream& Product::printOn(std::ostream& s) const { s << "("; s << *(this->terms->at(0)); - for (int i = 1; i < this->terms->size(); i++) + for (int i = 1; i < (int)this->terms->size(); i++) { s << "*" << *(this->terms->at(i)); } @@ -162,7 +162,7 @@ bool Product::isProduct() double Product::getValue() { double answer = 1.0; - for (int i = 0; i < terms->size(); i++) answer *= terms->at(i)->getValue(); + for (int i = 0; i < (int)terms->size(); i++) answer *= terms->at(i)->getValue(); return answer; } diff --git a/OndselSolver/RedundantConstraint.cpp b/OndselSolver/RedundantConstraint.cpp index d1190d5..6ed7957 100644 --- a/OndselSolver/RedundantConstraint.cpp +++ b/OndselSolver/RedundantConstraint.cpp @@ -10,7 +10,7 @@ using namespace MbD; -void RedundantConstraint::removeRedundantConstraints(std::shared_ptr> redundantEqnNos) +void RedundantConstraint::removeRedundantConstraints(std::shared_ptr>) { } @@ -30,11 +30,11 @@ ConstraintType RedundantConstraint::type() return redundant; } -void MbD::RedundantConstraint::fillqsuddotlam(FColDsptr col) +void MbD::RedundantConstraint::fillqsuddotlam(FColDsptr) { } -void RedundantConstraint::fillqsulam(FColDsptr col) +void RedundantConstraint::fillqsulam(FColDsptr) { } @@ -46,19 +46,19 @@ void RedundantConstraint::prePosIC() { } -void RedundantConstraint::fillEssenConstraints(std::shared_ptr sptr, std::shared_ptr>> essenConstraints) +void RedundantConstraint::fillEssenConstraints(std::shared_ptr, std::shared_ptr>>) { } -void RedundantConstraint::fillDispConstraints(std::shared_ptr sptr, std::shared_ptr>> dispConstraints) +void RedundantConstraint::fillDispConstraints(std::shared_ptr, std::shared_ptr>>) { } -void RedundantConstraint::fillPerpenConstraints(std::shared_ptr sptr, std::shared_ptr>> perpenConstraints) +void RedundantConstraint::fillPerpenConstraints(std::shared_ptr, std::shared_ptr>>) { } -void RedundantConstraint::fillConstraints(std::shared_ptr sptr, std::shared_ptr>> redunConstraints) +void RedundantConstraint::fillConstraints(std::shared_ptr, std::shared_ptr>>) { } @@ -67,23 +67,23 @@ void RedundantConstraint::fillRedundantConstraints(std::shared_ptr s redunConstraints->push_back(sptr); } -void RedundantConstraint::setqsulam(FColDsptr col) +void RedundantConstraint::setqsulam(FColDsptr) { } -void RedundantConstraint::setqsudotlam(FColDsptr col) +void RedundantConstraint::setqsudotlam(FColDsptr) { } -void RedundantConstraint::fillPosICError(FColDsptr col) +void RedundantConstraint::fillPosICError(FColDsptr) { } -void RedundantConstraint::fillPosKineError(FColDsptr col) +void RedundantConstraint::fillPosKineError(FColDsptr) { } -void RedundantConstraint::fillPosKineJacob(SpMatDsptr mat) +void RedundantConstraint::fillPosKineJacob(SpMatDsptr) { } @@ -95,15 +95,15 @@ void RedundantConstraint::preAccIC() { } -void RedundantConstraint::fillAccICIterError(FColDsptr col) +void RedundantConstraint::fillAccICIterError(FColDsptr) { } -void RedundantConstraint::setqsuddotlam(FColDsptr col) +void RedundantConstraint::setqsuddotlam(FColDsptr) { } -void RedundantConstraint::discontinuityAtaddTypeTo(double t, std::shared_ptr> disconTypes) +void RedundantConstraint::discontinuityAtaddTypeTo(double, std::shared_ptr>) { //"Reactivate all constraints." assert(false); diff --git a/OndselSolver/RowTypeMatrix.h b/OndselSolver/RowTypeMatrix.h index 39ffa09..143bb43 100644 --- a/OndselSolver/RowTypeMatrix.h +++ b/OndselSolver/RowTypeMatrix.h @@ -34,7 +34,7 @@ namespace MbD { template inline void RowTypeMatrix::copyFrom(std::shared_ptr> x) { - for (int i = 0; i < x->size(); i++) { + for (int i = 0; i < (int)x->size(); i++) { this->at(i)->copyFrom(x->at(i)); } } diff --git a/OndselSolver/Solver.cpp b/OndselSolver/Solver.cpp index 20830f1..e66aa7d 100644 --- a/OndselSolver/Solver.cpp +++ b/OndselSolver/Solver.cpp @@ -59,7 +59,7 @@ void Solver::postRun() assert(false); } -void Solver::logString(std::string& str) +void Solver::logString(std::string&) { assert(false); } diff --git a/OndselSolver/SparseMatrix.h b/OndselSolver/SparseMatrix.h index e2d455d..549a909 100644 --- a/OndselSolver/SparseMatrix.h +++ b/OndselSolver/SparseMatrix.h @@ -98,7 +98,7 @@ namespace MbD { inline double SparseMatrix::sumOfSquares() { double sum = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { sum += this->at(i)->sumOfSquares(); } @@ -107,7 +107,7 @@ namespace MbD { template<> inline void SparseMatrix::zeroSelf() { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i)->zeroSelf(); } } @@ -119,7 +119,7 @@ namespace MbD { template inline void SparseMatrix::atijplusFullColumn(int i, int j, FColsptr fullCol) { - for (int ii = 0; ii < fullCol->size(); ii++) + for (int ii = 0; ii < (int)fullCol->size(); ii++) { this->atijplusNumber(i + ii, j, fullCol->at(ii)); } @@ -191,7 +191,7 @@ namespace MbD { inline double SparseMatrix::maxMagnitude() { double max = 0.0; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { double element = this->at(i)->maxMagnitude(); if (max < element) max = element; @@ -202,7 +202,7 @@ namespace MbD { inline std::ostream& SparseMatrix::printOn(std::ostream& s) const { s << "SpMat[" << std::endl; - for (int i = 0; i < this->size(); i++) + for (int i = 0; i < (int)this->size(); i++) { s << *(this->at(i)) << std::endl; } @@ -243,7 +243,7 @@ namespace MbD { template inline void SparseMatrix::magnifySelf(T factor) { - for (int i = 0; i < this->size(); i++) { + for (int i = 0; i < (int)this->size(); i++) { this->at(i)->magnifySelf(factor); } } diff --git a/OndselSolver/SparseRow.h b/OndselSolver/SparseRow.h index b7a4425..1a3fa48 100644 --- a/OndselSolver/SparseRow.h +++ b/OndselSolver/SparseRow.h @@ -64,7 +64,7 @@ namespace MbD { template inline void SparseRow::atiplusFullRow(int j, FRowsptr fullRow) { - for (int jj = 0; jj < fullRow->size(); jj++) + for (int jj = 0; jj < (int)fullRow->size(); jj++) { (*this)[j + jj] += fullRow->at(jj); } @@ -72,7 +72,7 @@ namespace MbD { template inline void SparseRow::atiminusFullRow(int j, FRowsptr fullRow) { - for (int jj = 0; jj < fullRow->size(); jj++) + for (int jj = 0; jj < (int)fullRow->size(); jj++) { (*this)[j + jj] -= fullRow->at(jj); } @@ -80,7 +80,7 @@ namespace MbD { template inline void SparseRow::atiplusFullRowtimes(int j, FRowsptr fullRow, double factor) { - for (int jj = 0; jj < fullRow->size(); jj++) + for (int jj = 0; jj < (int)fullRow->size(); jj++) { (*this)[j + jj] += fullRow->at(jj) * factor; } diff --git a/OndselSolver/StableBackwardDifference.cpp b/OndselSolver/StableBackwardDifference.cpp index 48a27dd..4700105 100644 --- a/OndselSolver/StableBackwardDifference.cpp +++ b/OndselSolver/StableBackwardDifference.cpp @@ -39,7 +39,9 @@ double MbD::StableBackwardDifference::pvdotpv() return sum; } -FColDsptr MbD::StableBackwardDifference::derivativepresentpastpresentDerivativepastDerivative(int n, FColDsptr y, std::shared_ptr> ypast, FColDsptr ydot, std::shared_ptr> ydotpast) +FColDsptr MbD::StableBackwardDifference::derivativepresentpastpresentDerivativepastDerivative( + int, FColDsptr, std::shared_ptr>, FColDsptr, + std::shared_ptr>) { assert(false); return FColDsptr(); @@ -93,7 +95,8 @@ FColDsptr MbD::StableBackwardDifference::derivativepresentpast(int deriv, FColDs return std::static_pointer_cast>(answer); } else { - return std::make_shared>(y->size(), 0.0); + auto ySize = (int)y->size(); + return std::make_shared>(ySize, 0.0); } } } diff --git a/OndselSolver/Sum.cpp b/OndselSolver/Sum.cpp index 1ebbd6b..ea0e1a5 100644 --- a/OndselSolver/Sum.cpp +++ b/OndselSolver/Sum.cpp @@ -38,17 +38,16 @@ void MbD::Sum::parse(std::istringstream& iss) } } -void MbD::Sum::parseTerm(std::istringstream& iss) +void MbD::Sum::parseTerm(std::istringstream&) { } void MbD::Sum::parsePlusTerm(std::istringstream& iss) { iss.get(); - } -void MbD::Sum::parseMinusTerm(std::istringstream& iss) +void MbD::Sum::parseMinusTerm(std::istringstream&) { } @@ -84,7 +83,7 @@ Symsptr Sum::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr Sum::simplifyUntil(Symsptr, std::shared_ptr> set) { auto itr = std::find_if(set->begin(), set->end(), [this](Symsptr sym) {return this == (sym.get()); }); if (itr != set->end()) { @@ -128,7 +127,7 @@ bool Sum::isSum() double Sum::getValue() { double answer = 0.0; - for (int i = 0; i < terms->size(); i++) answer += terms->at(i)->getValue(); + for (int i = 0; i < (int)terms->size(); i++) answer += terms->at(i)->getValue(); return answer; } @@ -174,7 +173,7 @@ std::ostream& Sum::printOn(std::ostream& s) const { s << "("; s << *(this->terms->at(0)); - for (int i = 1; i < this->terms->size(); i++) + for (int i = 1; i < (int)this->terms->size(); i++) { s << " + " << *(this->terms->at(i)); } diff --git a/OndselSolver/Symbolic.cpp b/OndselSolver/Symbolic.cpp index a4e711c..8fcc0bf 100644 --- a/OndselSolver/Symbolic.cpp +++ b/OndselSolver/Symbolic.cpp @@ -80,13 +80,13 @@ void Symbolic::initialize() { } -Symsptr MbD::Symbolic::differentiateWRT(Symsptr var) +Symsptr MbD::Symbolic::differentiateWRT(Symsptr) { assert(false); return Symsptr(); } -Symsptr MbD::Symbolic::integrateWRT(Symsptr var) +Symsptr MbD::Symbolic::integrateWRT(Symsptr) { assert(false); return Symsptr(); @@ -121,13 +121,13 @@ Symsptr MbD::Symbolic::expandUntil(std::shared_ptr> return expandUntil(clonesptr(), set); } -Symsptr Symbolic::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr Symbolic::expandUntil(Symsptr sptr, std::shared_ptr>) { assert(false); return sptr; } -Symsptr Symbolic::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr Symbolic::simplifyUntil(Symsptr sptr, std::shared_ptr>) { assert(false); return sptr; @@ -183,18 +183,18 @@ double Symbolic::getValue() return 0.0; } -double MbD::Symbolic::getValue(double arg) +double MbD::Symbolic::getValue(double) { assert(false); return 0.0; } -void MbD::Symbolic::setValue(double val) +void MbD::Symbolic::setValue(double) { assert(false); } -void MbD::Symbolic::createMbD(std::shared_ptr mbdSys, std::shared_ptr mbdUnits) +void MbD::Symbolic::createMbD(std::shared_ptr, std::shared_ptr) { assert(false); return; @@ -217,7 +217,7 @@ bool MbD::Symbolic::isVariable() return false; } -void MbD::Symbolic::integrationConstant(double integConstant) +void MbD::Symbolic::integrationConstant(double) { assert(false); } diff --git a/OndselSolver/SymbolicParser.cpp b/OndselSolver/SymbolicParser.cpp index ebd5b75..4110547 100644 --- a/OndselSolver/SymbolicParser.cpp +++ b/OndselSolver/SymbolicParser.cpp @@ -422,7 +422,7 @@ bool MbD::SymbolicParser::raisedTo() return false; } -bool MbD::SymbolicParser::expected(std::string msg) +bool MbD::SymbolicParser::expected(std::string) { return false; } @@ -468,7 +468,7 @@ void MbD::SymbolicParser::notify(std::string msg) notifyat(msg, mark); } -void MbD::SymbolicParser::notifyat(std::string msg, int mrk) +void MbD::SymbolicParser::notifyat(std::string, int) { //"Temporarily reset source in order to get full contents" auto p = source->tellg(); @@ -487,7 +487,7 @@ void MbD::SymbolicParser::notifyat(std::string msg, int mrk) void MbD::SymbolicParser::combineStackTo(int pos) { auto args = std::make_shared>(); - while (stack->size() > (int) pos) { + while ((int)stack->size() > pos) { Symsptr arg = stack->top(); stack->pop(); args->push_back(arg); diff --git a/OndselSolver/System.cpp b/OndselSolver/System.cpp index d10d62e..70c2a81 100644 --- a/OndselSolver/System.cpp +++ b/OndselSolver/System.cpp @@ -186,7 +186,7 @@ double System::maximumMass() double System::maximumMomentOfInertia() { double max = 0.0; - for (int i = 0; i < parts->size(); i++) + for (int i = 0; i < (int)parts->size(); i++) { auto& part = parts->at(i); for (int j = 0; j < 3; j++) diff --git a/OndselSolver/SystemSolver.cpp b/OndselSolver/SystemSolver.cpp index 936e312..abda70e 100644 --- a/OndselSolver/SystemSolver.cpp +++ b/OndselSolver/SystemSolver.cpp @@ -33,7 +33,7 @@ using namespace MbD; //class PosICNewtonRaphson; -void SystemSolver::setSystem(Solver* sys) +void SystemSolver::setSystem(Solver*) { //Do not use assert(false); diff --git a/OndselSolver/Translation.cpp b/OndselSolver/Translation.cpp index 07bf264..ff58ceb 100644 --- a/OndselSolver/Translation.cpp +++ b/OndselSolver/Translation.cpp @@ -16,7 +16,7 @@ MbD::Translation::Translation() { } -MbD::Translation::Translation(const char* str) +MbD::Translation::Translation(const char*) { } diff --git a/OndselSolver/Variable.cpp b/OndselSolver/Variable.cpp index 771fc3a..b3f8afc 100644 --- a/OndselSolver/Variable.cpp +++ b/OndselSolver/Variable.cpp @@ -53,12 +53,12 @@ void Variable::setValue(double val) value = val; } -Symsptr MbD::Variable::expandUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Variable::expandUntil(Symsptr sptr, std::shared_ptr>) { return sptr; } -Symsptr MbD::Variable::simplifyUntil(Symsptr sptr, std::shared_ptr> set) +Symsptr MbD::Variable::simplifyUntil(Symsptr sptr, std::shared_ptr>) { return sptr; } diff --git a/OndselSolver/VelICSolver.cpp b/OndselSolver/VelICSolver.cpp index b36ab99..a611ae0 100644 --- a/OndselSolver/VelICSolver.cpp +++ b/OndselSolver/VelICSolver.cpp @@ -40,7 +40,7 @@ void VelICSolver::assignEquationNumbers() con->iG = eqnNo; eqnNo += 1; } - auto lastEqnNo = eqnNo - 1; + //auto lastEqnNo = eqnNo - 1; nEqns = eqnNo; //C++ uses index 0. n = nEqns; } diff --git a/OndselSolver/ZTranslation.cpp b/OndselSolver/ZTranslation.cpp index 3c8ccb9..7686a17 100644 --- a/OndselSolver/ZTranslation.cpp +++ b/OndselSolver/ZTranslation.cpp @@ -16,7 +16,7 @@ MbD::ZTranslation::ZTranslation() { } -MbD::ZTranslation::ZTranslation(const char* str) +MbD::ZTranslation::ZTranslation(const char*) { }