Skip to content

Commit

Permalink
more typing
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Dec 6, 2023
1 parent fd603f4 commit 68f4852
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions OndselSolver/ASMTAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
6 changes: 3 additions & 3 deletions OndselSolver/ASMTItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void MbD::ASMTItem::deleteMbD()
mbdObject = nullptr;
}

void MbD::ASMTItem::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
void MbD::ASMTItem::createMbD(std::shared_ptr<System>, std::shared_ptr<Units>)
{
noop();
assert(false);
Expand Down Expand Up @@ -183,7 +183,7 @@ std::shared_ptr<Constant> MbD::ASMTItem::sptrConstant(double value)
return std::make_shared<Constant>(value);
}

void MbD::ASMTItem::storeOnLevel(std::ofstream& os, int level)
void MbD::ASMTItem::storeOnLevel(std::ofstream&, int)
{
noop();
assert(false);
Expand Down Expand Up @@ -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<double> 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';
}
Expand Down
12 changes: 6 additions & 6 deletions OndselSolver/ASMTItemIJ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/ASMTMarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace MbD {
return aApm;
}

void ASMTMarker::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
void ASMTMarker::createMbD(std::shared_ptr<System>, std::shared_ptr<Units> mbdUnits)
{
auto mkr = CREATE<MarkerFrame>::With(name.c_str());
auto prt = std::static_pointer_cast<Part>(partOrAssembly()->mbdObject);
Expand Down
4 changes: 2 additions & 2 deletions OndselSolver/ASMTMotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
40 changes: 20 additions & 20 deletions OndselSolver/ASMTSpatialContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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';
}
Expand Down
4 changes: 2 additions & 2 deletions OndselSolver/ASMTTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ void MbD::ASMTTime::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Un
this->xexpression(mbdTime, geoTime->simplified(geoTime));
}

Symsptr MbD::ASMTTime::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
Symsptr MbD::ASMTTime::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>>)
{
return sptr;
}

Symsptr MbD::ASMTTime::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
Symsptr MbD::ASMTTime::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>>)
{
return sptr;
}
Expand Down
4 changes: 2 additions & 2 deletions OndselSolver/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace MbD {
template<typename T>
inline void Array<T>::copyFrom(std::shared_ptr<Array<T>> x)
{
for (int i = 0; i < x->size(); i++) {
for (int i = 0; i < (int)x->size(); i++) {
this->at(i) = x->at(i);
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ namespace MbD {
template<typename T>
inline void Array<T>::equalArrayAt(std::shared_ptr<Array<T>> 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);
}
Expand Down
6 changes: 3 additions & 3 deletions OndselSolver/CADSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -45,7 +45,7 @@ void CADSystem::logString(std::string& str)
std::cout << str << std::endl;
}

void CADSystem::logString(double value)
void CADSystem::logString(double)
{
}

Expand Down Expand Up @@ -834,7 +834,7 @@ void CADSystem::runPiston()
TheSystem->runKINEMATIC(TheSystem);
}

void MbD::CADSystem::preMbDrun(std::shared_ptr<System> mbdSys)
void MbD::CADSystem::preMbDrun(std::shared_ptr<System>)
{
}

Expand Down
8 changes: 4 additions & 4 deletions OndselSolver/Constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -37,7 +37,7 @@ Symsptr MbD::Constant::integrateWRT(Symsptr var)
return std::make_shared<Polynomial>(var, coeffs);
}

Symsptr MbD::Constant::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
Symsptr MbD::Constant::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>>)
{
return sptr;
}
Expand All @@ -62,7 +62,7 @@ bool MbD::Constant::isOne()
return value == 1.0;
}

void MbD::Constant::createMbD(std::shared_ptr<System> mbdSys, std::shared_ptr<Units> mbdUnits)
void MbD::Constant::createMbD(std::shared_ptr<System>, std::shared_ptr<Units>)
{
return;
}
Expand All @@ -72,7 +72,7 @@ double MbD::Constant::getValue()
return value;
}

double MbD::Constant::getValue(double arg)
double MbD::Constant::getValue(double)
{
return value;
}
Expand Down
6 changes: 3 additions & 3 deletions OndselSolver/Constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void Constraint::fillPosICError(FColDsptr col)
col->atiplusNumber(iG, aG);
}

void Constraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redundantEqnNos)
void Constraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>>)
{
//My owner should handle this.
assert(false);
Expand Down Expand Up @@ -162,11 +162,11 @@ 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)
{
}

Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/DiagonalMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace MbD {
template<typename T>
inline void DiagonalMatrix<T>::atiputDiagonalMatrix(int i, std::shared_ptr<DiagonalMatrix<T>> 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);
}
Expand Down
2 changes: 1 addition & 1 deletion OndselSolver/DifferenceOperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace MbD;

FRowDsptr DifferenceOperator::OneOverFactorials = []() {
auto oneOverFactorials = std::make_shared<FullRow<double>>(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);
}
Expand Down
Loading

0 comments on commit 68f4852

Please sign in to comment.