- 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.
97 lines
2.0 KiB
C++
97 lines
2.0 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2023 Ondsel, Inc. *
|
|
* *
|
|
* This file is part of OndselSolver. *
|
|
* *
|
|
* See LICENSE file for details about copyright. *
|
|
***************************************************************************/
|
|
|
|
#include "DistxyIecJec.h"
|
|
|
|
using namespace MbD;
|
|
|
|
MbD::DistxyIecJec::DistxyIecJec()
|
|
{
|
|
}
|
|
|
|
MbD::DistxyIecJec::DistxyIecJec(EndFrmsptr frmi, EndFrmsptr frmj) : KinematicIeJe(frmi, frmj)
|
|
{
|
|
}
|
|
|
|
void MbD::DistxyIecJec::calcPostDynCorrectorIteration()
|
|
{
|
|
auto x = xIeJeIe->value();
|
|
auto y = yIeJeIe->value();
|
|
distxy = std::sqrt(x * x + (y * y));
|
|
}
|
|
|
|
void MbD::DistxyIecJec::initialize()
|
|
{
|
|
KinematicIeJe::initialize();
|
|
this->init_xyIeJeIe();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::initializeGlobally()
|
|
{
|
|
xIeJeIe->initializeGlobally();
|
|
yIeJeIe->initializeGlobally();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::initializeLocally()
|
|
{
|
|
xIeJeIe->initializeLocally();
|
|
yIeJeIe->initializeLocally();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::init_xyIeJeIe()
|
|
{
|
|
throw SimulationStoppingError("To be implemented.");
|
|
}
|
|
|
|
void MbD::DistxyIecJec::postInput()
|
|
{
|
|
xIeJeIe->postInput();
|
|
yIeJeIe->postInput();
|
|
KinematicIeJe::postInput();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::postPosICIteration()
|
|
{
|
|
xIeJeIe->postPosICIteration();
|
|
yIeJeIe->postPosICIteration();
|
|
KinematicIeJe::postPosICIteration();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::preAccIC()
|
|
{
|
|
xIeJeIe->preAccIC();
|
|
yIeJeIe->preAccIC();
|
|
KinematicIeJe::preAccIC();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::prePosIC()
|
|
{
|
|
xIeJeIe->prePosIC();
|
|
yIeJeIe->prePosIC();
|
|
KinematicIeJe::prePosIC();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::preVelIC()
|
|
{
|
|
xIeJeIe->preVelIC();
|
|
yIeJeIe->preVelIC();
|
|
KinematicIeJe::preVelIC();
|
|
}
|
|
|
|
void MbD::DistxyIecJec::simUpdateAll()
|
|
{
|
|
xIeJeIe->simUpdateAll();
|
|
yIeJeIe->simUpdateAll();
|
|
KinematicIeJe::simUpdateAll();
|
|
}
|
|
|
|
double MbD::DistxyIecJec::value()
|
|
{
|
|
return distxy;
|
|
}
|