• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/elements/genericProc/programs/minimd-0.1/comm.h

00001 /* ----------------------------------------------------------------------
00002    miniMD is a simple, parallel molecular dynamics (MD) code.   miniMD is
00003    an MD microapplication in the Mantevo project at Sandia National 
00004    Laboratories ( http://software.sandia.gov/mantevo/ ). The primary 
00005    authors of miniMD are Steve Plimpton and Paul Crozier 
00006    (pscrozi@sandia.gov).
00007 
00008    Copyright (2008) Sandia Corporation.  Under the terms of Contract
00009    DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
00010    certain rights in this software.  This library is free software; you 
00011    can redistribute it and/or modify it under the terms of the GNU Lesser 
00012    General Public License as published by the Free Software Foundation; 
00013    either version 3 of the License, or (at your option) any later 
00014    version.
00015   
00016    This library is distributed in the hope that it will be useful, but
00017    WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00019    Lesser General Public License for more details.
00020     
00021    You should have received a copy of the GNU Lesser General Public 
00022    License along with this software; if not, write to the Free Software
00023    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024    USA.  See also: http://www.gnu.org/licenses/lgpl.txt .
00025 
00026    For questions, contact Paul S. Crozier (pscrozi@sandia.gov). 
00027 
00028    Please read the accompanying README and LICENSE files.
00029 ---------------------------------------------------------------------- */
00030 
00031 #ifndef COMM_H
00032 #define COMM_H
00033 
00034 #include "atom.h"
00035 
00036 class Comm {
00037  public:
00038   Comm();
00039   ~Comm();
00040   int setup(double, Atom &);
00041   void communicate(Atom &);
00042   void reverse_communicate(Atom &);
00043   void exchange(Atom &);
00044   void borders(Atom &);
00045   void growsend(int);
00046   void growrecv(int);
00047   void growlist(int, int);
00048 
00049  public:
00050   int me;                           // my proc ID
00051   int nswap;                        // # of swaps to perform
00052   int *pbc_any;                     // whether any PBC on this swap
00053   int *pbc_flagx;                   // PBC correction in x for this swap
00054   int *pbc_flagy;                   // same in y
00055   int *pbc_flagz;                   // same in z
00056   int *sendnum,*recvnum;            // # of atoms to send/recv in each swap
00057   int *comm_send_size;              // # of values to send in each comm
00058   int *comm_recv_size;              // # of values to recv in each comm
00059   int *reverse_send_size;           // # of values to send in each reverse
00060   int *reverse_recv_size;           // # of values to recv in each reverse
00061   int *sendproc,*recvproc;          // proc to send/recv with at each swap
00062 
00063   int *firstrecv;                   // where to put 1st recv atom in each swap
00064   int **sendlist;                   // list of atoms to send in each swap
00065   int *maxsendlist;
00066 
00067   double *buf_send;                 // send buffer for all comm
00068   double *buf_recv;                 // recv buffer for all comm
00069   int maxsend;
00070   int maxrecv;
00071 
00072   int procneigh[3][2];           // my 6 proc neighbors
00073   int procgrid[3];                  // # of procs in each dim
00074   int need[3];                      // how many procs away needed in each dim
00075   double *slablo,*slabhi;           // bounds of slabs to send to other procs
00076 };
00077 
00078 #endif

Generated on Fri Oct 22 2010 11:02:23 for SST by  doxygen 1.7.1