1 /* ---------------------------------------------------------------------- 2 SPARTA - Stochastic PArallel Rarefied-gas Time-accurate Analyzer 3 http://sparta.sandia.gov 4 Steve Plimpton, sjplimp@sandia.gov, Michael Gallis, magalli@sandia.gov 5 Sandia National Laboratories 6 7 Copyright (2014) Sandia Corporation. Under the terms of Contract 8 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 9 certain rights in this software. This software is distributed under 10 the GNU General Public License. 11 12 See the README file in the top-level SPARTA directory. 13 ------------------------------------------------------------------------- */ 14 15 #ifdef COMPUTE_CLASS 16 17 ComputeStyle(react/surf,ComputeReactSurf) 18 19 #else 20 21 #ifndef SPARTA_COMPUTE_REACT_SURF_H 22 #define SPARTA_COMPUTE_REACT_SURF_H 23 24 #include "compute.h" 25 #include "surf.h" 26 #include "hash3.h" 27 28 namespace SPARTA_NS { 29 30 class ComputeReactSurf : public Compute { 31 public: 32 ComputeReactSurf(class SPARTA *, int, char **); 33 ~ComputeReactSurf(); 34 virtual void init(); 35 void compute_per_surf(); 36 virtual void clear(); 37 virtual void surf_tally(int, int, int, Particle::OnePart *, 38 Particle::OnePart *, Particle::OnePart *); 39 virtual int tallyinfo(surfint *&); 40 virtual void post_process_surf(); 41 bigint memory_usage(); 42 43 protected: 44 int groupbit; 45 int isr; // index of surface reaction model 46 int ntotal,rpflag; 47 int maxsurf,combined; 48 49 int **reaction2col; // 1 if ireaction triggers tally for icol 50 51 int ntally; // # of surfs I have tallied for 52 int maxtally; // # of tallies currently allocated 53 surfint *tally2surf; // tally2surf[I] = surf ID of Ith tally 54 55 // hash for surf IDs 56 57 #ifdef SPARTA_MAP 58 typedef std::map<surfint,int> MyHash; 59 #elif defined SPARTA_UNORDERED_MAP 60 typedef std::unordered_map<surfint,int> MyHash; 61 #else 62 typedef std::tr1::unordered_map<surfint,int> MyHash; 63 #endif 64 65 MyHash *hash; 66 67 int dim; // local copies 68 Surf::Line *lines; 69 Surf::Tri *tris; 70 71 void grow_tally(); 72 }; 73 74 } 75 76 #endif 77 #endif 78 79 /* ERROR/WARNING messages: 80 81 E: Illegal ... command 82 83 Self-explanatory. Check the input script syntax and compare to the 84 documentation for the command. You can use -echo screen as a 85 command-line option when running SPARTA to see the offending line. 86 87 */ 88