- Move existing OndselSolver, GNN ML layer, and tooling into GNN/ directory for integration in later phases - Add Create addon scaffold: package.xml, Init.py - Add expression DAG with eval, symbolic diff, simplification - Add parameter table with fixed/free variable tracking - Add quaternion rotation as polynomial Expr trees - Add RigidBody entity (7 DOF: position + unit quaternion) - Add constraint classes: Coincident, DistancePointPoint, Fixed - Add Newton-Raphson solver with symbolic Jacobian + numpy lstsq - Add pre-solve passes: substitution + single-equation - Add DOF counting via Jacobian SVD rank - Add KindredSolver IKCSolver bridge for kcsolve integration - Add 82 unit tests covering all modules Registers as 'kindred' solver via kcsolve.register_solver() when loaded by Create's addon_loader.
94 lines
2.2 KiB
C++
94 lines
2.2 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2023 Ondsel, Inc. *
|
|
* *
|
|
* This file is part of OndselSolver. *
|
|
* *
|
|
* See LICENSE file for details about copyright. *
|
|
***************************************************************************/
|
|
|
|
#include "DistanceConstraintIJ.h"
|
|
#include "DistanceConstraintIqcJqc.h"
|
|
#include "EndFrameqc.h"
|
|
|
|
using namespace MbD;
|
|
|
|
MbD::DistanceConstraintIJ::DistanceConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj) : ConstraintIJ(frmi, frmj)
|
|
{
|
|
}
|
|
|
|
std::shared_ptr<DistanceConstraintIJ> MbD::DistanceConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
|
{
|
|
assert(frmi->isEndFrameqc());
|
|
assert(frmj->isEndFrameqc());
|
|
auto distCon = std::make_shared<DistanceConstraintIqcJqc>(frmi, frmj);
|
|
distCon->init_distIeJe();
|
|
return distCon;
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::calcPostDynCorrectorIteration()
|
|
{
|
|
aG = distIeJe->value() - aConstant;
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::init_distIeJe()
|
|
{
|
|
throw SimulationStoppingError("To be implemented.");
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::initialize()
|
|
{
|
|
ConstraintIJ::initialize();
|
|
this->init_distIeJe();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::initializeGlobally()
|
|
{
|
|
distIeJe->initializeGlobally();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::initializeLocally()
|
|
{
|
|
distIeJe->initializeLocally();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::postInput()
|
|
{
|
|
distIeJe->postInput();
|
|
ConstraintIJ::postInput();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::postPosICIteration()
|
|
{
|
|
distIeJe->postPosICIteration();
|
|
ConstraintIJ::postPosICIteration();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::preAccIC()
|
|
{
|
|
distIeJe->preAccIC();
|
|
ConstraintIJ::preAccIC();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::prePosIC()
|
|
{
|
|
distIeJe->prePosIC();
|
|
ConstraintIJ::prePosIC();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::preVelIC()
|
|
{
|
|
distIeJe->preVelIC();
|
|
ConstraintIJ::preVelIC();
|
|
}
|
|
|
|
void MbD::DistanceConstraintIJ::simUpdateAll()
|
|
{
|
|
distIeJe->simUpdateAll();
|
|
ConstraintIJ::simUpdateAll();
|
|
}
|
|
|
|
ConstraintType MbD::DistanceConstraintIJ::type()
|
|
{
|
|
return ConstraintType::displacement;
|
|
}
|