#include "petscksp.h" PetscErrorCode KSPBuildSolution(KSP ksp,Vec v,Vec *V)Collective on KSP Many br
v | - location to stash solution. Many br | |
V | - the solution is returned in this location. This vector is created Many brinternally. This vector should NOT be destroyed by the user with Many brVecDestroy(). Many br |
KSPBuildSolution(ksp,NULL,&V); or KSPBuildSolution(ksp,v,NULL); or KSPBuildSolution(ksp,v,&v);Many brIn the first case an internal vector is allocated to store the solution Many br(the user cannot destroy this vector). In the second case the solution Many bris generated in the vector that the user provides. Note that for certain Many brmethods, such as KSPCG, the second case requires a copy of the solution, Many brwhile in the first case the call is essentially free since it simply Many brreturns the vector where the solution already is stored. For some methods Many brlike GMRES this is a reasonably expensive operation and should only be Many brused in truly needed. Many br
Many br
Level:advanced
Location:src/ksp/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages