runPosIC, assignEquationNumbers

This commit is contained in:
Aik-Siong Koh
2023-05-30 10:00:25 -06:00
parent 9ddbdca742
commit f4debf4865
43 changed files with 288 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
#include "Constraint.h"
//#include "Item.h"
#include "enum.h"
using namespace MbD;
@@ -20,6 +20,8 @@ void Constraint::initialize()
void MbD::Constraint::postInput()
{
lam = 0.0;
Item::postInput();
}
void Constraint::setOwner(Item* x)
@@ -38,3 +40,27 @@ void MbD::Constraint::prePosIC()
iG = -1;
Item::prePosIC();
}
void MbD::Constraint::fillEssenConstraints(std::shared_ptr<Constraint>sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> essenConstraints)
{
if (this->type() == MbD::essential) {
essenConstraints->push_back(sptr);
}
}
void MbD::Constraint::fillDispConstraints(std::shared_ptr<Constraint>sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> dispConstraints)
{
if (this->type() == MbD::displacement) {
dispConstraints->push_back(sptr);
}
}
void MbD::Constraint::fillPerpenConstraints(std::shared_ptr<Constraint>sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> perpenConstraints)
{
if (this->type() == MbD::displacement) {
perpenConstraints->push_back(sptr);
}
}
MbD::ConstraintType MbD::Constraint::type()
{
return MbD::essential;
}