pub struct RectangularGeometry { /* private fields */ }Expand description
A rectangular lattice with explicit row-major site order and boundaries.
Implementations§
Source§impl RectangularGeometry
impl RectangularGeometry
Sourcepub fn new(
lx: usize,
ly: usize,
boundary_x: Boundary,
boundary_y: Boundary,
) -> Result<RectangularGeometry, GeometryError>
pub fn new( lx: usize, ly: usize, boundary_x: Boundary, boundary_y: Boundary, ) -> Result<RectangularGeometry, GeometryError>
Construct an orthogonal rectangular geometry.
Sourcepub fn with_kind(
lx: usize,
ly: usize,
boundary_x: Boundary,
boundary_y: Boundary,
kind: LatticeKind,
) -> Result<RectangularGeometry, GeometryError>
pub fn with_kind( lx: usize, ly: usize, boundary_x: Boundary, boundary_y: Boundary, kind: LatticeKind, ) -> Result<RectangularGeometry, GeometryError>
Construct a rectangular coordinate grid with an explicit embedding.
Sourcepub const fn site_count(&self) -> SiteCount
pub const fn site_count(&self) -> SiteCount
Number of sites.
Sourcepub const fn boundary_x(&self) -> Boundary
pub const fn boundary_x(&self) -> Boundary
Return the horizontal boundary condition.
Sourcepub const fn boundary_y(&self) -> Boundary
pub const fn boundary_y(&self) -> Boundary
Return the vertical boundary condition.
Sourcepub const fn kind(&self) -> LatticeKind
pub const fn kind(&self) -> LatticeKind
Return the selected embedding.
Sourcepub fn site_id(&self, x: usize, y: usize) -> Result<SiteId, GeometryError>
pub fn site_id(&self, x: usize, y: usize) -> Result<SiteId, GeometryError>
Map row-major (x, y) coordinates to a site identifier.
Sourcepub fn coordinate(&self, site: SiteId) -> Result<Coordinate, GeometryError>
pub fn coordinate(&self, site: SiteId) -> Result<Coordinate, GeometryError>
Map a canonical site identifier to its row-major coordinate.
Sourcepub fn minimum_image_displacement(
&self,
a: SiteId,
b: SiteId,
) -> Result<Coordinate, GeometryError>
pub fn minimum_image_displacement( &self, a: SiteId, b: SiteId, ) -> Result<Coordinate, GeometryError>
Return the canonical minimum-image Cartesian displacement r_b - r_a.
Sourcepub fn pairs_at_squared_distance(
&self,
target_squared: f64,
tolerance: ShellTolerance,
) -> Result<Vec<Bond>, GeometryError>
pub fn pairs_at_squared_distance( &self, target_squared: f64, tolerance: ShellTolerance, ) -> Result<Vec<Bond>, GeometryError>
Return unordered pairs whose minimum-image squared distance lies in a shell.
Sourcepub fn bonds(
&self,
multiplicity: BondMultiplicity,
) -> Result<Vec<Bond>, GeometryError>
pub fn bonds( &self, multiplicity: BondMultiplicity, ) -> Result<Vec<Bond>, GeometryError>
Generate canonical bonds under the requested multiplicity policy.
Trait Implementations§
Source§impl Clone for RectangularGeometry
impl Clone for RectangularGeometry
Source§fn clone(&self) -> RectangularGeometry
fn clone(&self) -> RectangularGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RectangularGeometry
impl Debug for RectangularGeometry
Source§impl PartialEq for RectangularGeometry
impl PartialEq for RectangularGeometry
impl StructuralPartialEq for RectangularGeometry
Auto Trait Implementations§
impl Freeze for RectangularGeometry
impl RefUnwindSafe for RectangularGeometry
impl Send for RectangularGeometry
impl Sync for RectangularGeometry
impl Unpin for RectangularGeometry
impl UnsafeUnpin for RectangularGeometry
impl UnwindSafe for RectangularGeometry
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