BeamAdapter
Loading...
Searching...
No Matches
AdaptiveBeamLengthConstraint< DataTypes > Class Template Reference

#include <AdaptiveBeamLengthConstraint.h>

Inheritance diagram for AdaptiveBeamLengthConstraint< DataTypes >:

Public Types

typedef DataTypes::VecCoord VecCoord
typedef DataTypes::VecDeriv VecDeriv
typedef DataTypes::MatrixDeriv MatrixDeriv
typedef DataTypes::MatrixDeriv::RowIterator MatrixDerivRowIterator
typedef DataTypes::Coord Coord
typedef DataTypes::Deriv Deriv
typedef Coord::value_type Real
typedef SolidTypes< Real >::Transform Transform
typedef SolidTypes< Real >::SpatialVector SpatialVector
typedef DataTypes::Coord::Pos Pos
typedef DataTypes::Coord::Rot Rot
typedef std::map< Real, double >::iterator MapIterator
typedef MechanicalState< DataTypes > TypedMechanicalState
typedef LagrangianConstraint< DataTypes > Inherit
typedef Data< VecCoord > DataVecCoord
typedef Data< VecDeriv > DataVecDeriv
typedef Data< MatrixDeriv > DataMatrixDeriv
typedef Vec< 3, Real > Vec3
typedef Vec< 6, Real > Vec6

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

Detailed Description

template<class DataTypes>
class beamadapter::AdaptiveBeamLengthConstraint< DataTypes >

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/

Member Function Documentation

◆ buildConstraintMatrix()

template<class DataTypes>
void buildConstraintMatrix ( const ConstraintParams * cParams,
DataMatrixDeriv & c,
unsigned int & cIndex,
const DataVecCoord & x )
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

◆ internalInit()

template<class DataTypes>
void internalInit ( )
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