Header file containing functions for computing the error and the L_2 / L_infinity norm. More...
#include <iostream>
#include <typeinfo>
#include <cmath>
#include <cstdio>
#include <stdlib.h>
#include "Vector/vector_dist.hpp"
#include "Grid/grid_dist_id.hpp"
#include "util/PathsAndFiles.hpp"
#include "level_set/redistancing_Sussman/HelpFunctions.hpp"
Go to the source code of this file.
Data Structures | |
class | LNorms< lnorm_type > |
Class for computing the l2/l_infinity norm for distributed grids and vectors based on given errors. More... | |
Functions | |
template<size_t PropNumeric, size_t PropAnalytic, size_t Error, typename gridtype > | |
void | get_absolute_error (gridtype &grid) |
At each grid node, the absolute error is computed and stored in another property. More... | |
template<size_t PropNumeric, size_t PropAnalytic, size_t Error, typename gridtype > | |
void | get_relative_error (gridtype &grid) |
At each grid node, the relative error is computed and stored in another property. More... | |
Header file containing functions for computing the error and the L_2 / L_infinity norm.
The L_2 and L_inf norm are useful for verification by convergence testings / plots.
Definition in file LNorms.hpp.
void get_absolute_error | ( | gridtype & | grid | ) |
At each grid node, the absolute error is computed and stored in another property.
The absolute error is computed as:
\[ Error_{abs} = | numerical solution - analytical solution | \]
PropNumeric | Index of grid property that contains the numerical value. |
PropAnalytic | Index of grid property that contains the analytical (exact) value. |
Error | Index of grid property where the computed error should be written to. |
gridtype | Template type of the input grid. |
grid | Input OpenFPM grid. Can be of any dimension. |
Definition at line 43 of file LNorms.hpp.
void get_relative_error | ( | gridtype & | grid | ) |
At each grid node, the relative error is computed and stored in another property.
The relative error is computed as:
\[ Error_{rel} = | 1 - \frac{numerical solution}{analytical solution} | \]
PropNumeric | Index of grid property that contains the numerical value. |
PropAnalytic | Index of grid property that contains the analytical (exact) value. |
Error | Index of grid property where the computed error should be written to. |
gridtype | Template type of the input grid. |
grid | Input OpenFPM grid. Can be of any dimension. |
Definition at line 75 of file LNorms.hpp.