# KSPLoad
Loads a `KSP` that has been stored in a `PETSCVIEWERBINARY`  with `KSPView()`. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode KSPLoad(KSP newdm, PetscViewer viewer)
```
Collective on viewer


## Input Parameters

- ***newdm -*** the newly loaded `KSP`, this needs to have been created with `KSPCreate()` or
some related function before a call to `KSPLoad()`.
- ***viewer -*** binary file viewer, obtained from `PetscViewerBinaryOpen()`





## Note
The type is determined by the data in the file, any type set into the `KSP` before this call is ignored.


## See Also
 `KSP`, `PetscViewerBinaryOpen()`, `KSPView()`, `MatLoad()`, `VecLoad()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/interface/itcreate.c.html#KSPLoad">src/ksp/ksp/interface/itcreate.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/itcreate.c)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
