Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
DataProbePostProcessing.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
3 /* This software is released under the license detailed */
4 /* in the file, LICENSE, which is located in the top-level Nalu */
5 /* directory structure */
6 /*------------------------------------------------------------------------*/
7 
8 
9 #ifndef DataProbePostProcessing_h
10 #define DataProbePostProcessing_h
11 
12 #include <NaluParsing.h>
13 
14 #include <string>
15 #include <vector>
16 #include <utility>
17 
18 // stk_mesh/base/fem
19 #include <stk_mesh/base/Selector.hpp>
20 
21 // stk forwards
22 namespace stk {
23  namespace mesh {
24  class BulkData;
25  class FieldBase;
26  class MetaData;
27  class Part;
28  //class Selector; ? why is this?
29  struct Entity;
30  typedef std::vector< Part * > PartVector;
31  }
32 }
33 
34 namespace sierra{
35 namespace nalu{
36 
37 class Realm;
38 class Transfer;
39 class Transfers;
40 
42 public:
45 
46  // for each type of probe, e.g., line of site, hold some stuff
49  std::vector<std::string> partName_;
50  std::vector<int> processorId_;
51  std::vector<int> numPoints_;
52  std::vector<int> generateNewIds_;
53  std::vector<Coordinates> tipCoordinates_;
54  std::vector<Coordinates> tailCoordinates_;
55  std::vector<std::vector<stk::mesh::Entity> > nodeVector_;
56  std::vector<stk::mesh::Part *> part_;
57 };
58 
60 public:
63 
64  std::string xferName_;
65  std::vector<std::string> fromTargetNames_;
66 
67  // vector of averaging information
68  std::vector<DataProbeInfo *> dataProbeInfo_;
69 
70  // homegeneous collection of fields over each specification
71  std::vector<std::pair<std::string, std::string> > fromToName_;
72  std::vector<std::pair<std::string, int> > fieldInfo_;
73 };
74 
76 {
77 public:
78 
80  Realm &realm,
81  const YAML::Node &node);
83 
84  // load all of the options
85  void load(
86  const YAML::Node & node);
87 
88  // setup part creation and nodal field registration (before populate_mesh())
89  void setup();
90 
91  // setup part creation and nodal field registration (after populate_mesh())
92  void initialize();
93 
94  void register_field(
95  const std::string fieldName,
96  const int fieldSize,
97  stk::mesh::MetaData &metaData,
98  stk::mesh::Part *part);
99 
100  void review(
101  const DataProbeInfo *probeInfo);
102 
103  // we want these nodes to be excluded from anything of importance
104  void create_inactive_selector();
105 
106  // create the transfer and hold the vector in the DataProbePostProcessing class
107  void create_transfer();
108 
109  // populate nodal field and output norms (if appropriate)
110  void execute();
111 
112  // output to a file
113  void provide_output(const double currentTime);
114 
115  // provide the inactive selector
116  stk::mesh::Selector &get_inactive_selector();
117 
118  // hold the realm
120 
121  // frequency of output
123 
124  // width for output
125  int w_;
126 
127  // xfer specifications
128  std::string searchMethodName_;
131 
132  // vector of specifications
133  std::vector<DataProbeSpecInfo *> dataProbeSpecInfo_;
134 
135  // hold all the parts; provide a selector
137  stk::mesh::Selector inactiveSelector_;
138 
139  // hold the transfers
141 };
142 
143 } // namespace nalu
144 } // namespace Sierra
145 
146 #endif
int w_
Definition: DataProbePostProcessing.h:125
DataProbeInfo()
Definition: DataProbePostProcessing.h:43
std::vector< Part * > PartVector
Definition: Algorithm.h:16
std::vector< DataProbeInfo * > dataProbeInfo_
Definition: DataProbePostProcessing.h:68
~DataProbeInfo()
Definition: DataProbePostProcessing.h:44
std::string searchMethodName_
Definition: DataProbePostProcessing.h:128
std::vector< Coordinates > tailCoordinates_
Definition: DataProbePostProcessing.h:54
Definition: ABLForcingAlgorithm.C:26
Transfers * transfers_
Definition: DataProbePostProcessing.h:140
int outputFreq_
Definition: DataProbePostProcessing.h:122
std::vector< std::pair< std::string, int > > fieldInfo_
Definition: DataProbePostProcessing.h:72
void initialize(int N, aligned_vector &x, aligned_vector &y)
Definition: UnitTestSimdBasic.C:37
double searchExpansionFactor_
Definition: DataProbePostProcessing.h:130
double searchTolerance_
Definition: DataProbePostProcessing.h:129
std::vector< int > numPoints_
Definition: DataProbePostProcessing.h:51
std::vector< int > processorId_
Definition: DataProbePostProcessing.h:50
std::vector< Coordinates > tipCoordinates_
Definition: DataProbePostProcessing.h:53
Definition: Algorithm.h:14
std::string xferName_
Definition: DataProbePostProcessing.h:64
Definition: DataProbePostProcessing.h:41
std::vector< std::string > partName_
Definition: DataProbePostProcessing.h:49
std::vector< stk::mesh::Part * > part_
Definition: DataProbePostProcessing.h:56
stk::mesh::PartVector allTheParts_
Definition: DataProbePostProcessing.h:136
stk::mesh::Selector inactiveSelector_
Definition: DataProbePostProcessing.h:137
Realm & realm_
Definition: DataProbePostProcessing.h:119
std::vector< int > generateNewIds_
Definition: DataProbePostProcessing.h:52
std::vector< DataProbeSpecInfo * > dataProbeSpecInfo_
Definition: DataProbePostProcessing.h:133
std::vector< std::vector< stk::mesh::Entity > > nodeVector_
Definition: DataProbePostProcessing.h:55
bool isLineOfSite_
Definition: DataProbePostProcessing.h:47
std::vector< std::string > fromTargetNames_
Definition: DataProbePostProcessing.h:65
Definition: DataProbePostProcessing.h:59
Definition: DataProbePostProcessing.h:75
Tpetra::Map< LocalOrdinal, GlobalOrdinal >::node_type Node
Definition: LinearSolver.h:32
Definition: Transfers.h:31
Definition: Realm.h:82
int numProbes_
Definition: DataProbePostProcessing.h:48
std::vector< std::pair< std::string, std::string > > fromToName_
Definition: DataProbePostProcessing.h:71