OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
pfc::LocalOffset Struct Reference

Local subdomain offset in local coordinate system. More...

#include <strong_types.hpp>

Collaboration diagram for pfc::LocalOffset:

Public Member Functions

 LocalOffset (const Int3 &v)
 Construct from Int3 (implicit for backward compatibility)
 
const Int3 & get () const noexcept
 Get underlying value.
 
 operator const Int3 & () const noexcept
 Implicit conversion to Int3.
 
bool operator== (const LocalOffset &other) const noexcept
 Equality comparison.
 
bool operator!= (const LocalOffset &other) const noexcept
 Inequality comparison.
 

Public Attributes

Int3 value
 Underlying array value.
 

Detailed Description

Local subdomain offset in local coordinate system.

Represents the offset of a subdomain within a local coordinate frame. Used in domain decomposition to specify where a subdomain starts.

Note
Zero-cost: sizeof(LocalOffset) == sizeof(Int3)
Trivially copyable: No heap allocation or deep copy
LocalOffset offset({0, 0, 0}); // Starts at origin
Int3 raw = offset; // Implicit conversion
Local subdomain offset in local coordinate system.
Definition strong_types.hpp:230
Represents the global simulation domain (the "world").
Definition world.hpp:91

Constructor & Destructor Documentation

◆ LocalOffset()

pfc::LocalOffset::LocalOffset ( const Int3 &  v)
inline

Construct from Int3 (implicit for backward compatibility)

Parameters
vOffset in each dimension

Member Function Documentation

◆ get()

const Int3 & pfc::LocalOffset::get ( ) const
inlinenoexcept

Get underlying value.

Returns
Reference to underlying Int3

◆ operator const Int3 &()

pfc::LocalOffset::operator const Int3 & ( ) const
inlinenoexcept

Implicit conversion to Int3.

Returns
Reference to underlying Int3

◆ operator!=()

bool pfc::LocalOffset::operator!= ( const LocalOffset other) const
inlinenoexcept

Inequality comparison.

Parameters
otherLocalOffset to compare
Returns
true if values are not equal

◆ operator==()

bool pfc::LocalOffset::operator== ( const LocalOffset other) const
inlinenoexcept

Equality comparison.

Parameters
otherLocalOffset to compare
Returns
true if values are equal

The documentation for this struct was generated from the following file: