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

Physical coordinates in space. More...

#include <strong_types.hpp>

Collaboration diagram for pfc::PhysicalCoords:

Public Member Functions

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

Public Attributes

Real3 value
 Underlying array value.
 

Detailed Description

Physical coordinates in space.

Represents a position in physical space (as opposed to index space). Used for specifying locations, evaluating functions at positions, etc.

Note
Zero-cost: sizeof(PhysicalCoords) == sizeof(Real3)
Trivially copyable: No heap allocation or deep copy
PhysicalCoords pos({1.5, 2.5, 3.5}); // Point in space
Real3 raw = pos; // Implicit conversion
Physical coordinates in space.
Definition strong_types.hpp:478
Represents the global simulation domain (the "world").
Definition world.hpp:91

Constructor & Destructor Documentation

◆ PhysicalCoords()

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

Construct from Real3 (implicit for backward compatibility)

Parameters
vPhysical coordinates

Member Function Documentation

◆ get()

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

Get underlying value.

Returns
Reference to underlying Real3

◆ operator const Real3 &()

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

Implicit conversion to Real3.

Returns
Reference to underlying Real3

◆ operator!=()

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

Inequality comparison.

Parameters
otherPhysicalCoords to compare
Returns
true if values are not equal

◆ operator==()

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

Equality comparison.

Parameters
otherPhysicalCoords to compare
Returns
true if values are equal

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