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
FixPressureAtNodeInfo.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 National Renewable Energy Laboratory. */
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 #ifndef FIXPRESSUREATNODEINFO_H
9 #define FIXPRESSUREATNODEINFO_H
10 
11 #include "stk_mesh/base/MetaData.hpp"
12 #include "stk_search/SearchMethod.hpp"
13 
14 #include <vector>
15 #include <string>
16 
17 namespace sierra {
18 namespace nalu {
19 
29 {
36  };
37 
38  void create_part_vector(const stk::mesh::MetaData& meta)
39  {
40  auto nParts = searchParts_.size();
41  for (size_t i=0; i < nParts; i++) {
42  stk::mesh::Part* part = meta.get_part(searchParts_[i]);
43  if (nullptr != part)
44  partVec_.push_back(part);
45  else
46  throw std::runtime_error("FixPressureAtNodeInfo: Target search part is null "
47  + searchParts_[i]);
48  }
49  }
50 
52  double refPressure_{0.0};
53 
55  std::vector<double> location_{0.0, 0.0, 0.0};
56 
57  std::vector<std::string> searchParts_;
58 
60 
62  stk::search::SearchMethod searchMethod_{stk::search::KDTREE};
63 
65 
66  stk::mesh::EntityId stkNodeId_;
67 };
68 
69 } // nalu
70 } // sierra
71 
72 #endif /* FIXPRESSUREATNODEINFO_H */
std::vector< Part * > PartVector
Definition: Algorithm.h:16
stk::search::SearchMethod searchMethod_
Search method for determining the nearest node to the prescribed location.
Definition: FixPressureAtNodeInfo.h:62
Definition: ABLForcingAlgorithm.C:26
NodeLookupType
Options for specifying the node where pressure is fixed.
Definition: FixPressureAtNodeInfo.h:33
Input data for fixing pressure during ABL simulations.
Definition: FixPressureAtNodeInfo.h:28
void create_part_vector(const stk::mesh::MetaData &meta)
Definition: FixPressureAtNodeInfo.h:38
stk::mesh::PartVector partVec_
Definition: FixPressureAtNodeInfo.h:59
std::vector< double > location_
Location for ABL reference pressure.
Definition: FixPressureAtNodeInfo.h:55
Spatial location used to search nearest node.
Definition: FixPressureAtNodeInfo.h:35
double refPressure_
Reference pressure for ABL simulations.
Definition: FixPressureAtNodeInfo.h:52
NodeLookupType lookupType_
Definition: FixPressureAtNodeInfo.h:64
stk::mesh::EntityId stkNodeId_
Definition: FixPressureAtNodeInfo.h:66
STK Global Node ID provided in input file.
Definition: FixPressureAtNodeInfo.h:34
std::vector< std::string > searchParts_
Definition: FixPressureAtNodeInfo.h:57