NAME
          pnet_inindex - Get index for input buffer

     SYNOPSIS
          #include <mpi.h>
          #include "pnet.h"

          int pnet_inindex(const Pnet *pnet,int node, int index);

     DESCRIPTION
          Function returns index of in input buffer for specified node
          and connection. Function is implemented as a macro.  The
          arguments of pnet_inindex are:

          pnet Pointer to initialized Pnet struct

          node Index of node. Must be
               pnet_lo(pnet)<=node<=pnet_hi(pnet).

          index
               Index in connection list of specified node. Must be
               0<=index<pnet_inlen(pnet,node).

     RETURN VALUE
          Upon successful completion index in input buffer is
          returned.

     EXAMPLE
          float *in,*out,*node;
          Pnet *pnet;
          int i,j;
          out=(float *)pnet_output(pnet);
          in=(float *)pnet_input(pnet);
          for(i=0;i<pnet_outlen(pnet);i++)
            out[i]=node[pnet_outindex(pnet,i)];
          pnet_exchg();
          for(i=pnet_lo(pnet);i<=pnet_hi(pnet);i++)
            for(j=0;j<pnet_inlen(pnet,i);j++)
              node[i]+=in[pnet_inindex(pnet,i,j)];

     AUTHORS
          For authors and contributors see AUTHORS file


     COPYRIGHT
          (C) Potsdam Institute for Climate Impact Research (PIK), see
          COPYRIGHT file


     SEE ALSO
          pnet_inlen(3),pnet_init(3), pnet_free(3), pnet_setup(3),
          pnet_lo(3), pnet_hi(3), pnet_nodes(3)

Man(1) output converted with man2html