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

Global subdomain offset in global coordinate system. More...

#include <strong_types.hpp>

Collaboration diagram for pfc::GlobalOffset:

Public Member Functions

 GlobalOffset (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 GlobalOffset &other) const noexcept
 Equality comparison.
 
bool operator!= (const GlobalOffset &other) const noexcept
 Inequality comparison.
 

Public Attributes

Int3 value
 Underlying array value.
 

Detailed Description

Global subdomain offset in global coordinate system.

Represents the offset of a subdomain within the global computational domain. Used in distributed-memory (MPI) parallelism to specify subdomain position.

Note
Zero-cost: sizeof(GlobalOffset) == sizeof(Int3)
Trivially copyable: No heap allocation or deep copy
GlobalOffset offset({64, 0, 0}); // Second subdomain in x-direction
Int3 raw = offset; // Implicit conversion
Global subdomain offset in global coordinate system.
Definition strong_types.hpp:284
Represents the global simulation domain (the "world").
Definition world.hpp:91

Constructor & Destructor Documentation

◆ GlobalOffset()

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

Construct from Int3 (implicit for backward compatibility)

Parameters
vOffset in each dimension

Member Function Documentation

◆ get()

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

Get underlying value.

Returns
Reference to underlying Int3

◆ operator const Int3 &()

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

Implicit conversion to Int3.

Returns
Reference to underlying Int3

◆ operator!=()

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

Inequality comparison.

Parameters
otherGlobalOffset to compare
Returns
true if values are not equal

◆ operator==()

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

Equality comparison.

Parameters
otherGlobalOffset to compare
Returns
true if values are equal

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