#include "petscsys.h" PetscErrorCode PetscViewerStringSetString(PetscViewer viewer,char string[],size_t len)Logically Collective on PetscViewer
viewer | - string viewer you wish to attach string to | |
string | - the string to print data into | |
len | - the length of the string |
Notes: The function does not copy the string, it uses it directly therefore you cannot free the string until the viewer is destroyed. If you call PetscViewerStringSetOwnString() the ownership passes to the viewer and it will be responsable for freeing it. In this case the string must be obtained with PetscMalloc().