|
BeamAdapter
|
#include <AdaptiveBeamLengthConstraint.h>
Public Member Functions | |
| SOFA_CLASS (SOFA_TEMPLATE(AdaptiveBeamLengthConstraint, DataTypes), SOFA_TEMPLATE(LagrangianConstraint, DataTypes)) | |
| virtual void | init () override |
| virtual void | reset () override |
| virtual void | draw (const core::visual::VisualParams *vparams) override |
| virtual void | buildConstraintMatrix (const ConstraintParams *cParams, DataMatrixDeriv &c, unsigned int &cIndex, const DataVecCoord &x) override |
| virtual void | getConstraintViolation (const ConstraintParams *cParams, BaseVector *viol, const DataVecCoord &x, const DataVecDeriv &v) override |
| virtual void | getConstraintResolution (const ConstraintParams *cParams, std::vector< ConstraintResolution * > &resTab, unsigned int &offset) override |
Protected Member Functions | |
| AdaptiveBeamLengthConstraint (TypedMechanicalState *object=nullptr) | |
| void | internalInit () |
Protected Attributes | |
| unsigned int | m_cid {0} |
| int | m_nbConstraints {0} |
| type::vector< Real > | m_violations |
| std::map< Real, double > | m_prevForces |
| Data< Real > | m_alarmLength |
| Map abscissa <-> previous constraint force. | |
| Data< Real > | m_constrainedLength |
| Data< Real > | m_maxBendingAngle |
| SingleLink< AdaptiveBeamLengthConstraint< DataTypes >, WireBeamInterpolation< DataTypes >, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > | m_interpolation |
More informations about SOFA components: https://www.sofa-framework.org/community/doc/programming-with-sofa/create-your-component/ https://www.sofa-framework.org/community/doc/programming-with-sofa/components-api/components-and-datas/
|
overridevirtual |
for each constraint Interval, a constraint is created
get the indices of the dofs involved
compute the violation and the local direction of the constraint
put the violation in a buffer
project the direction of the constraint (considered as a force) in the DOF frame
|
protected |
We search for the closest segment, on which to project each point Convention : object1 is the beam model, object2 is the list of point constraints