![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Extensible coordinate system framework. More...
#include "types.hpp"

Go to the source code of this file.
Classes | |
| struct | pfc::csys::CartesianTag |
| Tag type for the 3D Cartesian coordinate system. More... | |
| struct | pfc::csys::CoordinateSystemDefaults< CartesianTag > |
| Default parameters for the 3D Cartesian coordinate system. More... | |
| struct | pfc::csys::CoordinateSystem< CartesianTag > |
| Specialization of the coordinate system for 3D Cartesian space. More... | |
Typedefs | |
| using | pfc::csys::CartesianCS = CoordinateSystem< CartesianTag > |
Functions | |
| const Real3 & | pfc::csys::get_offset (const CartesianCS &cs) noexcept |
| Get the offset of the coordinate system. | |
| double | pfc::csys::get_offset (const CartesianCS &cs, int i) |
| Get the offset of the coordinate system in a specific dimension. | |
| const Real3 & | pfc::csys::get_spacing (const CartesianCS &cs) noexcept |
| Get the spacing of the coordinate system. | |
| double | pfc::csys::get_spacing (const CartesianCS &cs, int i) |
| Get the spacing of the coordinate system in a specific dimension. | |
| const Bool3 & | pfc::csys::get_periodic (const CartesianCS &cs) noexcept |
| Get the periodicity of the coordinate system. | |
| bool | pfc::csys::is_periodic (const CartesianCS &cs, int i) |
| Check if the coordinate system is periodic in a specific dimension. | |
| const Real3 | pfc::csys::to_coords (const CartesianCS &cs, const Int3 &idx) noexcept |
| Convert grid indices to physical coordinates. | |
| const Int3 | pfc::csys::to_index (const CartesianCS &cs, const Real3 &xyz) noexcept |
| Convert physical coordinates to grid indices. | |
Extensible coordinate system framework.
This header defines the CoordinateSystem template framework for defining custom coordinate systems (Cartesian, Polar, Cylindrical, etc.) via compile-time specialization.
Each coordinate system specialization provides:
The design uses template specialization rather than inheritance, enabling zero-cost abstractions and user-defined coordinate systems without modifying OpenPFC source code.
|
inlinenoexcept |
Get the offset of the coordinate system.
| cs | Coordinate system object. |


|
inline |
Get the offset of the coordinate system in a specific dimension.
| cs | Coordinate system object. |
| i | Dimension index. |
| std::out_of_range | if i is not in [0, 2]. |

|
inlinenoexcept |
Get the periodicity of the coordinate system.
| cs | Coordinate system object. |


|
inlinenoexcept |
Get the spacing of the coordinate system.
| cs | Coordinate system object. |


|
inline |
Get the spacing of the coordinate system in a specific dimension.
| cs | Coordinate system object. |
| i | Dimension index. |
| std::out_of_range | if i is not in [0, 2]. |

|
inline |
Check if the coordinate system is periodic in a specific dimension.
| cs | Coordinate system object. |
| i | Dimension index. |
| std::out_of_range | if i is not in [0, 2]. |


|
inlinenoexcept |
Convert grid indices to physical coordinates.
| cs | Coordinate system object. |
| idx | Grid indices. |


|
inlinenoexcept |
Convert physical coordinates to grid indices.
| cs | Coordinate system object. |
| xyz | Physical coordinates. |

