Class for computing the l2/l_infinity norm for distributed grids and vectors based on given errors.
More...
template<typename lnorm_type = double>
class LNorms< lnorm_type >
Class for computing the l2/l_infinity norm for distributed grids and vectors based on given errors.
- Template Parameters
-
lnorm_type | Return type for l-norm. |
Definition at line 104 of file LNorms.hpp.
#include <LNorms.hpp>
|
template<size_t Error, typename gridtype > |
void | get_l_norms_grid (gridtype &grid) |
| Computes the L_2 and L_infinity norm on the basis of the precomputed error on a grid.
|
|
template<size_t Error, typename vectortype > |
void | get_l_norms_vector (vectortype &vd) |
| Computes the L_2 and L_infinity norm on the basis of the precomputed error on a particle vector.
|
|
template<size_t Error, typename grid_type > |
void | get_l_norms (grid_type &grid) |
| Computes the L_2 and L_infinity norm from the error stored in a property on sparse grids, grids or particle vectors.
|
|
template<typename T > |
void | write_to_file (const T col_0, const int precision, const std::string &filename, const std::string &path_output) |
| Writes the N (number of grid points on a square grid) and L-norms as strings to a csv-file.
|
|
◆ LNorms()
template<typename lnorm_type = double>
◆ get_l_norms()
template<typename lnorm_type = double>
Computes the L_2 and L_infinity norm from the error stored in a property on sparse grids, grids or particle vectors.
- Template Parameters
-
Error | Index of grid property that contains the error. |
grid_type | Template type of the input data structure: can be a sparse grid, dense grid or particle vector. |
- Parameters
-
grid | Input sparse grid, dense grid or particle vector. |
Definition at line 189 of file LNorms.hpp.
◆ get_l_norms_grid()
template<typename lnorm_type = double>
template<size_t Error, typename gridtype >
void LNorms< lnorm_type >::get_l_norms_grid |
( |
gridtype & |
grid | ) |
|
|
inline |
Computes the L_2 and L_infinity norm on the basis of the precomputed error on a grid.
- Template Parameters
-
Error | Index of grid property that contains the error. |
gridtype | Template type of the input grid. |
- Parameters
-
grid | Input OpenFPM grid. Can be of any dimension. |
Definition at line 124 of file LNorms.hpp.
◆ get_l_norms_vector()
template<typename lnorm_type = double>
template<size_t Error, typename vectortype >
void LNorms< lnorm_type >::get_l_norms_vector |
( |
vectortype & |
vd | ) |
|
|
inline |
Computes the L_2 and L_infinity norm on the basis of the precomputed error on a particle vector.
- Template Parameters
-
Error | Index of grid property that contains the error. |
vectortype | Template type of the input particle vector. |
- Parameters
-
Definition at line 155 of file LNorms.hpp.
◆ write_to_file()
template<typename lnorm_type = double>
template<typename T >
void LNorms< lnorm_type >::write_to_file |
( |
const T |
col_0, |
|
|
const int |
precision, |
|
|
const std::string & |
filename, |
|
|
const std::string & |
path_output |
|
) |
| |
|
inline |
Writes the N (number of grid points on a square grid) and L-norms as strings to a csv-file.
- Template Parameters
-
T | Type of variable that will be written in the first column of the file as reference. |
- Parameters
-
col_0 | Type T variable that will be written in the first column of the file as reference. |
precision | Precision in number of digits after the points for writing of the l-norms to file. |
filename | Std::string containing the name of the csv file (without the .csv) to which the l-norms should be written to. |
path_output | Std::string containing the path where the output csv file should be saved. |
Definition at line 226 of file LNorms.hpp.
◆ l2
template<typename lnorm_type = double>
lnorm_type LNorms< lnorm_type >::l2 |
◆ linf
template<typename lnorm_type = double>
lnorm_type LNorms< lnorm_type >::linf |
The documentation for this class was generated from the following file:
- openfpm_numerics/src/level_set/redistancing_Sussman/tests/l_norms/LNorms.hpp