VecErrorWeightedNorms#

compute a weighted norm of the difference between two vectors

Synopsis#

#include "petscvec.h"   
PetscErrorCode VecErrorWeightedNorms(Vec U, Vec Y, Vec E, NormType wnormtype, PetscReal atol, Vec vatol, PetscReal rtol, Vec vrtol, PetscReal ignore_max, PetscReal *norm, PetscInt *norm_loc, PetscReal *norma, PetscInt *norma_loc, PetscReal *normr, PetscInt *normr_loc)

Collective

Input Parameters#

  • U - first vector to be compared

  • Y - second vector to be compared

  • E - optional third vector representing the error (if not provided, the error is ||U-Y||)

  • wnormtype - norm type

  • atol - scalar for absolute tolerance

  • vatol - vector representing per-entry absolute tolerances (can be NULL)

  • rtol - scalar for relative tolerance

  • vrtol - vector representing per-entry relative tolerances (can be NULL)

  • ignore_max - ignore values smaller then this value in absolute terms.

Output Parameters#

  • norm - weighted norm

  • norm_loc - number of vector locations used for the weighted norm

  • norma - weighted norm based on the absolute tolerance

  • norma_loc - number of vector locations used for the absolute weighted norm

  • normr - weighted norm based on the relative tolerance

  • normr_loc - number of vector locations used for the relative weighted norm

Notes#

This is primarily used for computing weighted local truncation errors in TS.

See Also#

Vectors and Parallel Data, Vec, NormType, TSErrorWeightedNorm(), TSErrorWeightedENorm()

Level#

developer

Location#

src/vec/vec/interface/vector.c

Implementations#

VecErrorWeightedNorms_MPIKokkos() in src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx
VecErrorWeightedNorms_Nest() in src/vec/vec/impls/nest/vecnest.c
VecErrorWeightedNorms_SeqKokkos() in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx


Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages