20#ifndef _ELASTIC_JOINT_H_
21#define _ELASTIC_JOINT_H_
23#include "mbsim/links/floating_frame_link.h"
24#include "mbsim/functions/function.h"
45 void updateGeneralizedForces()
override;
46 void updatexd()
override;
48 void calcxSize()
override {
if(integrateGeneralizedRelativeVelocityOfRotation)
xSize = momentDir.cols(); }
49 void init(
InitStage stage,
const InitConfigSet &config)
override;
52 bool isActive()
const override {
return true; }
55 void setGeneralizedForceFunction(
Function<fmatvec::VecV(fmatvec::VecV,fmatvec::VecV)> *func_) {
57 func->setParent(
this);
58 func->
setName(
"GeneralizedForce");
71 void setIntegrateGeneralizedRelativeVelocityOfRotation(
bool integrateGeneralizedRelativeVelocityOfRotation_) { integrateGeneralizedRelativeVelocityOfRotation = integrateGeneralizedRelativeVelocityOfRotation_; }
73 fmatvec::VecV evalGeneralizedRelativePositionOfRotation()
override;
74 fmatvec::Vec3 evalGlobalRelativeAngle();
76 void initializeUsingXML(xercesc::DOMElement *element)
override;
79 Function<fmatvec::VecV(fmatvec::VecV,fmatvec::VecV)> *func{
nullptr};
86 bool integrateGeneralizedRelativeVelocityOfRotation{
false};
class for elastic joints
Definition: elastic_joint.h:32
void setMomentDirection(const fmatvec::Mat3xV &md)
Definition: elastic_joint.h:69
void setForceDirection(const fmatvec::Mat3xV &fd)
Definition: elastic_joint.h:64
bool gActiveChanged() override
Definition: elastic_joint.h:53
~ElasticJoint() override
destructor
Definition: elastic_joint.cc:38
ElasticJoint(const std::string &name="")
constructor
Definition: elastic_joint.cc:35
bool isSingleValued() const override
asks the link if it contains single valued force laws that contribute to the right-hand side vector h
Definition: elastic_joint.h:51
fmatvec::Mat3xV JT
translational JACOBIAN (not empty for e.g. prismatic joints)
Definition: elastic_joint.h:84
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: elastic_joint.cc:52
bool isActive() const override
Definition: elastic_joint.h:52
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:260
void setName(const std::string &str)
Definition: element.h:115
floating frame link
Definition: floating_frame_link.h:32
fmatvec::Mat3xV forceDir
directions of force and moment in frame of reference
Definition: floating_frame_link.h:80
Definition: function.h:53
int xSize
size and local index of order one parameters
Definition: link.h:479
namespace MBSim
Definition: bilateral_constraint.cc:30