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

Index space bounds (min and max indices) More...

#include <strong_types.hpp>

Collaboration diagram for pfc::IndexBounds:

Public Member Functions

 IndexBounds (const Int3 &lo, const Int3 &hi)
 Construct from lower and upper bounds.
 

Public Attributes

Int3 lower
 Lower bounds (inclusive)
 
Int3 upper
 Upper bounds (inclusive)
 

Detailed Description

Index space bounds (min and max indices)

Represents a rectangular region in index space with lower and upper bounds. Commonly used to specify iteration ranges or subdomain boundaries.

Note
Zero-cost: Struct of two Int3 arrays, no overhead
Trivially copyable: No heap allocation or deep copy
IndexBounds bounds({0, 0, 0}, {63, 63, 63});
for (int k = bounds.lower[2]; k <= bounds.upper[2]; ++k) {
// Iterate over region
}
Index space bounds (min and max indices)
Definition strong_types.hpp:340
Represents the global simulation domain (the "world").
Definition world.hpp:91

Constructor & Destructor Documentation

◆ IndexBounds()

pfc::IndexBounds::IndexBounds ( const Int3 &  lo,
const Int3 &  hi 
)
inline

Construct from lower and upper bounds.

Parameters
loLower bounds (inclusive)
hiUpper bounds (inclusive)

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