pub struct Domain {
pub spatial: SpatialDom,
pub velocity: VelocityDom,
pub spatial_res: SpatialRes,
pub velocity_res: VelocityRes,
pub time_range: TimeRange,
pub spatial_bc: SpatialBoundType,
pub velocity_bc: VelocityBoundType,
/* private fields */
}Expand description
Complete 6D computational domain specification, ready for use by solver components.
Combines spatial/velocity extents, resolutions, boundary conditions, and the
time range. Construct via DomainBuilder (see Domain::builder).
Frequently-needed floating-point quantities (dx, dv, lx, lv) are
cached at construction time to avoid repeated Decimal-to-f64 conversion.
Fields§
§spatial: SpatialDomSpatial half-extents (Decimal).
velocity: VelocityDomVelocity half-extents (Decimal).
spatial_res: SpatialResSpatial grid resolution (cell counts per axis).
velocity_res: VelocityResVelocity grid resolution (cell counts per axis).
time_range: TimeRangeSimulation start and end times.
spatial_bc: SpatialBoundTypeBoundary condition applied along spatial axes.
velocity_bc: VelocityBoundTypeBoundary condition applied along velocity axes.
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn builder() -> DomainBuilder
pub fn builder() -> DomainBuilder
Create a DomainBuilder with default settings.
Sourcepub fn cell_volume_3d(&self) -> f64
pub fn cell_volume_3d(&self) -> f64
Spatial cell volume dx1 * dx2 * dx3.
Sourcepub fn cell_volume_6d(&self) -> f64
pub fn cell_volume_6d(&self) -> f64
Full 6D phase-space cell volume dx1dx2dx3 * dv1dv2dv3.
Sourcepub fn total_cells(&self) -> usize
pub fn total_cells(&self) -> usize
Total number of 6D cells: Nx³ × Nv³.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnsafeUnpin for Domain
impl UnwindSafe for Domain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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