runOndselPiston, runPiston execute correctly
This commit is contained in:
@@ -22,7 +22,7 @@ void Constraint::initialize()
|
||||
name = std::to_string(nanoseconds);
|
||||
}
|
||||
|
||||
void MbD::Constraint::postInput()
|
||||
void Constraint::postInput()
|
||||
{
|
||||
lam = 0.0;
|
||||
Item::postInput();
|
||||
@@ -38,14 +38,14 @@ Item* Constraint::getOwner()
|
||||
return owner;
|
||||
}
|
||||
|
||||
void MbD::Constraint::prePosIC()
|
||||
void Constraint::prePosIC()
|
||||
{
|
||||
lam = 0.0;
|
||||
iG = -1;
|
||||
Item::prePosIC();
|
||||
}
|
||||
|
||||
void MbD::Constraint::prePosKine()
|
||||
void Constraint::prePosKine()
|
||||
{
|
||||
//"Preserve lam calculated from AccIC for possible use by DynIntegrator if system is not kinematic."
|
||||
auto lamOld = lam;
|
||||
@@ -53,80 +53,80 @@ void MbD::Constraint::prePosKine()
|
||||
lam = lamOld;
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillEssenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> essenConstraints)
|
||||
void Constraint::fillEssenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> essenConstraints)
|
||||
{
|
||||
if (this->type() == MbD::essential) {
|
||||
if (this->type() == essential) {
|
||||
essenConstraints->push_back(sptr);
|
||||
}
|
||||
}
|
||||
void MbD::Constraint::fillDispConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> dispConstraints)
|
||||
void Constraint::fillDispConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> dispConstraints)
|
||||
{
|
||||
if (this->type() == MbD::displacement) {
|
||||
if (this->type() == displacement) {
|
||||
dispConstraints->push_back(sptr);
|
||||
}
|
||||
}
|
||||
void MbD::Constraint::fillPerpenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> perpenConstraints)
|
||||
void Constraint::fillPerpenConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> perpenConstraints)
|
||||
{
|
||||
if (this->type() == MbD::perpendicular) {
|
||||
if (this->type() == perpendicular) {
|
||||
perpenConstraints->push_back(sptr);
|
||||
}
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillRedundantConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> redunConstraints)
|
||||
void Constraint::fillRedundantConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> redunConstraints)
|
||||
{
|
||||
if (this->type() == MbD::redundant) {
|
||||
if (this->type() == redundant) {
|
||||
redunConstraints->push_back(sptr);
|
||||
}
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> allConstraints)
|
||||
void Constraint::fillConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> allConstraints)
|
||||
{
|
||||
allConstraints->push_back(sptr);
|
||||
}
|
||||
|
||||
MbD::ConstraintType MbD::Constraint::type()
|
||||
ConstraintType Constraint::type()
|
||||
{
|
||||
return MbD::essential;
|
||||
return essential;
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillqsulam(FColDsptr col)
|
||||
void Constraint::fillqsulam(FColDsptr col)
|
||||
{
|
||||
col->at(iG) = lam;
|
||||
}
|
||||
|
||||
void MbD::Constraint::setqsulam(FColDsptr col)
|
||||
void Constraint::setqsulam(FColDsptr col)
|
||||
{
|
||||
lam = col->at(iG);
|
||||
}
|
||||
|
||||
void MbD::Constraint::setqsudotlam(FColDsptr col)
|
||||
void Constraint::setqsudotlam(FColDsptr col)
|
||||
{
|
||||
lam = col->at(iG);
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillPosICError(FColDsptr col)
|
||||
void Constraint::fillPosICError(FColDsptr col)
|
||||
{
|
||||
col->at(iG) += aG;
|
||||
}
|
||||
|
||||
void MbD::Constraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redundantEqnNos)
|
||||
void Constraint::removeRedundantConstraints(std::shared_ptr<std::vector<int>> redundantEqnNos)
|
||||
{
|
||||
//My owner should handle this.
|
||||
assert(false);
|
||||
}
|
||||
|
||||
void MbD::Constraint::reactivateRedundantConstraints()
|
||||
void Constraint::reactivateRedundantConstraints()
|
||||
{
|
||||
//My owner should handle this.
|
||||
assert(false);
|
||||
}
|
||||
|
||||
bool MbD::Constraint::isRedundant()
|
||||
bool Constraint::isRedundant()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void MbD::Constraint::outputStates()
|
||||
void Constraint::outputStates()
|
||||
{
|
||||
Item::outputStates();
|
||||
std::stringstream ss;
|
||||
@@ -137,29 +137,37 @@ void MbD::Constraint::outputStates()
|
||||
this->logString(str);
|
||||
}
|
||||
|
||||
void MbD::Constraint::preDyn()
|
||||
void Constraint::preDyn()
|
||||
{
|
||||
mu = 0.0;
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillPosKineError(FColDsptr col)
|
||||
void Constraint::fillPosKineError(FColDsptr col)
|
||||
{
|
||||
col->atiplusNumber(iG, aG);
|
||||
}
|
||||
|
||||
void MbD::Constraint::preAccIC()
|
||||
void Constraint::preAccIC()
|
||||
{
|
||||
lam = 0.0;
|
||||
Item::preAccIC();
|
||||
}
|
||||
|
||||
void MbD::Constraint::fillAccICIterJacob(SpMatDsptr mat)
|
||||
void Constraint::fillAccICIterJacob(SpMatDsptr mat)
|
||||
{
|
||||
//"Same as velIC."
|
||||
this->fillVelICJacob(mat);
|
||||
}
|
||||
|
||||
void MbD::Constraint::setqsuddotlam(FColDsptr qsudotlam)
|
||||
void Constraint::setqsuddotlam(FColDsptr col)
|
||||
{
|
||||
lam = col->at(iG);
|
||||
}
|
||||
|
||||
void Constraint::addToJointForceI(FColDsptr col)
|
||||
{
|
||||
}
|
||||
|
||||
void Constraint::addToJointTorqueI(FColDsptr col)
|
||||
{
|
||||
lam = qsudotlam->at(iG);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user