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
ScalarNSOKeElemSuppAlg.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 ScalarNSOKeElemSuppAlg_h
10 #define ScalarNSOKeElemSuppAlg_h
11 
12 #include <SupplementalAlgorithm.h>
13 #include <FieldTypeDef.h>
14 
15 #include <stk_mesh/base/BulkData.hpp>
16 #include <stk_mesh/base/Entity.hpp>
17 
18 namespace sierra{
19 namespace nalu{
20 
21 class Realm;
22 class MasterElement;
23 
25 {
26 public:
27 
29  Realm &realm,
30  ScalarFieldType *scalarQ,
31  VectorFieldType *Gjq,
32  const double turbCoeff,
33  const double fourthFac);
34 
36 
37  virtual void setup();
38 
39  virtual void elem_resize(
40  MasterElement *meSCS,
41  MasterElement *meSCV);
42 
43  virtual void elem_execute(
44  double *lhs,
45  double *rhs,
46  stk::mesh::Entity element,
47  MasterElement *meSCS,
48  MasterElement *meSCV);
49 
50  const stk::mesh::BulkData *bulkData_;
51 
60 
61  const int nDim_;
62  const double Cupw_;
63  const double small_;
64  const double turbCoeff_; // turbulent Schmidt/Prandtl number
65  const double fourthFac_;
66  const bool useShiftedGradOp_;
67 
68  // fixed space
69  std::vector<double> ws_rhoVrtmScs_;
70  std::vector<double> ws_uNp1Scs_;
71  std::vector<double> ws_dpdxScs_;
72  std::vector<double> ws_GjpScs_;
73  std::vector<double> ws_dkedxScs_;
74 
75  // scratch space; geometry
76  std::vector<double> ws_scs_areav_;
77  std::vector<double> ws_dndx_;
78  std::vector<double> ws_deriv_;
79  std::vector<double> ws_det_j_;
80  std::vector<double> ws_shape_function_;
81  std::vector<double> ws_gUpper_;
82  std::vector<double> ws_gLower_;
83 
84  // scratch space; fields
85  std::vector<double> ws_qNp1_;
86  std::vector<double> ws_densityNp1_;
87  std::vector<double> ws_pressure_;
88  std::vector<double> ws_velocityNp1_;
89  std::vector<double> ws_velocityRTM_;
90  std::vector<double> ws_Gjq_;
91  std::vector<double> ws_Gjp_;
92  std::vector<double> ws_ke_;
93  std::vector<double> ws_coordinates_;
94 };
95 
96 } // namespace nalu
97 } // namespace Sierra
98 
99 #endif
std::vector< double > ws_det_j_
Definition: ScalarNSOKeElemSuppAlg.h:79
std::vector< double > ws_gLower_
Definition: ScalarNSOKeElemSuppAlg.h:82
VectorFieldType * Gjp_
Definition: ScalarNSOKeElemSuppAlg.h:58
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarNSOKeElemSuppAlg.C:84
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
std::vector< double > ws_Gjp_
Definition: ScalarNSOKeElemSuppAlg.h:91
ScalarFieldType * densityNp1_
Definition: ScalarNSOKeElemSuppAlg.h:53
std::vector< double > ws_pressure_
Definition: ScalarNSOKeElemSuppAlg.h:87
std::vector< double > ws_deriv_
Definition: ScalarNSOKeElemSuppAlg.h:78
const double turbCoeff_
Definition: ScalarNSOKeElemSuppAlg.h:64
std::vector< double > ws_rhoVrtmScs_
Definition: ScalarNSOKeElemSuppAlg.h:69
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
std::vector< double > ws_velocityNp1_
Definition: ScalarNSOKeElemSuppAlg.h:88
VectorFieldType * velocityRTM_
Definition: ScalarNSOKeElemSuppAlg.h:56
VectorFieldType * coordinates_
Definition: ScalarNSOKeElemSuppAlg.h:59
std::vector< double > ws_dpdxScs_
Definition: ScalarNSOKeElemSuppAlg.h:71
const int nDim_
Definition: ScalarNSOKeElemSuppAlg.h:61
const stk::mesh::BulkData * bulkData_
Definition: ScalarNSOKeElemSuppAlg.h:50
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > ws_dndx_
Definition: ScalarNSOKeElemSuppAlg.h:77
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
std::vector< double > ws_coordinates_
Definition: ScalarNSOKeElemSuppAlg.h:93
const double small_
Definition: ScalarNSOKeElemSuppAlg.h:63
ScalarFieldType * scalarQNp1_
Definition: ScalarNSOKeElemSuppAlg.h:52
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
Definition: ScalarNSOKeElemSuppAlg.h:24
std::vector< double > ws_velocityRTM_
Definition: ScalarNSOKeElemSuppAlg.h:89
std::vector< double > ws_Gjq_
Definition: ScalarNSOKeElemSuppAlg.h:90
VectorFieldType * Gjq_
Definition: ScalarNSOKeElemSuppAlg.h:57
std::vector< double > ws_dkedxScs_
Definition: ScalarNSOKeElemSuppAlg.h:73
ScalarNSOKeElemSuppAlg(Realm &realm, ScalarFieldType *scalarQ, VectorFieldType *Gjq, const double turbCoeff, const double fourthFac)
Definition: ScalarNSOKeElemSuppAlg.C:32
std::vector< double > ws_gUpper_
Definition: ScalarNSOKeElemSuppAlg.h:81
Definition: UnitTestMasterElements.C:367
std::vector< double > ws_scs_areav_
Definition: ScalarNSOKeElemSuppAlg.h:76
std::vector< double > ws_densityNp1_
Definition: ScalarNSOKeElemSuppAlg.h:86
std::vector< double > ws_uNp1Scs_
Definition: ScalarNSOKeElemSuppAlg.h:70
const bool useShiftedGradOp_
Definition: ScalarNSOKeElemSuppAlg.h:66
std::vector< double > ws_qNp1_
Definition: ScalarNSOKeElemSuppAlg.h:85
ScalarFieldType * pressure_
Definition: ScalarNSOKeElemSuppAlg.h:54
VectorFieldType * velocityNp1_
Definition: ScalarNSOKeElemSuppAlg.h:55
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarNSOKeElemSuppAlg.C:128
const double fourthFac_
Definition: ScalarNSOKeElemSuppAlg.h:65
std::vector< double > ws_GjpScs_
Definition: ScalarNSOKeElemSuppAlg.h:72
const double Cupw_
Definition: ScalarNSOKeElemSuppAlg.h:62
std::vector< double > ws_ke_
Definition: ScalarNSOKeElemSuppAlg.h:92
Definition: Realm.h:82
virtual ~ScalarNSOKeElemSuppAlg()
Definition: ScalarNSOKeElemSuppAlg.h:35
std::vector< double > ws_shape_function_
Definition: ScalarNSOKeElemSuppAlg.h:80
Definition: SupplementalAlgorithm.h:24
virtual void setup()
Definition: ScalarNSOKeElemSuppAlg.C:119