Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pulse Physiology Suite
engine
Commits
34ce3dbf
Commit
34ce3dbf
authored
Nov 19, 2018
by
Aaron Bray
Browse files
Improve Hemorrhage compartment naming check
parent
22233809
Changes
1
Hide whitespace changes
Inline
Side-by-side
engine/cpp/physiology/Cardiovascular.cpp
View file @
34ce3dbf
...
...
@@ -973,9 +973,18 @@ void Cardiovascular::Hemorrhage()
h
=
hem
.
second
;
double
rate_mL_Per_s
=
h
->
GetRate
().
GetValue
(
VolumePerTimeUnit
::
mL_Per_s
);
// Allow shorthand naming
if
(
h
->
GetCompartment
().
find
(
"Vasculature"
)
==
std
::
string
::
npos
)
h
->
SetCompartment
(
h
->
GetCompartment
()
+
"Vasculature"
);
SELiquidCompartment
*
compartment
=
m_data
.
GetCompartments
().
GetCardiovascularGraph
().
GetCompartment
(
h
->
GetCompartment
());
if
(
compartment
==
nullptr
)
{
h
->
SetCompartment
(
h
->
GetCompartment
()
+
"Vasculature"
);
compartment
=
m_data
.
GetCompartments
().
GetCardiovascularGraph
().
GetCompartment
(
h
->
GetCompartment
());
}
if
(
compartment
==
nullptr
)
{
Error
(
"Removing invalid Hemorrhage due to unsupported compartment : "
+
h
->
GetCompartment
());
invalid_hemorrhages
.
push_back
(
h
);
continue
;
}
/// \error Error: Bleeding rate cannot exceed cardiac output
if
(
rate_mL_Per_s
>
GetCardiacOutput
().
GetValue
(
VolumePerTimeUnit
::
mL_Per_s
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment