Biorbd Release_1.13.0
Loading...
Searching...
No Matches
HillDeGrooteTypeFatigable.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/Muscles/HillDeGrooteTypeFatigable.h"
3
4#include "InternalForces/Muscles/FatigueState.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : internal_forces::muscles::HillDeGrooteType(),
11 internal_forces::muscles::FatigueModel(
12 internal_forces::muscles::STATE_FATIGUE_TYPE::SIMPLE_STATE_FATIGUE) {
13 setType();
14}
15
17 const utils::String &name,
20 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
21 : internal_forces::muscles::HillDeGrooteType(
22 name,
23 geometry,
25 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
26 setType();
27}
28
30 const utils::String &name,
34 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
35 : internal_forces::muscles::HillDeGrooteType(
36 name,
37 geometry,
39 emg),
40 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
41 setType();
42}
43
45 const utils::String &name,
48 const internal_forces::PathModifiers &pathModifiers,
49 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
50 : internal_forces::muscles::HillDeGrooteType(
51 name,
52 geometry,
54 pathModifiers),
55 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
56 setType();
57}
58
60 const utils::String &name,
63 const internal_forces::PathModifiers &pathModifiers,
65 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
66 : internal_forces::muscles::HillDeGrooteType(
67 name,
68 geometry,
70 pathModifiers,
71 emg),
72 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
73 setType();
74}
75
78 : internal_forces::muscles::HillDeGrooteType(other),
79 internal_forces::muscles::FatigueModel(
80 dynamic_cast<const internal_forces::muscles::FatigueModel &>(other)) {
81
82}
83
85 const std::shared_ptr<Muscle> other)
86 : internal_forces::muscles::HillDeGrooteType(other),
87 internal_forces::muscles::FatigueModel(
88 std::dynamic_pointer_cast<internal_forces::muscles::FatigueModel>(
89 other)) {}
90
97
103
107 // Do something with m_FlCE and m_characteristics.fatigueParameters
108 *m_FlCE *= m_fatigueState->activeFibers();
109}
110
112 *m_type = internal_forces::muscles::MUSCLE_TYPE::HILL_DE_GROOTE_FATIGABLE;
113}
const utils::String & name() const
Return the name of the muscle.
Definition Compound.cpp:48
Holder of all the path modifiers of a muscle.
void DeepCopy(const FatigueModel &other)
Deep copy of the fatigue model.
FatigueModel(STATE_FATIGUE_TYPE dynamicFatigueType)
Contruct a fatigable muscle model.
std::shared_ptr< FatigueState > m_fatigueState
The fatigue state.
Add a fatigue model to the HillDeGroote type Note that useful defaults values for the FatigueParamete...
HillDeGrooteTypeFatigable DeepCopy() const
Deep copy of a Hill-DeGroote-type fatigable muscle.
virtual void computeFlCE(const State &emg)
Compute the Force-Length of the contractile element.
HillDeGrooteTypeFatigable()
Contruct a Hill-DeGroote-type fatigable muscle.
HillDeGrooteType DeepCopy() const
Deep copy of a DeGroote-type muscle.
virtual void computeFlCE(const State &emg)
Compute the Force-Length of the passive element.
std::shared_ptr< utils::Scalar > m_FlCE
Force-Length of the contractile element.
Definition HillType.h:216
Characteristics & characteristics() const
Return the muscle characteristics.
Definition Muscle.cpp:254
std::shared_ptr< MUSCLE_TYPE > m_type
The type of the muscle.
Definition Muscle.h:343
EMG holder to interact with the muscle.
Definition State.h:17
Wrapper around the std::string class with augmented functionality.
Definition String.h:18