Files
solver/GNN/OndselSolver/RedundantConstraint.cpp
forbes-0023 98051ba0c9 feat: add Phase 1 constraint solver addon, move prior content to GNN/
- 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.
2026-02-20 20:35:47 -06:00

120 lines
2.8 KiB
C++

/***************************************************************************
* Copyright (c) 2023 Ondsel, Inc. *
* *
* This file is part of OndselSolver. *
* *
* See LICENSE file for details about copyright. *
***************************************************************************/
#include "RedundantConstraint.h"
using namespace MbD;
void RedundantConstraint::removeRedundantConstraints(std::shared_ptr<std::vector<size_t>>)
{
}
bool RedundantConstraint::isRedundant()
{
return true;
}
std::string RedundantConstraint::classname()
{
auto str = Item::classname() + "->" + constraint->classname();
return str;
}
ConstraintType RedundantConstraint::type()
{
return redundant;
}
void MbD::RedundantConstraint::fillqsuddotlam(FColDsptr)
{
}
void RedundantConstraint::fillqsulam(FColDsptr)
{
}
void RedundantConstraint::postInput()
{
}
void RedundantConstraint::prePosIC()
{
}
void RedundantConstraint::fillEssenConstraints(std::shared_ptr<Constraint>, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>)
{
}
void RedundantConstraint::fillDispConstraints(std::shared_ptr<Constraint>, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>)
{
}
void RedundantConstraint::fillPerpenConstraints(std::shared_ptr<Constraint>, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>)
{
}
void RedundantConstraint::fillConstraints(std::shared_ptr<Constraint>, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>>)
{
}
void RedundantConstraint::fillRedundantConstraints(std::shared_ptr<Constraint> sptr, std::shared_ptr<std::vector<std::shared_ptr<Constraint>>> redunConstraints)
{
redunConstraints->push_back(sptr);
}
void RedundantConstraint::setqsulam(FColDsptr)
{
}
void RedundantConstraint::setqsudotlam(FColDsptr)
{
}
void RedundantConstraint::fillPosICError(FColDsptr)
{
}
void RedundantConstraint::fillPosKineError(FColDsptr)
{
}
void RedundantConstraint::fillPosKineJacob(SpMatDsptr)
{
}
void RedundantConstraint::preVelIC()
{
}
void RedundantConstraint::preAccIC()
{
}
void RedundantConstraint::fillAccICIterError(FColDsptr)
{
}
void RedundantConstraint::setqsuddotlam(FColDsptr)
{
}
void RedundantConstraint::discontinuityAtaddTypeTo(double, std::shared_ptr<std::vector<DiscontinuityType>>)
{
//"Reactivate all constraints."
throw SimulationStoppingError("To be implemented.");
//| newSelf |
//newSelf : = self constraint.
//newSelf discontinuityAt : tstartNew addTypeTo : collection.
//self become : newSelf
}
std::string MbD::RedundantConstraint::constraintSpec()
{
return "RedundantConstraint" + constraint->constraintSpec();
}