![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Core type definitions for World parameters. More...
#include <array>#include <stdexcept>

Go to the source code of this file.
Classes | |
| struct | pfc::types::Size3 |
| Represents the size of the 3d simulation domain. More... | |
| struct | pfc::types::Periodic3 |
| Represents the periodicity of the 3d simulation domain. More... | |
| struct | pfc::types::LowerBounds3 |
| Represents the lower bounds of the 3d simulation domain. More... | |
| struct | pfc::types::UpperBounds3 |
| Represents the upper bounds of the 3d simulation domain. More... | |
| struct | pfc::types::Spacing3 |
| Represents the spacing of the 3d simulation grid. More... | |
Typedefs | |
| using | pfc::types::Int3 = std::array< int, 3 > |
| Type aliases for clarity. | |
| using | pfc::types::Real3 = std::array< double, 3 > |
| using | pfc::types::Bool3 = std::array< bool, 3 > |
| using | pfc::Int3 = types::Int3 |
| using | pfc::Real3 = types::Real3 |
| using | pfc::Bool3 = types::Bool3 |
Functions | |
| const Real3 | pfc::types::utils::compute_upper_bounds (const Size3 &size, const LowerBounds3 &lower, const Spacing3 &spacing, const Periodic3 &periodic) |
| Computes the upper bounds based on size, lower bounds, and spacing. | |
| Real3 | pfc::types::utils::compute_spacing (const Size3 &size, const LowerBounds3 &lower, const UpperBounds3 &upper, const Periodic3 &periodic) |
| Computes the spacing based on size, lower bounds, and upper bounds. | |
Core type definitions for World parameters.
This header defines the fundamental types used to construct World objects:
These types provide strong typing to prevent confusion between different 3-element arrays (size vs spacing vs bounds), improving code clarity and catching errors at compile time.
| Real3 pfc::types::utils::compute_spacing | ( | const Size3 & | size, |
| const LowerBounds3 & | lower, | ||
| const UpperBounds3 & | upper, | ||
| const Periodic3 & | periodic | ||
| ) |
Computes the spacing based on size, lower bounds, and upper bounds.
| size | The size of the simulation domain. |
| lower | The lower bounds of the simulation domain. |
| upper | The upper bounds of the simulation domain. |
| periodic | The periodicity of the simulation domain. |


| const Real3 pfc::types::utils::compute_upper_bounds | ( | const Size3 & | size, |
| const LowerBounds3 & | lower, | ||
| const Spacing3 & | spacing, | ||
| const Periodic3 & | periodic | ||
| ) |
Computes the upper bounds based on size, lower bounds, and spacing.
| size | The size of the simulation domain. |
| lower | The lower bounds of the simulation domain. |
| spacing | The spacing of the simulation grid. |
| periodic | The periodicity of the simulation domain. |

