![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Public Types | |
| using | FunctionND = std::function< T(std::array< double, D >)> |
| using | Function1D = std::function< T(double)> |
| using | Function2D = std::function< T(double, double)> |
| using | Function3D = std::function< T(double, double, double)> |
Public Member Functions | |
| DiscreteField (const std::array< int, D > &dimensions, const std::array< int, D > &offsets, const std::array< double, D > &origin, const std::array< double, D > &discretization) | |
| const std::array< double, D > & | get_origin () const |
| Constructs a DiscreteField from an Decomposition object. | |
| const std::array< double, D > & | get_discretization () const |
| const std::array< double, D > & | get_coords_low () const |
| const std::array< double, D > & | get_coords_high () const |
| Array< T, D > & | get_array () |
| const Array< T, D > & | get_array () const |
| const MultiIndex< D > & | get_index () |
| const MultiIndex< D > & | get_index () const |
| std::vector< T > & | get_data () |
| T & | operator[] (const std::array< int, D > &indices) |
| Returns the element at the specified index. | |
| T & | operator[] (size_t idx) |
| Returns the element at the specified index. | |
| std::array< double, D > | map_indices_to_coordinates (const std::array< int, D > &indices) const |
| Maps indices to coordinates in the field. | |
| std::array< int, D > | map_coordinates_to_indices (const std::array< double, D > &coordinates) const |
| Maps coordinates to indices in the field. | |
| bool | inbounds (const std::array< double, D > &coords) |
| Checks if the given coordinates are within the bounds of the field. | |
| T & | interpolate (const std::array< double, D > &coordinates) |
| Interpolate field value at physical coordinates (nearest-neighbor) | |
| void | apply (FunctionND &&func) |
| Applies the given function to each element of the field. | |
| void | apply (Function1D &&func) |
| Applies the given 1D function to each element of the field. | |
| void | apply (Function2D &&func) |
| Applies the given 2D function to each element of the field. | |
| void | apply (Function3D &&func) |
| operator std::vector< T > & () | |
| Convert DiscreteField<T, D> to std::vector<T> | |
| operator std::vector< T > & () const | |
| const std::array< int, D > & | get_size () const |
| Get the size of the field. | |
| const std::array< int, D > & | get_offset () const |
| void | set_data (const std::vector< T > &data) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const DiscreteField< T, D > &field) |
| Outputs the discrete field to the specified output stream. | |
|
inline |
Applies the given 1D function to each element of the field.
The function must be invocable with (double) and return a type convertible toT.
| Function1D | The type of the 1D function. |
| func | The 1D function to apply. |

|
inline |
Applies the given 2D function to each element of the field.
The function must be invocable with (double, double) and return a type convertible toT.
| Function2D | The type of the 2D function. |
| func | The 2D function to apply. |

|
inline |
Applies the given function to each element of the field.
The function must be invocable with std::array<double, D> and return a type convertible to T.
| FunctionND | The type of the function. |
| func | The function to apply. |

|
inline |
Constructs a DiscreteField from an Decomposition object.
| decomp | The Decomposition object. |
|
inline |
Get the size of the field.
|
inline |
Checks if the given coordinates are within the bounds of the field.
| coords | The coordinates to check. |
|
inline |
Interpolate field value at physical coordinates (nearest-neighbor)
Migration:
| coordinates | Physical coordinates [x, y, z] to interpolate at |

|
inline |
Maps coordinates to indices in the field.
| coordinates | The coordinates to map. |

|
inline |
Maps indices to coordinates in the field.
| indices | The indices to map. |

|
inline |
Convert DiscreteField<T, D> to std::vector<T>
|
inline |
Returns the element at the specified index.
| indices | multi-dimensional indices |
|
inline |
Returns the element at the specified index.
| idx |
|
friend |
Outputs the discrete field to the specified output stream.
| os | The output stream. |
| field | The discrete field to output. |