Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ErrorNorms Class Reference

norm estimation of the difference between two fields. More...

#include <ErrorNorms.h>

List of all members.

Static Public Methods

real H1Norm (FieldFE &pa, FieldFE &pb, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0)
real H1Norm (const FieldFunc &fp, FieldFE &pb, real t=DUMMY, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0)
void Lnorm (Field &pa, FieldWithPtValues &pb, GridFE &pb_grid, bool same_grid, real time, real &norm_L1, real &norm_L2, real &norm_Linf, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)
void Lnorm (const FieldFunc &fa, FieldFE &pb, real t, real &norm_L1, real &norm_L2, real &norm_Linf, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)
void Lnorm (const FieldFunc &fa, FieldFE &pb, real t, real &norm_L1, real &norm_L2, real &norm_Linf, bool isoparametric, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)
void Lnorm (fxtFieldFunc fa, FieldFE &pb, real t, real &norm_L1, real &norm_L2, real &norm_Linf, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)
real L2Norm (FieldFE &pa, FieldFE &pb)
void Lnorm (FieldFE &pa, FieldFE &pb, real &norm_L1, real &norm_L2, real &norm_Linf)
real L2Norm (const FieldFunc &fa, FieldFE &pb, real t=DUMMY)
real L2Norm (fxtFieldFunc fa, FieldFE &pb, real t=DUMMY)
void errorField (FieldFE &pa, FieldFE &pb, FieldFE &error)
void errorField (FieldFV &pa, FieldFV &pb, FieldFV &error)
void errorField (const FieldFunc &pa, FieldFE &pb, real t, FieldFE &error)
void errorField (const FieldFunc &pa, FieldFV &pb, real t, FieldFV &error)
void errorField (fxtFieldFunc pa, FieldFE &pb, real t, FieldFE &error)
void errorField (FieldLattice &pa, FieldLattice &pb, FieldLattice &error)
void errorField (const FieldFunc &pa, FieldLattice &pb, real t, FieldLattice &error)
void errorField (fxtFieldFunc pa, FieldLattice &pb, real t, FieldLattice &error)
void discreteLnorm (FieldFE &pa, FieldFE &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldFV &pa, FieldFV &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldPiWisConst &pa, FieldFE &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldPiWisConst &pa, FieldPiWisConst &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (const FieldFunc &fa, FieldFE &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (const FieldFunc &fa, FieldFV &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (const FieldFunc &fa, FieldFE &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf, bool isoparametric)
void discreteLnorm (const FieldFunc &fa, FieldPiWisConst &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
void Lnorm (Fields &pa, FieldsWithPtValues &pb, GridFE &pb_grid, bool same_grid, real time, real &norm_L1, real &norm_L2, real &norm_Linf, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0)
void Lnorm (const FieldsFunc &fa, FieldsFE &pb, real t, real &norm_L1, real &norm_L2, real &norm_Linf, bool isoparametric, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)
void errorField (FieldsFE &pa, FieldsFE &pb, FieldsFE &error)
void errorField (FieldsFV &pa, FieldsFV &pb, FieldsFV &error)
void errorField (FieldsFunc &pa, FieldsFE &pb, real t, FieldsFE &error)
void errorField (FieldsFunc &pa, FieldsFV &pb, real t, FieldsFV &error)
void errorField (FieldsLattice &pa, FieldsLattice &pb, FieldsLattice &error)
void errorField (FieldsFunc &pa, FieldsLattice &pb, real t, FieldsLattice &error)
void discreteLnorm (FieldsFE &pa, FieldsFE &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldsFV &pa, FieldsFV &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldsFunc &pa, FieldsFE &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf, bool isoparametric)
void discreteLnorm (FieldsPiWisConst &pa, FieldsFE &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLorm (FieldsPiWisConst &pa, FieldsPiWisConst &pb, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldsFunc &fa, FieldsFE &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldsFunc &fa, FieldsFV &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
void discreteLnorm (FieldsFunc &fa, FieldsPiWisConst &pb, real time, real &norm_l1, real &norm_l2, real &norm_linf)
real H1SemiNorm (FieldFunc &fp, FieldFE &pb, real t=DUMMY, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0)
real H1SemiNorm (FieldsFunc &fp, FieldsFE &pb, real t=DUMMY, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0)
void HdivNorm (FieldsFunc &fa, FieldsFE &pb, real &Hdiv_norm, real &L2_part, real &div_part, real &inf_error, real t, bool isoparametric, bool print_info=false, NumItgPoints itg_pt_tp=GAUSS_POINTS, int relative_order=0, FEM *solver=NULL, real *norm_energy=NULL)


Detailed Description

norm estimation of the difference between two fields.

NAME: ErrorNorms - norm estimation of the difference between two fields

DESCRIPTION:

Class "ErrorNorms" is a collection of (static) functions for calculating the norm of the difference between two fields. For example, class "ErrorNorms" class is useful for testing the convergence rates in finite element methods.

The class focuses on the comparison of two fields. The norm of a single field is at present not computed by this class. The fields can be various types, e.g., "FieldFunc", "FieldFE", "FieldPiWisConst" and the corresponding vector field classes. All the functions assume that (at least) one of the fields has an underlying grid object of type "GridFE". For all the continuous norms ("L2", "L1" and "Linf"), this "GridFE" object is fundamental to the numerical integration over the spatial domain.

NB! If both input fields have an underlying grid, the second field is assumed to have the finest grid.


Member Function Documentation

static real ErrorNorms::H1Norm ( const FieldFunc & fp,
FieldFE & pb,
real t = DUMMY,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0 ) [static]
 

See documentation of one of the overloaded functions.

static real ErrorNorms::H1Norm ( FieldFE & pa,
FieldFE & pb,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0 ) [static]
 

computes the H1 norm of the difference between two finite element fields, or a finite element field and a functor. If higher order elements are used, proper convergence of the H1 norm usually require that the functor has implemented an analytical expression for "derivativePt". The default numerical approximation has led to very low convergence rates.

static real ErrorNorms::H1SemiNorm ( FieldsFunc & fp,
FieldsFE & pb,
real t = DUMMY,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0 ) [static]
 

See documentation of one of the overloaded functions.

static real ErrorNorms::H1SemiNorm ( FieldFunc & fp,
FieldFE & pb,
real t = DUMMY,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0 ) [static]
 

computes the H1 semi-norm (Du,Du), i.e., the difference between the H1 and L2 norms. As above, the norm calculation is applied to the difference between the two input fields.

static void ErrorNorms::HdivNorm ( FieldsFunc & fa,
FieldsFE & pb,
real & Hdiv_norm,
real & L2_part,
real & div_part,
real & inf_error,
real t,
bool isoparametric,
bool print_info = false,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [static]
 

computes the H_div norm used in connection with mixed finite element methods. As above, the norm calculation is applied to the difference between the two input fields.

static real ErrorNorms::L2Norm ( fxtFieldFunc fa,
FieldFE & pb,
real t = DUMMY ) [inline, static]
 

See documentation of one of the overloaded functions.

static real ErrorNorms::L2Norm ( const FieldFunc & fa,
FieldFE & pb,
real t = DUMMY ) [static]
 

See documentation of one of the overloaded functions.

static real ErrorNorms::L2Norm ( FieldFE & pa,
FieldFE & pb ) [static]
 

represents a simplified interface to "Lnorm" for the very common case where two finite element fields are compared. There is also an overloaded version representing a simplified interface to "L2Norm" for the case where a finite element field is to be compared to an analytical field (coded in terms of a "FieldFunc" object).

static void ErrorNorms::Lnorm ( const FieldsFunc & fa,
FieldsFE & pb,
real t,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
bool isoparametric,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( Fields & pa,
FieldsWithPtValues & pb,
GridFE & pb_grid,
bool same_grid,
real time,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0 ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( FieldFE & pa,
FieldFE & pb,
real & norm_L1,
real & norm_L2,
real & norm_Linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( fxtFieldFunc fa,
FieldFE & pb,
real t,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [inline, static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( const FieldFunc & fa,
FieldFE & pb,
real t,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
bool isoparametric,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( const FieldFunc & fa,
FieldFE & pb,
real t,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::Lnorm ( Field & pa,
FieldWithPtValues & pb,
GridFE & pb_grid,
bool same_grid,
real time,
real & norm_L1,
real & norm_L2,
real & norm_Linf,
NumItgPoints itg_pt_tp = GAUSS_POINTS,
int relative_order = 0,
FEM * solver = NULL,
real * norm_energy = NULL ) [static]
 

generic function for computing various norms (L1, L2, max-norm, energy norm) of the difference of two fields. One of the fields must be associated with a grid of type "GridFE" (this grid is used for numerical integration and is associated with the field "pb" - in practice "pb" is a "FieldFE" or "FieldPiWisConst" and "pb_grid" is indentical to "pb.grid()"). The "same_grid" parameter is true if "pa" and "pb" use the same underlying "GridFE" field (this increases the efficiency since a lot of element searches during interpolation can be avoided). The "time" argument should be "DUMMY" for stationary fields. Note that there is a possibility of setting the type of integration points and the order of the integration rule. For example, to investigate possible superconvergence of the solution at the nodal points, one can apply the "NODAL_POINTS" value for the "itg_pt_tp" argument. Note that the max-norm ("Linf") is based on the integration points, hence the max-norm may be different from the max-norm of the vector of the nodal values! The optional parameters "solver" and "norm_energy" can be given to compute the energy norm of the error. This requires that the simulation class has implemented the "integrands4energyErrorNorm" function for sampling of the integrands in the energy error norm expression. Note that the "pb" and "pb" argument can both be fields over grids. In that case "pb" must have the finest grid. The "pa" field can be a functor (e.g. an analytical solution to the problem). Hence, if the analytical solution is available as a functor, it is transferred to "Lnorm" as "pa", while if only a fine grid reference solution is available to mimic the exact solution, it must be transferred as "pb". Note this difference! (The reason for this distinction is that the integration must take place over the finesst grid, and this may be the solution grid if a functor is the reference solution, and the reference solution grid if the reference solution is discrete.) In the case where the energy norm is to be computed, a functor for the analytical solution must implement the function "derivatePt". If one relies on the inherited default version for this function, which applies finite difference approximation to the derivative, the energy error norm will not be accurate enough to, e.g., show the correct convergence rate.

static void ErrorNorms::discreteLnorm ( FieldsFunc & fa,
FieldsPiWisConst & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsFunc & fa,
FieldsFV & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsFunc & fa,
FieldsFE & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsPiWisConst & pa,
FieldsFE & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsFunc & pa,
FieldsFE & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf,
bool isoparametric ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsFV & pa,
FieldsFV & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldsFE & pa,
FieldsFE & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( const FieldFunc & fa,
FieldPiWisConst & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( const FieldFunc & fa,
FieldFE & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf,
bool isoparametric ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( const FieldFunc & fa,
FieldFV & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( const FieldFunc & fa,
FieldFE & pb,
real time,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldPiWisConst & pa,
FieldPiWisConst & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldPiWisConst & pa,
FieldFE & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldFV & pa,
FieldFV & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::discreteLnorm ( FieldFE & pa,
FieldFE & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

these functions correspond to "Lnorm", except that the discrete norm is computed (note that the continuous norm is an integral over the domain, while the discrete norm is simply based on the discrete field values, usually at the nodal points or the element centroids). When using non-uniform grids, discrete norms puts more weight on the areas of the domain where the nodes are dense. This may be an undesired effect. Due to dependence of the algorithms on the field representation, it is not possible to write 'one' generic "discreteLnorm" function. Instead there are several overloaded versions for handling various field types.

void ErrorNorms::discreteLorm ( FieldsPiWisConst & pa,
FieldsPiWisConst & pb,
real & norm_l1,
real & norm_l2,
real & norm_linf ) [static]
 

static void ErrorNorms::errorField ( FieldsFunc & pa,
FieldsLattice & pb,
real t,
FieldsLattice & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldsLattice & pa,
FieldsLattice & pb,
FieldsLattice & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldsFunc & pa,
FieldsFV & pb,
real t,
FieldsFV & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldsFunc & pa,
FieldsFE & pb,
real t,
FieldsFE & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldsFV & pa,
FieldsFV & pb,
FieldsFV & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldsFE & pa,
FieldsFE & pb,
FieldsFE & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( fxtFieldFunc pa,
FieldLattice & pb,
real t,
FieldLattice & error ) [inline, static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( const FieldFunc & pa,
FieldLattice & pb,
real t,
FieldLattice & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldLattice & pa,
FieldLattice & pb,
FieldLattice & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( fxtFieldFunc pa,
FieldFE & pb,
real t,
FieldFE & error ) [inline, static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( const FieldFunc & pa,
FieldFV & pb,
real t,
FieldFV & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( const FieldFunc & pa,
FieldFE & pb,
real t,
FieldFE & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldFV & pa,
FieldFV & pb,
FieldFV & error ) [static]
 

See documentation of one of the overloaded functions.

static void ErrorNorms::errorField ( FieldFE & pa,
FieldFE & pb,
FieldFE & error ) [static]
 

instead of computing the norm of the difference between two fields, this function computes the difference as a field. The function is convenient for, e.g., plotting the error field in numerical computations.


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.