Barry Smith bsmith at
Wed Nov 26 15:34:08 CST 2008

    PETSc uses "data encapsulation" to NOT allow most code to access  
the internals of
its objects (like KSP, Mat etc.) This is a very powerful feature of  
object oriented programming.

KSP provides a large number of routines (defined in include/ 
petscksp.h) to accessing/changing
information in the KSP object. It is intended that this is how one  
accesses the data.

If you really, really want to access the data then
#include "private/kspimpl.h"
and that gives access to the structure definition.


On Nov 26, 2008, at 1:24 PM, Santolo Felaco wrote:

> Hi, I cannot to KPS's struct field. For exemple if I try to access  
> to field its or vec_sol I have  this error of compiling:  
> dereferencing pointer to incomplete type. Can you help me? Thanks

More information about the petsc-users mailing list