Biorbd
Release_1.13.0
Toggle main menu visibility
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
7
using namespace
BIORBD_NAMESPACE;
8
9
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
()
10
: internal_forces::muscles::
HillThelenType
(),
11
internal_forces::muscles::
FatigueModel
(
12
internal_forces::muscles::STATE_FATIGUE_TYPE::SIMPLE_STATE_FATIGUE) {
13
setType
();
14
}
15
16
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
17
const
utils::String
&
name
,
18
const
internal_forces::muscles::MuscleGeometry
&geometry,
19
const
internal_forces::muscles::Characteristics
&
characteristics
,
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
26
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
27
const
utils::String
&
name
,
28
const
internal_forces::muscles::MuscleGeometry
&geometry,
29
const
internal_forces::muscles::Characteristics
&
characteristics
,
30
const
internal_forces::muscles::State
&emg,
31
internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
32
: internal_forces::muscles::
HillThelenType
(
33
name
,
34
geometry,
35
characteristics
,
36
emg),
37
internal_forces::muscles::
FatigueModel
(dynamicFatigueType) {
38
setType
();
39
}
40
41
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
42
const
utils::String
&
name
,
43
const
internal_forces::muscles::MuscleGeometry
&geometry,
44
const
internal_forces::muscles::Characteristics
&
characteristics
,
45
const
internal_forces::PathModifiers
&pathModifiers,
46
internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
47
: internal_forces::muscles::
HillThelenType
(
48
name
,
49
geometry,
50
characteristics
,
51
pathModifiers),
52
internal_forces::muscles::
FatigueModel
(dynamicFatigueType) {
53
setType
();
54
}
55
56
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
57
const
utils::String
&
name
,
58
const
internal_forces::muscles::MuscleGeometry
&geometry,
59
const
internal_forces::muscles::Characteristics
&
characteristics
,
60
const
internal_forces::PathModifiers
&pathModifiers,
61
const
internal_forces::muscles::State
&emg,
62
internal_forces::muscles::STATE_FATIGUE_TYPE dynamicFatigueType)
63
: internal_forces::muscles::
HillThelenType
(
64
name
,
65
geometry,
66
characteristics
,
67
pathModifiers,
68
emg),
69
internal_forces::muscles::
FatigueModel
(dynamicFatigueType) {
70
setType
();
71
}
72
73
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
74
const
internal_forces::muscles::Muscle
&other)
75
: internal_forces::muscles::
HillThelenType
(other),
76
internal_forces::muscles::
FatigueModel
(
77
dynamic_cast<const internal_forces::muscles::
FatigueModel
&>(other)) {
78
79
}
80
81
internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
(
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
88
internal_forces::muscles::HillThelenTypeFatigable
89
internal_forces::muscles::HillThelenTypeFatigable::DeepCopy
()
const
{
90
internal_forces::muscles::HillThelenTypeFatigable
copy;
91
copy.
DeepCopy
(*
this
);
92
return
copy;
93
}
94
95
void
internal_forces::muscles::HillThelenTypeFatigable::DeepCopy
(
96
const
internal_forces::muscles::HillThelenTypeFatigable
&other) {
97
internal_forces::muscles::HillThelenType::DeepCopy
(other);
98
internal_forces::muscles::FatigueModel::DeepCopy
(other);
99
}
100
101
void
internal_forces::muscles::HillThelenTypeFatigable::computeFlCE
(
102
const
internal_forces::muscles::State
&emg) {
103
internal_forces::muscles::HillThelenType::computeFlCE
(emg);
104
// Do something with m_FlCE and m_characteristics.fatigueParameters
105
*
m_FlCE
*=
m_fatigueState
->activeFibers();
106
}
107
108
void
internal_forces::muscles::HillThelenTypeFatigable::setType
() {
109
*
m_type
= internal_forces::muscles::MUSCLE_TYPE::HILL_THELEN_FATIGABLE;
110
}
BIORBD_NAMESPACE::internal_forces::Compound::name
const utils::String & name() const
Return the name of the muscle.
Definition
Compound.cpp:48
BIORBD_NAMESPACE::internal_forces::PathModifiers
Holder of all the path modifiers of a muscle.
Definition
PathModifiers.h:18
BIORBD_NAMESPACE::internal_forces::muscles::Characteristics
Class Holds that muscle characteristics.
Definition
Characteristics.h:19
BIORBD_NAMESPACE::internal_forces::muscles::FatigueModel::DeepCopy
void DeepCopy(const FatigueModel &other)
Deep copy of the fatigue model.
Definition
FatigueModel.cpp:35
BIORBD_NAMESPACE::internal_forces::muscles::FatigueModel::FatigueModel
FatigueModel(STATE_FATIGUE_TYPE dynamicFatigueType)
Contruct a fatigable muscle model.
Definition
FatigueModel.cpp:10
BIORBD_NAMESPACE::internal_forces::muscles::FatigueModel::m_fatigueState
std::shared_ptr< FatigueState > m_fatigueState
The fatigue state.
Definition
FatigueModel.h:86
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable
Add a fatigue model to the HillThelen type Note that useful defaults values for the FatigueParameters...
Definition
HillThelenTypeFatigable.h:24
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable::computeFlCE
virtual void computeFlCE(const State &emg)
Compute the Force-Length of the contractile element.
Definition
HillThelenTypeFatigable.cpp:101
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable::setType
virtual void setType()
Set type to Hill_Thelen_Fatigable.
Definition
HillThelenTypeFatigable.cpp:108
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable::HillThelenTypeFatigable
HillThelenTypeFatigable()
Contruct a Hill-Thelen-type fatigable muscle.
Definition
HillThelenTypeFatigable.cpp:9
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable::DeepCopy
HillThelenTypeFatigable DeepCopy() const
Deep copy of a Hill-Thelen-type fatigable muscle.
Definition
HillThelenTypeFatigable.cpp:89
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenType::DeepCopy
HillThelenType DeepCopy() const
Deep copy of a Hill-Thelen-type muscle.
Definition
HillThelenType.cpp:74
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenType::computeFlCE
virtual void computeFlCE(const State &emg)
Compute the Force-Length of the passive element.
Definition
HillThelenType.cpp:101
BIORBD_NAMESPACE::internal_forces::muscles::HillThelenType::HillThelenType
HillThelenType()
Contruct a Hill-Thelen-type muscle.
Definition
HillThelenType.cpp:16
BIORBD_NAMESPACE::internal_forces::muscles::HillType::m_FlCE
std::shared_ptr< utils::Scalar > m_FlCE
Force-Length of the contractile element.
Definition
HillType.h:216
BIORBD_NAMESPACE::internal_forces::muscles::MuscleGeometry
Class muscle geometry of the muscle.
Definition
MuscleGeometry.h:34
BIORBD_NAMESPACE::internal_forces::muscles::Muscle
Base class of all muscle.
Definition
Muscle.h:27
BIORBD_NAMESPACE::internal_forces::muscles::Muscle::characteristics
Characteristics & characteristics() const
Return the muscle characteristics.
Definition
Muscle.cpp:254
BIORBD_NAMESPACE::internal_forces::muscles::Muscle::m_type
std::shared_ptr< MUSCLE_TYPE > m_type
The type of the muscle.
Definition
Muscle.h:343
BIORBD_NAMESPACE::internal_forces::muscles::State
EMG holder to interact with the muscle.
Definition
State.h:17
BIORBD_NAMESPACE::utils::String
Wrapper around the std::string class with augmented functionality.
Definition
String.h:18
src
InternalForces
Muscles
HillThelenTypeFatigable.cpp
Generated by
1.18.0