Skip to main content

CompartmentMeshAccessor

Trait CompartmentMeshAccessor 

Source
pub trait CompartmentMeshAccessor {
    // Required methods
    fn min_axis(&self, i_axis: usize) -> f64;
    fn max_axis(&self, i_axis: usize) -> f64;
    fn mesh_step_axis(&self, i_axis: usize) -> f64;
    fn n_points_axis(&self, i_axis: usize) -> usize;
    fn number_cell(&self) -> usize;
    fn get_cell_edge(&self, i_axis: usize, i_point: usize) -> f64;
    fn get_cell_center(&self, i_axis: usize, i_point: usize) -> f64;
}
Expand description

Trait for accessing mesh data in a coarsed-mesh model.

Defines methods to access various properties of a coarsed mesh (structured grid),

Required Methods§

Source

fn min_axis(&self, i_axis: usize) -> f64

Returns the minimum value along the specified axis.

§Arguments
  • i_axis - The index of the axis
§Returns

The minimum value along the specified axis.

Source

fn max_axis(&self, i_axis: usize) -> f64

Returns the maximum value along the specified axis.

§Arguments
  • i_axis - The index of the axis
§Returns

The maximum value along the specified axis.

Source

fn mesh_step_axis(&self, i_axis: usize) -> f64

Returns the step size between points along the specified axis.

§Arguments
  • i_axis - The index of the axis
§Returns

The step size between points along the specified axis.

Source

fn n_points_axis(&self, i_axis: usize) -> usize

Returns the number of points along the specified axis.

§Arguments
  • i_axis - The index of the axis
§Returns

The number of points along the specified axis.

Source

fn number_cell(&self) -> usize

Returns the total number of cells in the mesh.

§Returns

The total number of cells.

Source

fn get_cell_edge(&self, i_axis: usize, i_point: usize) -> f64

Returns the edge position of a specific cell along the specified axis and point index.

§Arguments
  • i_axis - The index of the axis.
  • i_point - The index of the point along the specified axis.
§Returns

The edge position of the specified cell.

Source

fn get_cell_center(&self, i_axis: usize, i_point: usize) -> f64

Returns the center position of a specific cell along the specified axis and point index.

§Arguments
  • i_axis - The index of the axis.
  • i_point - The index of the point along the specified axis.
§Returns

The center position of the specified cell.

Implementors§