[petsc-users] VecNorm() of VECNEST returns 0 while sub-vectors have nonzero norms

Michael Wick michael.wick.1980 at gmail.com
Tue Jan 6 04:12:26 CST 2026


Hello PETSc users,

I have a VECNEST norm issue and would appreciate help.

I create a nest vector:
VecCreateNest(PETSC_COMM_WORLD, 2, NULL, subG, &G);

But:
VecNorm(G, NORM_2, &nG) returns 0

While the sub-vectors are clearly nonzero:
VecNestGetSubVec(G,0,&v0); VecNorm(v0,NORM_2,&n0); // n0 > 0
VecNestGetSubVec(G,1,&v1); VecNorm(v1,NORM_2,&n1); // n1 > 0

Can someone give a hint on what might go wrong?

Thanks,

M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260106/0c552a72/attachment.html>


More information about the petsc-users mailing list