[petsc-users] VecNorm() of VECNEST returns 0 while sub-vectors have nonzero norms
Pierre Jolivet
pierre at joliv.et
Tue Jan 6 04:39:19 CST 2026
Could you please share a runnable piece of code?
I’ve tried to generate an example myself, and I don’t get 0 for the norm of G.
Thanks,
Pierre
> On 6 Jan 2026, at 11:12 AM, Michael Wick <michael.wick.1980 at gmail.com> wrote:
>
> 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/e9a26717/attachment.html>
More information about the petsc-users
mailing list