Skip to main content
Ctrl+K
PETSc 3.23.4 documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • VecDotNorm2

VecDotNorm2#

computes the inner product of two vectors and the 2-norm squared of the second vector

Synopsis#

#include "petscvec.h" 
PetscErrorCode VecDotNorm2(Vec s, Vec t, PetscScalar *dp, PetscReal *nm)

Collective

Input Parameters#

  • s - first vector

  • t - second vector

Output Parameters#

  • dp - s’conj(t)

  • nm - t’conj(t)

Note#

conj(x) is the complex conjugate of x when x is complex

See Also#

Vec, VecDot(), VecNorm(), VecDotBegin(), VecNormBegin(), VecDotEnd(), VecNormEnd()

Level#

advanced

Location#

src/vec/vec/utils/vinv.c

Implementations#

VecDotNorm2_MPIKokkos() in src/vec/vec/impls/mpi/kokkos/mpikok.kokkos.cxx
VecDotNorm2_MPIViennaCL() in src/vec/vec/impls/mpi/mpiviennacl/mpiviennacl.cxx
VecDotNorm2_Nest() in src/vec/vec/impls/nest/vecnest.c
VecDotNorm2_SeqKokkos() in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx
VecDotNorm2_SeqViennaCL() in src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx


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

On this page
  • Synopsis
  • Input Parameters
  • Output Parameters
  • Note
  • See Also
  • Level
  • Location
  • Implementations
Edit on GitLab
Show Source

© Copyright 1991-2025, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2025-07-15T04:21:32-0500 (v3.23.4-39-ge5234daee2c2f).