Biorbd Release_1.13.0
Loading...
Searching...
No Matches
HillThelenTypeFatigable.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/Muscles/HillThelenTypeFatigable.h"
3
4#include "InternalForces/Muscles/FatigueState.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : internal_forces::muscles::HillThelenType(),
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::HillThelenType(name, geometry, characteristics),
22 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
23 setType();
24}
25
27 const utils::String &name,
31 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
32 : internal_forces::muscles::HillThelenType(
33 name,
34 geometry,
36 emg),
37 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
38 setType();
39}
40
42 const utils::String &name,
45 const internal_forces::PathModifiers &pathModifiers,
46 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
47 : internal_forces::muscles::HillThelenType(
48 name,
49 geometry,
51 pathModifiers),
52 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
53 setType();
54}
55
57 const utils::String &name,
60 const internal_forces::PathModifiers &pathModifiers,
62 internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
63 : internal_forces::muscles::HillThelenType(
64 name,
65 geometry,
67 pathModifiers,
68 emg),
69 internal_forces::muscles::FatigueModel(dynamicFatigueType) {
70 setType();
71}
72
75 : internal_forces::muscles::HillThelenType(other),
76 internal_forces::muscles::FatigueModel(
77 dynamic_cast<const internal_forces::muscles::FatigueModel &>(other)) {
78
79}
80
82 const std::shared_ptr<Muscle> other)
83 : internal_forces::muscles::HillThelenType(other),
84 internal_forces::muscles::FatigueModel(
85 std::dynamic_pointer_cast<internal_forces::muscles::FatigueModel>(
86 other)) {}
87
94
100
104 // Do something with m_FlCE and m_characteristics.fatigueParameters
105 *m_FlCE *= m_fatigueState->activeFibers();
106}
107
109 *m_type = internal_forces::muscles::MUSCLE_TYPE::HILL_THELEN_FATIGABLE;
110}
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 HillThelen type Note that useful defaults values for the FatigueParameters...
virtual void computeFlCE(const State &emg)
Compute the Force-Length of the contractile element.
HillThelenTypeFatigable()
Contruct a Hill-Thelen-type fatigable muscle.
HillThelenTypeFatigable DeepCopy() const
Deep copy of a Hill-Thelen-type fatigable muscle.
HillThelenType DeepCopy() const
Deep copy of a Hill-Thelen-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