Skip to content

Commit

Permalink
made unused parameters explicitely ununsed
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Nov 21, 2023
1 parent d69782e commit b2aba99
Show file tree
Hide file tree
Showing 29 changed files with 88 additions and 9 deletions.
3 changes: 2 additions & 1 deletion OndselSolver/ASMTAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ void MbD::ASMTAssembly::readKinematicIJs(std::vector<std::string>& lines)

void MbD::ASMTAssembly::readKinematicIJ(std::vector<std::string>& lines)
{
assert(false);
(void) lines; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::ASMTAssembly::readConstraintSets(std::vector<std::string>& lines)
Expand Down
10 changes: 6 additions & 4 deletions OndselSolver/ASMTConstraintSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using namespace MbD;

void MbD::ASMTConstraintSet::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
{
(void) mbdUnits; // used to suppress compiler warning
//self dataSeries : OrderedCollection new.
//self discontinuities : OrderedCollection new.
auto mbdJt = this->mbdClassNew();
Expand Down Expand Up @@ -61,10 +62,10 @@ void MbD::ASMTConstraintSet::compareResults(AnalysisType type)
{
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));
Expand All @@ -75,4 +76,5 @@ void MbD::ASMTConstraintSet::compareResults(AnalysisType type)

void MbD::ASMTConstraintSet::outputResults(AnalysisType type)
{
(void) type; // to suppress compiler warning
}
2 changes: 2 additions & 0 deletions OndselSolver/ASMTForceTorque.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ void MbD::ASMTForceTorque::updateFromMbD()

void MbD::ASMTForceTorque::compareResults(AnalysisType type)
{
(void) type; // to suppress compiler warning of unused parameter
assert(false);
}

void MbD::ASMTForceTorque::outputResults(AnalysisType type)
{
(void) type; // to suppress compiler warning of unused parameter
assert(false);
}
8 changes: 8 additions & 0 deletions OndselSolver/ASMTItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void MbD::ASMTItem::setName(std::string str)

void MbD::ASMTItem::parseASMT(std::vector<std::string>& lines)
{
(void) lines; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down Expand Up @@ -144,6 +145,8 @@ void MbD::ASMTItem::deleteMbD()

void MbD::ASMTItem::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
{
(void) mbdSys; // to suppress compiler warning of unused parameters
(void) mbdUnits; // to suppress compiler warning of unused parameters
assert(false);
}

Expand All @@ -154,11 +157,13 @@ void MbD::ASMTItem::updateFromMbD()

void MbD::ASMTItem::compareResults(AnalysisType type)
{
(void) type; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::ASMTItem::outputResults(AnalysisType type)
{
(void) type; // to suppress compiler warning of unused parameters
assert(false);
}

Expand All @@ -177,6 +182,8 @@ std::shared_ptr<Constant> MbD::ASMTItem::sptrConstant(double value)

void MbD::ASMTItem::storeOnLevel(std::ofstream& os, int level)
{
(void) os; // to suppress compiler warning of unused parameters
(void) level; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down Expand Up @@ -235,5 +242,6 @@ void MbD::ASMTItem::storeOnLevelName(std::ofstream& os, int level)

void MbD::ASMTItem::storeOnTimeSeries(std::ofstream& os)
{
(void) os; // to suppress compiler warning of unused parameters
assert(false);
}
3 changes: 3 additions & 0 deletions OndselSolver/ASMTJoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ void MbD::ASMTJoint::readJointSeries(std::vector<std::string>& lines)

void MbD::ASMTJoint::storeOnLevel(std::ofstream& os, int level)
{
(void) os; // to suppress compiler warning of unused parameters
(void) level; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::ASMTJoint::storeOnTimeSeries(std::ofstream& os)
{
(void) os; // to suppress compiler warning of unused parameters
assert(false);
}
3 changes: 3 additions & 0 deletions OndselSolver/ASMTMotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ namespace MbD {

void ASMTMotion::storeOnLevel(std::ofstream& os, int level)
{
(void) os; // to suppress compiler warning of unused parameters
(void) level; // to suppress compiler warning of unused parameters
assert(false);
}

void ASMTMotion::storeOnTimeSeries(std::ofstream& os)
{
(void) os; // to suppress compiler warning of unused parameters
assert(false);
}
}
7 changes: 5 additions & 2 deletions OndselSolver/ASMTRefCurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ using namespace MbD;

void MbD::ASMTRefCurve::parseASMT(std::vector<std::string>& lines)
{
assert(false);
(void) lines; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::ASMTRefCurve::storeOnLevel(std::ofstream& os, int level)
{
assert(false);
(void) os; // to suppress compiler warning of unused parameters
(void) level; // to suppress compiler warning of unused parameters
assert(false);
}
1 change: 1 addition & 0 deletions OndselSolver/ASMTRefSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using namespace MbD;

void MbD::ASMTRefSurface::parseASMT(std::vector<std::string>& lines)
{
(void) lines; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/AccNewtonRaphson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void AccNewtonRaphson::assignEquationNumbers()
con->iG = eqnNo;
eqnNo += 1;
}
auto lastEqnNo = eqnNo - 1;
// auto lastEqnNo = eqnNo - 1; // unused
nEqns = eqnNo; //C++ uses index 0.
n = nEqns;
}
Expand Down
1 change: 1 addition & 0 deletions OndselSolver/Constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ void Constraint::fillPosICError(FColDsptr col)
void Constraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redundantEqnNos)
{
//My owner should handle this.
(void) redundantEqnNos; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
2 changes: 2 additions & 0 deletions OndselSolver/DistanceConstraintIqctJqc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ using namespace MbD;

MbD::DistanceConstraintIqctJqc::DistanceConstraintIqctJqc(EndFrmsptr frmi, EndFrmsptr frmj) : DistanceConstraintIqcJqc(frmi, frmj)
{
(void) frmi; // to suppress compiler warning of unused parameters
(void) frmj; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/FullColumn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace MbD {
template<typename T>
FColsptr<T> FullColumn<T>::times(T a)
{
assert(a == a); // suppress warning
(void) a; // to suppress compiler warning of unused parameters
assert(false);
auto answer = std::make_shared<FullColumn<T>>();
return answer;
Expand Down
1 change: 1 addition & 0 deletions OndselSolver/FunctionWithManyArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void MbD::FunctionWithManyArgs::createMbD(std::shared_ptr<System> mbdSys, std::s

void MbD::FunctionWithManyArgs::arguments(Symsptr args)
{
(void) args; // to suppress compiler warning of unused parameters
assert(false);
}

1 change: 1 addition & 0 deletions OndselSolver/FunctionX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ void MbD::FunctionX::arguments(Symsptr args)

Symsptr MbD::FunctionX::copyWith(Symsptr arg)
{
(void) arg; // to suppress compiler warning of unused parameters
assert(false);
return Symsptr();
}
Expand Down
7 changes: 7 additions & 0 deletions OndselSolver/GEFullMat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using namespace MbD;

void GEFullMat::forwardEliminateWithPivot(int p)
{
(void) p; // to suppress compiler warning of unused parameters
assert(false);
}

Expand All @@ -40,11 +41,17 @@ void GEFullMat::postSolve()

void GEFullMat::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal)
{
(void) fullMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}

void GEFullMat::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal)
{
(void) spMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
3 changes: 3 additions & 0 deletions OndselSolver/GEFullMatParPv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ void GEFullMatParPv::postSolve()

void GEFullMatParPv::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal)
{
(void) fullMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}
1 change: 1 addition & 0 deletions OndselSolver/ICKineIntegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void ICKineIntegrator::runInitialConditionTypeSolution()

void ICKineIntegrator::iStep(int i)
{
(void) i; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
1 change: 1 addition & 0 deletions OndselSolver/IntegratorInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void IntegratorInterface::postFirstStep()
void IntegratorInterface::interpolateAt(double tArg)
{
//"Interpolate for system state at tArg and leave system in that state."
(void) tArg; // to suppress compiler warning of unused parameters
assert(false);
//auto yout = integrator->yDerivat(0, tArg);
//auto ydotout = integrator->yDerivat(1, tArg);
Expand Down
11 changes: 11 additions & 0 deletions OndselSolver/Item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void Item::calcPostDynCorrectorIteration()

void MbD::Item::checkForCollisionDiscontinuityBetweenand(double impulsePrevious, double impulse)
{
(void) impulsePrevious; // to suppress compiler warning of unused parameters
(void) impulse; // to suppress compiler warning of unused parameters
assert(false);
}

Expand All @@ -99,16 +101,19 @@ void Item::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redunEqn

void MbD::Item::setpqsumu(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::setpqsumuddot(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::setpqsumudot(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
assert(false);
}

Expand All @@ -131,31 +136,37 @@ void Item::fillPosKineJacob(SpMatDsptr mat)

void MbD::Item::fillpqsumu(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::fillpqsumudot(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
assert(false);
}

void Item::fillEssenConstraints(std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> essenConstraints)
{
(void) essenConstraints; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::fillPerpenConstraints(std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> perpenConstraints)
{
(void) perpenConstraints; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::fillpFpy(SpMatDsptr mat)
{
(void) mat; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Item::fillpFpydot(SpMatDsptr mat)
{
(void) mat; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
1 change: 1 addition & 0 deletions OndselSolver/KineIntegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void KineIntegrator::runInitialConditionTypeSolution()

void KineIntegrator::iStep(int i)
{
(void) i; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
11 changes: 11 additions & 0 deletions OndselSolver/LDUFullMat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,26 @@ FColDsptr LDUFullMat::basicSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fu

FColDsptr LDUFullMat::basicSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal)
{
(void) spMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
return FColDsptr();
}

void LDUFullMat::preSolvewithsaveOriginal(FMatDsptr fullMat, FColDsptr fullCol, bool saveOriginal)
{
(void) fullMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}

void LDUFullMat::preSolvewithsaveOriginal(SpMatDsptr spMat, FColDsptr fullCol, bool saveOriginal)
{
(void) spMat; // to suppress compiler warning of unused parameters
(void) fullCol; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down Expand Up @@ -107,6 +116,8 @@ void LDUFullMat::decomposesaveOriginal(FMatDsptr fullMat, bool saveOriginal)

void LDUFullMat::decomposesaveOriginal(SpMatDsptr spMat, bool saveOriginal)
{
(void) spMat; // to suppress compiler warning of unused parameters
(void) saveOriginal; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
4 changes: 4 additions & 0 deletions OndselSolver/MBDynDrive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ void MbD::MBDynDrive::createASMT()
{
assert(false);
}

void MBDynDrive::parseMBDyn(std::vector<std::string> &lines) {
MBDynItem::parseMBDyn(lines);
}
1 change: 1 addition & 0 deletions OndselSolver/MBDynDrive.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace MbD {
class MBDynDrive : public MBDynElement
{
public:
void parseMBDyn(std::vector<std::string>& lines) override;
void parseMBDyn(std::string line);
void readFunction(std::vector<std::string>& args);
void createASMT() override;
Expand Down
1 change: 1 addition & 0 deletions OndselSolver/MBDynNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ void MbD::MBDynNode::initialize()

void MbD::MBDynNode::parseMBDyn(std::vector<std::string>& lines)
{
(void) lines; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
1 change: 1 addition & 0 deletions OndselSolver/Product.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Symsptr MbD::Product::differentiateWRT(Symsptr var)
Symsptr MbD::Product::integrateWRT(Symsptr var)
{
//ToDo: Integration by parts
(void) var; // to suppress compiler warning of unused parameters
assert(false);
return Symsptr();
}
Expand Down
Loading

0 comments on commit b2aba99

Please sign in to comment.