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
ScalarNSOElemSuppAlgDep.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 ScalarNSOElemSuppAlgDep_h
10 #define ScalarNSOElemSuppAlgDep_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  ScalarFieldType *diffFluxCoeff,
33  const double fourthFac,
34  const double altResFac);
35 
37 
38  virtual void setup();
39 
40  virtual void elem_resize(
41  MasterElement *meSCS,
42  MasterElement *meSCV);
43 
44  virtual void elem_execute(
45  double *lhs,
46  double *rhs,
47  stk::mesh::Entity element,
48  MasterElement *meSCS,
49  MasterElement *meSCV);
50 
51  const stk::mesh::BulkData *bulkData_;
52 
63 
64  double dt_;
65  const int nDim_;
66  double gamma1_;
67  double gamma2_;
68  double gamma3_;
69  const double Cupw_;
70  const double small_;
71  const double fourthFac_;
72  const double altResFac_;
73  const double om_altResFac_;
74  const double nonConservedForm_;
75  const bool useShiftedGradOp_;
76 
77  // fixed space
78  std::vector<double> ws_dqdxScs_;
79  std::vector<double> ws_rhoVrtmScs_;
80 
81  // scratch space; geometry
82  std::vector<double> ws_scs_areav_;
83  std::vector<double> ws_dndx_;
84  std::vector<double> ws_deriv_;
85  std::vector<double> ws_det_j_;
86  std::vector<double> ws_shape_function_;
87  std::vector<double> ws_gUpper_;
88  std::vector<double> ws_gLower_;
89 
90  // scratch space; fields
91  std::vector<double> ws_qNm1_;
92  std::vector<double> ws_qN_;
93  std::vector<double> ws_qNp1_;
94  std::vector<double> ws_rhoNm1_;
95  std::vector<double> ws_rhoN_;
96  std::vector<double> ws_rhoNp1_;
97  std::vector<double> ws_velocityRTM_;
98  std::vector<double> ws_diffFluxCoeff_;
99  std::vector<double> ws_Gjq_;
100  std::vector<double> ws_coordinates_;
101 };
102 
103 } // namespace nalu
104 } // namespace Sierra
105 
106 #endif
std::vector< double > ws_Gjq_
Definition: ScalarNSOElemSuppAlgDep.h:99
const double nonConservedForm_
Definition: ScalarNSOElemSuppAlgDep.h:74
ScalarFieldType * scalarQNp1_
Definition: ScalarNSOElemSuppAlgDep.h:55
ScalarFieldType * densityNp1_
Definition: ScalarNSOElemSuppAlgDep.h:58
std::vector< double > ws_shape_function_
Definition: ScalarNSOElemSuppAlgDep.h:86
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
std::vector< double > ws_qNm1_
Definition: ScalarNSOElemSuppAlgDep.h:91
const double small_
Definition: ScalarNSOElemSuppAlgDep.h:70
ScalarFieldType * scalarQN_
Definition: ScalarNSOElemSuppAlgDep.h:54
VectorFieldType * velocityRTM_
Definition: ScalarNSOElemSuppAlgDep.h:60
ScalarFieldType * diffFluxCoeff_
Definition: ScalarNSOElemSuppAlgDep.h:59
const double fourthFac_
Definition: ScalarNSOElemSuppAlgDep.h:71
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
std::vector< double > ws_gUpper_
Definition: ScalarNSOElemSuppAlgDep.h:87
std::vector< double > ws_scs_areav_
Definition: ScalarNSOElemSuppAlgDep.h:82
std::vector< double > ws_qN_
Definition: ScalarNSOElemSuppAlgDep.h:92
virtual void setup()
Definition: ScalarNSOElemSuppAlgDep.C:127
VectorFieldType * Gjq_
Definition: ScalarNSOElemSuppAlgDep.h:61
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
double dt_
Definition: ScalarNSOElemSuppAlgDep.h:64
std::vector< double > ws_rhoNp1_
Definition: ScalarNSOElemSuppAlgDep.h:96
ScalarFieldType * densityNm1_
Definition: ScalarNSOElemSuppAlgDep.h:56
std::vector< double > ws_diffFluxCoeff_
Definition: ScalarNSOElemSuppAlgDep.h:98
double gamma1_
Definition: ScalarNSOElemSuppAlgDep.h:66
ScalarNSOElemSuppAlgDep(Realm &realm, ScalarFieldType *scalarQ, VectorFieldType *Gjq, ScalarFieldType *diffFluxCoeff, const double fourthFac, const double altResFac)
Definition: ScalarNSOElemSuppAlgDep.C:32
Definition: ScalarNSOElemSuppAlgDep.h:24
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
const bool useShiftedGradOp_
Definition: ScalarNSOElemSuppAlgDep.h:75
VectorFieldType * coordinates_
Definition: ScalarNSOElemSuppAlgDep.h:62
double gamma2_
Definition: ScalarNSOElemSuppAlgDep.h:67
std::vector< double > ws_rhoN_
Definition: ScalarNSOElemSuppAlgDep.h:95
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarNSOElemSuppAlgDep.C:91
ScalarFieldType * densityN_
Definition: ScalarNSOElemSuppAlgDep.h:57
const int nDim_
Definition: ScalarNSOElemSuppAlgDep.h:65
Definition: UnitTestMasterElements.C:367
std::vector< double > ws_rhoNm1_
Definition: ScalarNSOElemSuppAlgDep.h:94
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarNSOElemSuppAlgDep.C:139
double gamma3_
Definition: ScalarNSOElemSuppAlgDep.h:68
const double Cupw_
Definition: ScalarNSOElemSuppAlgDep.h:69
const double om_altResFac_
Definition: ScalarNSOElemSuppAlgDep.h:73
std::vector< double > ws_det_j_
Definition: ScalarNSOElemSuppAlgDep.h:85
virtual ~ScalarNSOElemSuppAlgDep()
Definition: ScalarNSOElemSuppAlgDep.h:36
std::vector< double > ws_velocityRTM_
Definition: ScalarNSOElemSuppAlgDep.h:97
ScalarFieldType * scalarQNm1_
Definition: ScalarNSOElemSuppAlgDep.h:53
std::vector< double > ws_gLower_
Definition: ScalarNSOElemSuppAlgDep.h:88
Definition: Realm.h:82
Definition: SupplementalAlgorithm.h:24
std::vector< double > ws_rhoVrtmScs_
Definition: ScalarNSOElemSuppAlgDep.h:79
std::vector< double > ws_coordinates_
Definition: ScalarNSOElemSuppAlgDep.h:100
std::vector< double > ws_dndx_
Definition: ScalarNSOElemSuppAlgDep.h:83
const stk::mesh::BulkData * bulkData_
Definition: ScalarNSOElemSuppAlgDep.h:51
std::vector< double > ws_deriv_
Definition: ScalarNSOElemSuppAlgDep.h:84
std::vector< double > ws_qNp1_
Definition: ScalarNSOElemSuppAlgDep.h:93
const double altResFac_
Definition: ScalarNSOElemSuppAlgDep.h:72
std::vector< double > ws_dqdxScs_
Definition: ScalarNSOElemSuppAlgDep.h:78