[petsc-users] Structure of DMMG

Barry Smith bsmith at mcs.anl.gov
Wed Aug 24 16:25:11 CDT 2011


  Alan,

    PETSc is designed as an object oriented package; as such the objects are defined by the operations they perform, not the data stored inside them. So, for example, the Vec object is defined by all the VecXXX() operations you can call which are listed in the manual pages list.  You really don't want to see the details of the Vec data structure (for one thing it is different for different Vec implementations), they don't tell you what you can do with a Vec. (same of other objects). I suggest going through some of the examples and seeing the types of operations you can perform on different objects starting with the vec/vec/examples/tutorials examples.

  Barry



On Aug 24, 2011, at 4:19 PM, Alan Wei wrote:

> Dear all,
>     I  hope you're having a nice day.
>     I'm using PETSc as a beginner. I found it is very easy to find a definition of a function like 'DACreate2d' online and it explains very clearly. However, I think it is really confusing for those explanation of data structures like DMMG, DA, DM and so on, or even Vec. I wonder if there is more details that I can read, like what is inside DMMG. For example, as I see, DM is a part of DMMG. 
> 
> thanks,
> Alan



More information about the petsc-users mailing list