Wrap

Trait Wrap 

Source
pub trait Wrap<P> {
    // Required method
    fn wrap(&self, properties: P) -> Result<P, Error>;
}
Expand description

Attempt to move any body/site properties back into the simulation boundary.

Wrap and GenerateGhosts together define the behavior of simulation boundary conditions.

The boundary defines the subset of points where bodies and sites are allowed. The wrap method takes a given body or site properties that is anywhere in space and attempts to wrap it back into the boundary. This process succeeds when the boundary is periodic and fails when it is not (some boundaries may be periodic in some directions and not in others).

The generic type name is:

Required Methods§

Source

fn wrap(&self, properties: P) -> Result<P, Error>

Transform body/point properties into the boundary.

wrap takes a body or site properties with a position that may be outside the boundary. It attempts to wrap that position back inside following the boundary’s periodicity. wrap returns Ok(properties) when this process is successful.

§Errors

wrap returns Error::CannotWrapProperties when it is not possible to wrap the body into the boundary. For example, when the position is outside the radius of a cylinder that is only periodic along its axis.

Implementors§

Source§

impl Wrap<OrientedHyperbolicPoint<3, Angle>> for Periodic<EightEight>

Source§

impl Wrap<Point<Hyperbolic<3>>> for Periodic<EightEight>

Source§

impl<BS, T, P> Wrap<BS> for Closed<T>
where BS: Position<Position = P>, T: IsPointInside<P>,

Source§

impl<P> Wrap<P> for Open

Source§

impl<const N: usize, P> Wrap<P> for Periodic<Hypercuboid<N>>
where P: Position<Position = Cartesian<N>>,