pub struct GpuThermalSolver {
pub nx: usize,
pub ny: usize,
pub nz: usize,
pub diffusivity: f64,
pub dx: f64,
pub dy: f64,
pub dz: f64,
pub temperature: Vec<f64>,
}Expand description
GPU-accelerated (CPU mock) thermal solver for 3-D structured grids.
Solves the heat equation:
∂T/∂t = α ∇²T + Qwhere α is the thermal diffusivity and Q is a volumetric heat source.
Grid layout: row-major, index [iz * ny * nx + iy * nx + ix].
Fields§
§nx: usizeNumber of cells in the x-direction.
ny: usizeNumber of cells in the y-direction.
nz: usizeNumber of cells in the z-direction.
diffusivity: f64Thermal diffusivity (m²/s or simulation units).
dx: f64Grid spacing in x (m).
dy: f64Grid spacing in y (m).
dz: f64Grid spacing in z (m).
temperature: Vec<f64>Current temperature field, length nx * ny * nz.
Implementations§
Source§impl GpuThermalSolver
impl GpuThermalSolver
Trait Implementations§
Source§impl Clone for GpuThermalSolver
impl Clone for GpuThermalSolver
Source§fn clone(&self) -> GpuThermalSolver
fn clone(&self) -> GpuThermalSolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GpuThermalSolver
impl RefUnwindSafe for GpuThermalSolver
impl Send for GpuThermalSolver
impl Sync for GpuThermalSolver
impl Unpin for GpuThermalSolver
impl UnsafeUnpin for GpuThermalSolver
impl UnwindSafe for GpuThermalSolver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more