Skip to main content

DeviceFvmPlan

Struct DeviceFvmPlan 

Source
pub struct DeviceFvmPlan<B: AcceleratorBackend> { /* private fields */ }
Expand description

Structure-of-arrays device plan for conservative face/cell execution.

Implementations§

Source§

impl<B: AcceleratorBackend> DeviceFvmPlan<B>

Source

pub fn compile( backend: &B, inputs: &FvmInputs, labels: Option<&LabelSet>, epochs: PlanEpochs, ) -> Result<Self, AcceleratorError>

Compile FVM stencils, geometry, and optional wet/dry/boundary labels.

Source

pub fn validate(&self, current: PlanEpochs) -> Result<(), AcceleratorError>

Reject execution with stale topology, atlas, or geometry epochs.

Source

pub fn face_count(&self) -> usize

Total number of faces in the combined flux array.

Source

pub fn cell_ids(&self) -> &[PointId]

Stable cell IDs in dense field order.

Source

pub fn face_ids(&self) -> &[PointId]

Stable face IDs in combined internal/boundary order.

Source

pub fn cell_count(&self) -> usize

Number of packed cells.

Source

pub fn dimension(&self) -> usize

Number of spatial dimensions represented by the geometry.

Source

pub fn internal_face_count(&self) -> usize

Number of internal faces.

Source

pub fn boundary_face_count(&self) -> usize

Number of boundary faces.

Source

pub fn cell_active(&self) -> &B::Buffer<u8>

Read-only cell activity mask.

Source

pub fn face_active(&self) -> &B::Buffer<u8>

Read-only face activity mask.

Source§

impl DeviceFvmPlan<CpuBackend>

Source

pub fn compute_gradients<T: FvmScalar>( &self, state: &mut DeviceFvmState<T, CpuBackend>, ) -> Result<(), AcceleratorError>

Reference Green–Gauss gradient using the plan’s deterministic CSR.

Source

pub fn compute_diffusive_face_fluxes<T: FvmScalar>( &self, state: &mut DeviceFvmState<T, CpuBackend>, diffusivity: f64, ) -> Result<(), AcceleratorError>

Reference orthogonal internal/boundary diffusive face fluxes.

Source

pub fn compute_face_fluxes<T: FvmScalar>( &self, state: &mut DeviceFvmState<T, CpuBackend>, scheme: ScalarFluxScheme, ) -> Result<(), AcceleratorError>

Reference implementation of internal/boundary face flux kernels.

Source

pub fn assemble_cell_residuals<T: FvmScalar>( &self, state: &mut DeviceFvmState<T, CpuBackend>, ) -> Result<(), AcceleratorError>

Reference implementation of deterministic cell residual gathering.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AccumulatePathExt for T

Source§

fn accumulate_path<O, I>(path: I) -> O
where O: Orientation, I: IntoIterator<Item = O>,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.