pub struct TileActor {
pub tile_x: u32,
pub tile_y: u32,
/* private fields */
}Expand description
A single tile actor managing a region of the simulation grid.
Fields§
§tile_x: u32Tile position in tile coordinates.
tile_y: u32Implementations§
Source§impl TileActor
impl TileActor
Sourcepub fn new(
tile_x: u32,
tile_y: u32,
tile_size: u32,
tiles_x: u32,
tiles_y: u32,
broker: &Arc<K2KBroker>,
reflection_coeff: f32,
) -> Self
pub fn new( tile_x: u32, tile_y: u32, tile_size: u32, tiles_x: u32, tiles_y: u32, broker: &Arc<K2KBroker>, reflection_coeff: f32, ) -> Self
Create a new tile actor.
Sourcepub fn tile_kernel_id(tile_x: u32, tile_y: u32) -> KernelId
pub fn tile_kernel_id(tile_x: u32, tile_y: u32) -> KernelId
Generate kernel ID for a tile.
Sourcepub fn get_pressure(&self, local_x: u32, local_y: u32) -> f32
pub fn get_pressure(&self, local_x: u32, local_y: u32) -> f32
Get pressure at local tile coordinates.
Sourcepub fn set_pressure(&mut self, local_x: u32, local_y: u32, value: f32)
pub fn set_pressure(&mut self, local_x: u32, local_y: u32, value: f32)
Set pressure at local tile coordinates.
Sourcepub async fn send_halos(&self) -> Result<()>
pub async fn send_halos(&self) -> Result<()>
Send halo data to all neighbors via K2K.
Sourcepub fn receive_halos(&mut self)
pub fn receive_halos(&mut self)
Receive halo data from all neighbors via K2K.
Sourcepub fn compute_fdtd(&mut self, c2: f32, damping: f32)
pub fn compute_fdtd(&mut self, c2: f32, damping: f32)
Compute FDTD for all interior cells.
Sourcepub fn swap_buffers(&mut self)
pub fn swap_buffers(&mut self)
Swap pressure buffers after FDTD step.
Auto Trait Implementations§
impl Freeze for TileActor
impl !RefUnwindSafe for TileActor
impl Send for TileActor
impl Sync for TileActor
impl Unpin for TileActor
impl !UnwindSafe for TileActor
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Turns some type into the initial state of some
Application.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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.