|
template<typename grid_type > |
grid_type::stype | get_time_step_CFL (grid_type &grid, typename grid_type::stype u[grid_type::dims], typename grid_type::stype C) |
| Computes the time step size fulfilling CFL condition according to https://www.cfd-online .com/Wiki/Courant–Friedrichs–Lewy_condition for arbitrary dimensionality.
|
|
template<typename grid_type > |
grid_type::stype | get_time_step_CFL (grid_type &grid, typename grid_type::stype u, typename grid_type::stype C) |
| Computes the time step size fulfilling CFL condition according to https://www.cfd-online .com/Wiki/Courant–Friedrichs–Lewy_condition for arbitrary dimensionality.
|
|
template<size_t Prop, typename grid_type , typename T > |
void | init_grid_and_ghost (grid_type &grid, T init_value) |
| Initializes given property Prop of an OpenFPM grid including ghost layer with a given value from init_value .
|
|
template<size_t attr_sc, size_t attr_ds, typename grid_source_type , typename grid_dest_type > |
void | copy_gridTogrid (const grid_source_type &grid_sc, grid_dest_type &grid_ds, bool include_ghost=false) |
| Copies the value stored in a given property from a given source grid to a given destination grid.
|
|
template<typename grid_type > |
grid_type::stype | get_biggest_spacing (grid_type &grid) |
| Determines the biggest spacing of a grid which is potentially anisotropic when comparing x, y (and z) coordinate axis.
|
|
template<typename grid_type > |
grid_type::stype | get_smallest_spacing (grid_type &grid) |
| Determines the smallest spacing of a grid which is potentially anisotropic when comparing x, y (and z) coordinate axis.
|
|
template<size_t Prop1, size_t Prop2, typename grid_type > |
auto | average_difference (grid_type &grid) |
| Computes the average difference between the values stored at two different properties of the same grid, that is, the total difference of these values summed over all the grid nodes divided by the gridsize.
|
|
template<size_t Prop, typename grid_type > |
auto | get_max_val (grid_type &grid) |
| Determines the maximum value stored on a given grid at a given property.
|
|
template<size_t Prop, typename grid_type > |
auto | get_min_val (grid_type &grid) |
| Determines the minimum value stored on a given grid at a given property.
|
|
template<size_t Prop_in, size_t Prop_out, typename grid_type > |
void | init_sign_prop (grid_type &grid) |
| Determines the sign of a value stored at a given property and stores it in another property.
|
|
template<size_t Vector_in, size_t Magnitude_out, typename magnitude_type , typename gridtype > |
void | get_vector_magnitude (gridtype &grid) |
| Computes the magnitude of the gradient (L2-norm of gradient vector).
|
|
template<size_t Vector_in, typename key_type , typename gridtype > |
auto | get_vector_magnitude (gridtype &grid, key_type &key) |
| Computes the magnitude of the gradient (L2-norm of gradient vector).
|
|
Header file containing help-functions that perform on OpenFPM-grids.
- Author
- Justina Stark
- Date
- May 2020
Definition in file HelpFunctionsForGrid.hpp.
template<size_t attr_sc, size_t attr_ds, typename grid_source_type , typename grid_dest_type >
void copy_gridTogrid |
( |
const grid_source_type & |
grid_sc, |
|
|
grid_dest_type & |
grid_ds, |
|
|
bool |
include_ghost = false |
|
) |
| |
Copies the value stored in a given property from a given source grid to a given destination grid.
- Template Parameters
-
attr_sc | Index of property that contains the value that should be copied. |
attr_ds | Index of property to which the value should be copied to. |
grid_source_type | Template type of the source grid grid_sc . |
grid_dest_type | Template type of the destination grid grid_ds . |
- Parameters
-
grid_sc | OpenFPM grid from which value is copied (source). |
grid_ds | OpenFPM grid to which value is copied to (destination). |
include_ghost | Bool variable that defines if the copying should include the ghost layer. False, if not; true, if yes. Default: false. |
Definition at line 95 of file HelpFunctionsForGrid.hpp.
template<size_t Vector_in, size_t Magnitude_out, typename magnitude_type , typename gridtype >
void get_vector_magnitude |
( |
gridtype & |
grid | ) |
|
Computes the magnitude of the gradient (L2-norm of gradient vector).
- Template Parameters
-
Phi_grad_in | Size_t index of property that contains the gradient. |
Phi_magnOfGrad_out | Size_t index of property where the magnitude of gradient should be stored. |
gridtype | Type of input grid. |
- Parameters
-
grid | Grid, on which the magnitude of gradient should be computed. |
Definition at line 267 of file HelpFunctionsForGrid.hpp.