pub struct CMHandle {
pub(crate) model: Arc<CMModel>,
pub(crate) balance: BalanceSettings,
pub(crate) _root_result: String,
pub(crate) eg_geometry: Arc<Geometry>,
pub(crate) cm_geometry: Arc<CMGeometry>,
}Fields§
§model: Arc<CMModel>§balance: BalanceSettingsKnobs of the balancing pass, the caller may replace them before generating
_root_result: String§eg_geometry: Arc<Geometry>§cm_geometry: Arc<CMGeometry>Implementations§
Source§impl CMHandle
impl CMHandle
Sourcepub fn set_balance_settings(&mut self, settings: BalanceSettings)
pub fn set_balance_settings(&mut self, settings: BalanceSettings)
Replaces the balancing knobs used when a flow map is generated
pub fn balance_settings(&self) -> &BalanceSettings
pub fn grid(&self) -> &dyn CompartmentMesh
pub fn init( n_div: [usize; 3], root: &str, geometry_filename: &str, _meshtype: MeshType, ) -> Result<Self, CoreError>
pub fn dump_volume(&self)
pub fn dump_all( &self, root_export: impl AsRef<Path>, root_input: impl AsRef<Path>, vars: &[VariableInfo], ) -> Result<(), CoreError>
pub fn get_scalar(&self, path: impl AsRef<Path>) -> Result<Scalar, CoreError>
pub(crate) fn s_get_scalar( path: impl AsRef<Path>, eg_geometry: Arc<Geometry>, cm_geometry: Arc<CMGeometry>, ) -> Result<Scalar, CoreError>
pub(crate) fn ts_dump_scalar( res_name: impl AsRef<Path>, path: impl AsRef<Path>, eg_geometry: Arc<Geometry>, cm_geometry: Arc<CMGeometry>, model: Arc<CMModel>, ) -> Result<RawDataScalar, CoreError>
pub fn dump_scalar( &self, res_name: impl AsRef<Path>, path: impl AsRef<Path>, ) -> Result<RawDataScalar, CoreError>
Sourcepub fn dump_scalar_fraction(
&self,
res_name: impl AsRef<Path>,
path: impl AsRef<Path>,
phase_fraction: Scalar,
) -> Result<RawDataScalar, CoreError>
pub fn dump_scalar_fraction( &self, res_name: impl AsRef<Path>, path: impl AsRef<Path>, phase_fraction: Scalar, ) -> Result<RawDataScalar, CoreError>
Integrates a scalar over each compartment, weighting every element by phase_fraction
first, so a field carried by one phase is integrated over the volume that phase occupies.
Scaling the compartment integral afterwards is not the same number unless the field and
the fraction are uncorrelated inside the compartment.
pub fn dump_real_volume( &self, res_name: impl AsRef<Path>, ) -> Result<(), CoreError>
pub fn dump_vector_phase_fraction( &self, res_name: impl AsRef<Path>, path: impl AsRef<Path>, phase_fraction: Scalar, ) -> Result<(), CoreError>
pub fn dump_vector_raw( &self, res_name: impl AsRef<Path>, vector: Vector, ) -> Result<(), CoreError>
pub fn dump_vector( &self, res_name: impl AsRef<Path>, path: impl AsRef<Path>, ) -> Result<(), CoreError>
pub fn vector_from_scalar( &self, path_i: impl AsRef<Path>, path_j: impl AsRef<Path>, path_k: impl AsRef<Path>, ) -> Result<Vector, CoreError>
Sourcepub fn real_volume(&self) -> Vec<f64>
pub fn real_volume(&self) -> Vec<f64>
Volume of each compartment, as covered by the mesh
Sourcepub fn dump_vector_from_scalar(
&self,
res_name: impl AsRef<Path>,
path_i: impl AsRef<Path>,
path_j: impl AsRef<Path>,
path_k: impl AsRef<Path>,
phase_fraction: Option<Scalar>,
) -> Result<RawDataFlux, CoreError>
pub fn dump_vector_from_scalar( &self, res_name: impl AsRef<Path>, path_i: impl AsRef<Path>, path_j: impl AsRef<Path>, path_k: impl AsRef<Path>, phase_fraction: Option<Scalar>, ) -> Result<RawDataFlux, CoreError>
Flow map out of the three components of a velocity, optionally scaled by the volume fraction of its phase: a phase only carries its own share of the flow
pub fn export_geometry_compartments(&self)
Auto Trait Implementations§
impl Freeze for CMHandle
impl !RefUnwindSafe for CMHandle
impl Send for CMHandle
impl Sync for CMHandle
impl Unpin for CMHandle
impl UnsafeUnpin for CMHandle
impl !UnwindSafe for CMHandle
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.