pub struct PfrGlobalMassBalance {
flows: HashMap<String, PhaseFlow>,
validated: bool,
}Expand description
Struct to hold flow data for each ID using a HashMap
Fields§
§flows: HashMap<String, PhaseFlow>§validated: boolImplementations§
Source§impl PfrGlobalMassBalance
impl PfrGlobalMassBalance
pub(super) fn new(pfr_names: &[String]) -> Self
pub(super) fn validate(&mut self) -> Result<(), CMError>
pub(crate) fn update_flow( &mut self, id: &str, phase: PhaseCM, direction: FlowDirection, vflow: f64, )
pub fn get_flow(&self, id: &str, phase: PhaseCM) -> Result<f64, CMError>
Trait Implementations§
Source§impl Debug for PfrGlobalMassBalance
impl Debug for PfrGlobalMassBalance
Source§impl Default for PfrGlobalMassBalance
impl Default for PfrGlobalMassBalance
Source§fn default() -> PfrGlobalMassBalance
fn default() -> PfrGlobalMassBalance
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PfrGlobalMassBalance
impl RefUnwindSafe for PfrGlobalMassBalance
impl Send for PfrGlobalMassBalance
impl Sync for PfrGlobalMassBalance
impl Unpin for PfrGlobalMassBalance
impl UnsafeUnpin for PfrGlobalMassBalance
impl UnwindSafe for PfrGlobalMassBalance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.