pub struct PostProcess {
results: Results,
}
Expand description
The PostProcess
struct handles post-processing of simulation results.
It contains the path to the results folder, the root directory, and the processed results.
The struct uses the Results
struct internally, which is expected to contain time and other data.
Fields§
§results: Results
Implementations§
Source§impl PostProcess
impl PostProcess
Sourcepub fn new(folder: &str, root: Option<String>) -> Result<Self, ApiError>
pub fn new(folder: &str, root: Option<String>) -> Result<Self, ApiError>
Creates a new instance of PostProcess
.
§Arguments
folder
- The name of the folder containing the simulation results.root
- Optional root directory. Defaults to “./results/” if not provided.
§Returns
Result<Self, String>
- Returns thePostProcess
instance or an error message if initialization fails.
Trait Implementations§
Source§impl Debug for PostProcess
impl Debug for PostProcess
Source§impl ModelEstimator for PostProcess
impl ModelEstimator for PostProcess
Source§impl PostProcessReader for PostProcess
impl PostProcessReader for PostProcess
Source§fn time_array(&self) -> Array1<f64>
fn time_array(&self) -> Array1<f64>
Returns an ArrayView1<f64>
representing the time data from the simulation results.
§Returns
- An
ArrayView1<f64>
containing the time data.
Source§fn get_max_n_export_bio(&self) -> usize
fn get_max_n_export_bio(&self) -> usize
Retrieves the maximum number of export events specifically related to biological dumps from the simulation results. This value represents the real number of biological export events, which may not always align with the total number of exports.
§Returns
usize
- The maximum number of biological export events, or0
if no events are found or if an error occurs.
Source§fn n_export(&self) -> usize
fn n_export(&self) -> usize
Returns the total number of export events from the simulation results. This count includes all export actions, regardless of whether they are biological or not.
§Returns
usize
- The total number of export events.
Source§fn get_biomass_concentration(&self) -> Result<Array2<f64>, ApiError>
fn get_biomass_concentration(&self) -> Result<Array2<f64>, ApiError>
Calculates the biomass concentration over time for the simulation.
§Returns
Result<Array2<f64>, String>
- A 2D array with biomass concentrations or an error message.
Source§fn get_growth_in_number(&self) -> Array1<f64>
fn get_growth_in_number(&self) -> Array1<f64>
Calculates the total growth in number
§Returns
Array1<f64>
- 1D array containing the summed growth numbers.
Source§fn get_number_particle(&self) -> &Array2<f64>
fn get_number_particle(&self) -> &Array2<f64>
Retrieves the 2D array of particle numbers.
§Returns
&Array2<f64>
- Reference to the 2D array containing particle numbers.