New joints for ASMT and MBDyn

GearJoint, RackPinion, Screw, Planar and MBDynCase3orig.mbd
MBDyn Sperical Hinge
This commit is contained in:
Aik-Siong Koh
2023-11-15 22:03:31 -07:00
parent 810c8d2f0e
commit e0241dd6d2
242 changed files with 44337 additions and 2618 deletions

View File

@@ -23,7 +23,7 @@ namespace MbD {
}
void DiagonalMatrix::atiputDiagonalMatrix(int i, std::shared_ptr<DiagonalMatrix> diagMat)
{
for (size_t ii = 0; ii < diagMat->size(); ii++)
for (int ii = 0; ii < diagMat->size(); ii++)
{
this->at(i + ii) = diagMat->at(ii);
}
@@ -53,7 +53,7 @@ namespace MbD {
double DiagonalMatrix::sumOfSquares()
{
double sum = 0.0;
for (size_t i = 0; i < this->size(); i++)
for (int i = 0; i < this->size(); i++)
{
double element = this->at(i);
sum += element * element;
@@ -67,14 +67,14 @@ namespace MbD {
}
void DiagonalMatrix::zeroSelf()
{
for (size_t i = 0; i < this->size(); i++) {
for (int i = 0; i < this->size(); i++) {
this->at(i) = 0.0;
}
}
double DiagonalMatrix::maxMagnitude()
{
double max = 0.0;
for (size_t i = 0; i < this->size(); i++)
for (int i = 0; i < this->size(); i++)
{
double element = this->at(i);
if (element < 0.0) element = -element;
@@ -86,7 +86,7 @@ namespace MbD {
{
s << "DiagMat[";
s << this->at(0);
for (size_t i = 1; i < this->size(); i++)
for (int i = 1; i < this->size(); i++)
{
s << ", " << this->at(i);
}