MatrixSolver NewtonRaphson

This commit is contained in:
Aik-Siong Koh
2023-05-20 17:55:13 -06:00
parent c147f2a33d
commit 6a577c052c
168 changed files with 2429 additions and 325 deletions

View File

@@ -1,15 +1,27 @@
#include "CylindricalJoint.h"
#include "System.h"
#include "DirectionCosineConstraintIJ.h"
#include "TranslationConstraintIJ.h"
using namespace MbD;
CylindricalJoint::CylindricalJoint() {
initialize();
}
CylindricalJoint::CylindricalJoint(const char* str) : Joint(str) {
initialize();
}
void CylindricalJoint::initialize()
void MbD::CylindricalJoint::initializeGlobally()
{
if (!constraints)
{
addConstraint(std::make_shared <TranslationConstraintIJ>(frmI, frmJ, 1));
addConstraint(std::make_shared <TranslationConstraintIJ>(frmI, frmJ, 2));
addConstraint(std::make_shared<DirectionCosineConstraintIJ>(frmI, frmJ, 3, 1));
addConstraint(std::make_shared<DirectionCosineConstraintIJ>(frmI, frmJ, 3, 2));
System::getInstance().hasChanged = true;
}
else {
Joint::initializeGlobally();
}
}