[petsc-users] DMNetwork usage example

Dharmendar Reddy dharmareddy84 at gmail.com
Wed Apr 8 23:04:57 CDT 2015


Hello,
           I have a few question regarding the usage.

In DMNetworkRegisterComponent(DM dm,const char *name,PetscInt size,PetscInt
*key)
* size *- the storage size in bytes for this component data

If i call it from fortran, is size then the number of components ?

For example, if i have a network of nodes, I want to store the location of
the node ( double precision :: x,y,z) in the component named "position",
then is the call:


call DMNetworkRegisterComponent(DM dm,"position", 3, positionkey, ierr)

I need to create a network. I know the number of nodes on network and the
maximum number of neighbors any node can have. I can only add the node to
node connections as few at a time.

Is this possible to do with DMNetowrk ?


Reddy


On Wed, Apr 8, 2015 at 10:07 PM, Hong <hzhang at mcs.anl.gov> wrote:

> See
> *petsc/src/snes/examples/tutorials/network/pflow*
>
> *Hong*
>
> On Wed, Apr 8, 2015 at 9:39 PM, Dharmendar Reddy <dharmareddy84 at gmail.com>
> wrote:
>
>> Hello,
>>           Is there a Fortran or C code example illustrating the usage of
>> DMNetwork ?
>>
>> Thanks
>> Reddy
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150408/359ee8a7/attachment.html>


More information about the petsc-users mailing list