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(eflux/grid,ComputeEFluxGrid)
18 
19 #else
20 
21 #ifndef SPARTA_COMPUTE_EFLUX_GRID_H
22 #define SPARTA_COMPUTE_EFLUX_GRID_H
23 
24 #include "compute.h"
25 
26 namespace SPARTA_NS {
27 
28 class ComputeEFluxGrid : public Compute {
29  public:
30   ComputeEFluxGrid(class SPARTA *, int, char **);
31   ~ComputeEFluxGrid();
32   void init();
33   void compute_per_grid();
34   int query_tally_grid(int, double **&, int *&);
35   void post_process_grid(int, int, double **, int *, double *, int);
36   void reallocate();
37   bigint memory_usage();
38 
39  protected:
40   int groupbit,imix,nvalue,ngroup;
41 
42   int *value;                // keyword for each user requested value
43   int *unique;               // unique keywords for tally, len = npergroup
44   int npergroup;             // # of unique tally quantities per group
45   int ntotal;                // total # of columns in tally array
46   int nglocal;               // # of owned grid cells
47 
48   int *nmap;                 // # of tally quantities each user value uses
49   int **map;                 // which tally columns each output value uses
50   double **tally;            // array of tally quantities, cells by ntotal
51 
52   void set_map(int, int);
53   void reset_map();
54 };
55 
56 }
57 
58 #endif
59 #endif
60 
61 /* ERROR/WARNING messages:
62 
63 E: Illegal ... command
64 
65 Self-explanatory.  Check the input script syntax and compare to the
66 documentation for the command.  You can use -echo screen as a
67 command-line option when running SPARTA to see the offending line.
68 
69 E: Compute grid mixture ID does not exist
70 
71 Self-explanatory.
72 
73 E: Number of groups in compute grid mixture has changed
74 
75 This mixture property cannot be changed after this compute command is
76 issued.
77 
78 E: Invalid call to ComputeGrid::post_process_grid()
79 
80 This indicates a coding error.  Please report the issue to the SPARTA
81 developers.
82 
83 */
84