Skip to content

Commit

Permalink
resolve remaing unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Nov 22, 2023
1 parent 0b4767a commit 522b717
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 6 deletions.
4 changes: 2 additions & 2 deletions OndselSolver/FullRow.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ namespace MbD {
template<typename T>
inline std::shared_ptr<FullVector<T>> FullRow<T>::dot(std::shared_ptr<std::vector<std::shared_ptr<FullColumn<T>>>> vecvec)
{
auto ncol = (int)this->size();
auto nelem = vecvec->at(0)->size();
int ncol = this->size();
int nelem = vecvec->at(0)->size();
auto answer = std::make_shared<FullVector<T>>(nelem);
for (int k = 0; k < nelem; k++) {
auto sum = 0.0;
Expand Down
17 changes: 17 additions & 0 deletions OndselSolver/RedundantConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using namespace MbD;

void RedundantConstraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redundantEqnNos)
{
(void) redundantEqnNos; // to suppress compiler warning of unused parameters
}

bool RedundantConstraint::isRedundant()
Expand All @@ -32,10 +33,12 @@ ConstraintType RedundantConstraint::type()

void MbD::RedundantConstraint::fillqsuddotlam(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillqsulam(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::postInput()
Expand All @@ -48,18 +51,26 @@ void RedundantConstraint::prePosIC()

void RedundantConstraint::fillEssenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> essenConstraints)
{
(void) sptr; // to suppress compiler warning of unused parameters
(void) essenConstraints; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillDispConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> dispConstraints)
{
(void) sptr; // to suppress compiler warning of unused parameters
(void) dispConstraints; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillPerpenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> perpenConstraints)
{
(void) sptr; // to suppress compiler warning of unused parameters
(void) perpenConstraints; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> redunConstraints)
{
(void) sptr; // to suppress compiler warning of unused parameters
(void) redunConstraints; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillRedundantConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> redunConstraints)
Expand All @@ -69,22 +80,27 @@ void RedundantConstraint::fillRedundantConstraints(std::shared_ptr<Constraint> s

void RedundantConstraint::setqsulam(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::setqsudotlam(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillPosICError(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillPosKineError(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::fillPosKineJacob(SpMatDsptr mat)
{
(void) mat; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::preVelIC()
Expand All @@ -97,6 +113,7 @@ void RedundantConstraint::preAccIC()

void RedundantConstraint::fillAccICIterError(FColDsptr col)
{
(void) col; // to suppress compiler warning of unused parameters
}

void RedundantConstraint::setqsuddotlam(FColDsptr col)
Expand Down
9 changes: 8 additions & 1 deletion OndselSolver/StableBackwardDifference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ double MbD::StableBackwardDifference::pvdotpv()
return sum;
}

FColDsptr MbD::StableBackwardDifference::derivativepresentpastpresentDerivativepastDerivative(int n, FColDsptr y, std::shared_ptr<std::vector<FColDsptr>> ypast, FColDsptr ydot, std::shared_ptr<std::vector<FColDsptr>> ydotpast)
FColDsptr MbD::StableBackwardDifference::derivativepresentpastpresentDerivativepastDerivative(
int n, FColDsptr y, std::shared_ptr<std::vector<FColDsptr>> ypast, FColDsptr ydot,
std::shared_ptr<std::vector<FColDsptr>> ydotpast)
{
(void) n; // to suppress compiler warning of unused parameters
(void) y; // to suppress compiler warning of unused parameters
(void) ypast; // to suppress compiler warning of unused parameters
(void) ydot; // to suppress compiler warning of unused parameters
(void) ydotpast; // to suppress compiler warning of unused parameters
assert(false);
return FColDsptr();
}
Expand Down
4 changes: 3 additions & 1 deletion OndselSolver/Sum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ void MbD::Sum::parse(std::istringstream& iss)

void MbD::Sum::parseTerm(std::istringstream& iss)
{
(void) iss; // to suppress compiler warning of unused parameters
}

void MbD::Sum::parsePlusTerm(std::istringstream& iss)
{
iss.get();

}

void MbD::Sum::parseMinusTerm(std::istringstream& iss)
{
(void) iss; // to suppress compiler warning of unused parameters
}

Symsptr Sum::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
Expand Down Expand Up @@ -86,6 +87,7 @@ Symsptr Sum::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symspt

Symsptr Sum::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
{
(void) sptr; // to suppress compiler warning of unused parameters
auto itr = std::find_if(set->begin(), set->end(), [this](Symsptr sym) {return this == (sym.get()); });
if (itr != set->end()) {
auto answer = std::make_shared<Sum>();
Expand Down
5 changes: 4 additions & 1 deletion OndselSolver/Symbolic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,15 @@ double MbD::Symbolic::getValue(double arg)

void MbD::Symbolic::setValue(double val)
{
(void) val; // to suppress compiler warning of unused parameters
assert(false);
}

void MbD::Symbolic::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);
return;
}

Symsptr MbD::Symbolic::clonesptr()
Expand All @@ -224,6 +226,7 @@ bool MbD::Symbolic::isVariable()

void MbD::Symbolic::integrationConstant(double integConstant)
{
(void) integConstant; // to suppress compiler warning of unused parameters
assert(false);
}

Expand Down
3 changes: 3 additions & 0 deletions OndselSolver/SymbolicParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ bool MbD::SymbolicParser::raisedTo()

bool MbD::SymbolicParser::expected(std::string msg)
{
(void) msg; // to suppress compiler warning of unused parameters
return false;
}

Expand Down Expand Up @@ -471,6 +472,8 @@ void MbD::SymbolicParser::notify(std::string msg)
void MbD::SymbolicParser::notifyat(std::string msg, int mrk)
{
//"Temporarily reset source in order to get full contents"
(void) msg; // to suppress compiler warning of unused parameters
(void) mrk; // to suppress compiler warning of unused parameters
auto p = source->tellg();
source->seekg(0);
auto contents = source->str();
Expand Down
1 change: 1 addition & 0 deletions OndselSolver/Translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ MbD::Translation::Translation()

MbD::Translation::Translation(const char* str)
{
(void) str; // to suppress compiler warning of unused parameters
}

void MbD::Translation::initializeGlobally()
Expand Down
2 changes: 2 additions & 0 deletions OndselSolver/Variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ void Variable::setValue(double val)

Symsptr MbD::Variable::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
{
(void) set; // to suppress compiler warning of unused parameters
return sptr;
}

Symsptr MbD::Variable::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
{
(void) set; // to suppress compiler warning of unused parameters
return sptr;
}

Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/VelICSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions OndselSolver/ZTranslation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ MbD::ZTranslation::ZTranslation()

MbD::ZTranslation::ZTranslation(const char* str)
{
(void) str; // to suppress compiler warning of unused parameters
}

void MbD::ZTranslation::initializeGlobally()
Expand Down

0 comments on commit 522b717

Please sign in to comment.