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
MomentumNSOGradElemSuppAlg.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 MomentumNSOGradElemSuppAlg_h
10 #define MomentumNSOGradElemSuppAlg_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  VectorFieldType *velocity,
31  GenericFieldType *Gju,
32  const double fourthFac);
33 
35 
36  virtual void setup();
37 
38  virtual void elem_resize(
39  MasterElement *meSCS,
40  MasterElement *meSCV);
41 
42  virtual void elem_execute(
43  double *lhs,
44  double *rhs,
45  stk::mesh::Entity element,
46  MasterElement *meSCS,
47  MasterElement *meSCV);
48 
49  const stk::mesh::BulkData *bulkData_;
50 
58 
59  const int nDim_;
60  const double Cupw_;
61  const double small_;
62  const double fourthFac_;
63  const bool useShiftedGradOp_;
64 
65  // fixed space
66  std::vector<double> ws_dukdxScs_;
67  std::vector<double> ws_rhoVrtmScs_;
68  std::vector<double> ws_dpdxScs_;
69  std::vector<double> ws_GjpScs_;
70 
71  // scratch space; geometry
72  std::vector<double> ws_scs_areav_;
73  std::vector<double> ws_dndx_;
74  std::vector<double> ws_deriv_;
75  std::vector<double> ws_det_j_;
76  std::vector<double> ws_shape_function_;
77  std::vector<double> ws_gUpper_;
78  std::vector<double> ws_gLower_;
79 
80  // scratch space; fields
81  std::vector<double> ws_uNp1_;
82  std::vector<double> ws_rhoNp1_;
83  std::vector<double> ws_pressure_;
84  std::vector<double> ws_Gjp_;
85  std::vector<double> ws_velocityRTM_;
86  std::vector<double> ws_coordinates_;
87  std::vector<double> ws_Gju_;
88 };
89 
90 } // namespace nalu
91 } // namespace Sierra
92 
93 #endif
std::vector< double > ws_Gjp_
Definition: MomentumNSOGradElemSuppAlg.h:84
GenericFieldType * Gju_
Definition: MomentumNSOGradElemSuppAlg.h:57
std::vector< double > ws_Gju_
Definition: MomentumNSOGradElemSuppAlg.h:87
std::vector< double > ws_dukdxScs_
Definition: MomentumNSOGradElemSuppAlg.h:66
VectorFieldType * velocityNp1_
Definition: MomentumNSOGradElemSuppAlg.h:51
const bool useShiftedGradOp_
Definition: MomentumNSOGradElemSuppAlg.h:63
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
std::vector< double > ws_shape_function_
Definition: MomentumNSOGradElemSuppAlg.h:76
stk::mesh::Field< double, stk::mesh::SimpleArrayTag > GenericFieldType
Definition: FieldTypeDef.h:27
VectorFieldType * Gjp_
Definition: MomentumNSOGradElemSuppAlg.h:54
std::vector< double > ws_GjpScs_
Definition: MomentumNSOGradElemSuppAlg.h:69
VectorFieldType * velocityRTM_
Definition: MomentumNSOGradElemSuppAlg.h:55
VectorFieldType * coordinates_
Definition: MomentumNSOGradElemSuppAlg.h:56
std::vector< double > ws_rhoNp1_
Definition: MomentumNSOGradElemSuppAlg.h:82
std::vector< double > ws_pressure_
Definition: MomentumNSOGradElemSuppAlg.h:83
ScalarFieldType * densityNp1_
Definition: MomentumNSOGradElemSuppAlg.h:52
virtual ~MomentumNSOGradElemSuppAlg()
Definition: MomentumNSOGradElemSuppAlg.h:34
std::vector< double > ws_dndx_
Definition: MomentumNSOGradElemSuppAlg.h:73
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: MomentumNSOGradElemSuppAlg.C:121
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
ScalarFieldType * pressure_
Definition: MomentumNSOGradElemSuppAlg.h:53
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > ws_gUpper_
Definition: MomentumNSOGradElemSuppAlg.h:77
virtual void setup()
Definition: MomentumNSOGradElemSuppAlg.C:112
const double Cupw_
Definition: MomentumNSOGradElemSuppAlg.h:60
std::vector< double > ws_gLower_
Definition: MomentumNSOGradElemSuppAlg.h:78
std::vector< double > ws_rhoVrtmScs_
Definition: MomentumNSOGradElemSuppAlg.h:67
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
std::vector< double > ws_dpdxScs_
Definition: MomentumNSOGradElemSuppAlg.h:68
std::vector< double > ws_det_j_
Definition: MomentumNSOGradElemSuppAlg.h:75
std::vector< double > ws_deriv_
Definition: MomentumNSOGradElemSuppAlg.h:74
std::vector< double > ws_coordinates_
Definition: MomentumNSOGradElemSuppAlg.h:86
const double small_
Definition: MomentumNSOGradElemSuppAlg.h:61
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: MomentumNSOGradElemSuppAlg.C:79
const double fourthFac_
Definition: MomentumNSOGradElemSuppAlg.h:62
Definition: UnitTestMasterElements.C:367
std::vector< double > ws_uNp1_
Definition: MomentumNSOGradElemSuppAlg.h:81
const stk::mesh::BulkData * bulkData_
Definition: MomentumNSOGradElemSuppAlg.h:49
std::vector< double > ws_velocityRTM_
Definition: MomentumNSOGradElemSuppAlg.h:85
Definition: MomentumNSOGradElemSuppAlg.h:24
const int nDim_
Definition: MomentumNSOGradElemSuppAlg.h:59
Definition: Realm.h:82
Definition: SupplementalAlgorithm.h:24
std::vector< double > ws_scs_areav_
Definition: MomentumNSOGradElemSuppAlg.h:72
MomentumNSOGradElemSuppAlg(Realm &realm, VectorFieldType *velocity, GenericFieldType *Gju, const double fourthFac)
Definition: MomentumNSOGradElemSuppAlg.C:32