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

Physical spacing between grid points. More...

#include <strong_types.hpp>

Collaboration diagram for pfc::GridSpacing:

Public Member Functions

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

Public Attributes

Real3 value
 Underlying array value.
 

Detailed Description

Physical spacing between grid points.

Represents the physical distance between adjacent grid points in each dimension. Defines the resolution of the computational grid in physical units.

Note
Zero-cost: sizeof(GridSpacing) == sizeof(Real3)
Trivially copyable: No heap allocation or deep copy
GridSpacing spacing({1.0, 1.0, 1.0}); // 1 unit spacing
Real3 raw = spacing; // Implicit conversion
Physical spacing between grid points.
Definition strong_types.hpp:370
Represents the global simulation domain (the "world").
Definition world.hpp:91
Examples
04_diffusion_model.cpp, and world_strong_types_example.cpp.

Constructor & Destructor Documentation

◆ GridSpacing()

pfc::GridSpacing::GridSpacing ( const Real3 &  v)
inline

Construct from Real3 (implicit for backward compatibility)

Parameters
vSpacing in each dimension

Member Function Documentation

◆ get()

const Real3 & pfc::GridSpacing::get ( ) const
inlinenoexcept

Get underlying value.

Returns
Reference to underlying Real3
Here is the caller graph for this function:

◆ operator const Real3 &()

pfc::GridSpacing::operator const Real3 & ( ) const
inlinenoexcept

Implicit conversion to Real3.

Returns
Reference to underlying Real3

◆ operator!=()

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

Inequality comparison.

Parameters
otherGridSpacing to compare
Returns
true if values are not equal

◆ operator==()

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

Equality comparison.

Parameters
otherGridSpacing to compare
Returns
true if values are equal

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