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
ScalarMassElemSuppAlgDep.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 ScalarMassElemSuppAlgDep_h
10 #define ScalarMassElemSuppAlgDep_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  const bool lumpedMass);
32 
34 
35  virtual void setup();
36 
37  virtual void elem_resize(
38  MasterElement *meSCS,
39  MasterElement *meSCV);
40 
41  virtual void elem_execute(
42  double *lhs,
43  double *rhs,
44  stk::mesh::Entity element,
45  MasterElement *meSCS,
46  MasterElement *meSCV);
47 
48  const stk::mesh::BulkData *bulkData_;
49 
57 
58  double dt_;
59  double gamma1_;
60  double gamma2_;
61  double gamma3_;
62  const int nDim_;
63  const bool lumpedMass_;
64 
65  // scratch space
66  std::vector<double> ws_shape_function_;
67  std::vector<double> ws_qNm1_;
68  std::vector<double> ws_qN_;
69  std::vector<double> ws_qNp1_;
70  std::vector<double> ws_rhoNm1_;
71  std::vector<double> ws_rhoN_;
72  std::vector<double> ws_rhoNp1_;
73  std::vector<double> ws_coordinates_;
74  std::vector<double> ws_scv_volume_;
75 };
76 
77 } // namespace nalu
78 } // namespace Sierra
79 
80 #endif
Definition: ABLForcingAlgorithm.C:26
Definition: MasterElement.h:53
VectorFieldType * coordinates_
Definition: ScalarMassElemSuppAlgDep.h:56
ScalarFieldType * scalarQN_
Definition: ScalarMassElemSuppAlgDep.h:51
double gamma3_
Definition: ScalarMassElemSuppAlgDep.h:61
double gamma2_
Definition: ScalarMassElemSuppAlgDep.h:60
std::vector< double > ws_rhoNp1_
Definition: ScalarMassElemSuppAlgDep.h:72
const bool lumpedMass_
Definition: ScalarMassElemSuppAlgDep.h:63
ScalarFieldType * scalarQNp1_
Definition: ScalarMassElemSuppAlgDep.h:52
const int nDim_
Definition: ScalarMassElemSuppAlgDep.h:62
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
std::vector< double > ws_qNp1_
Definition: ScalarMassElemSuppAlgDep.h:69
std::vector< double > ws_rhoN_
Definition: ScalarMassElemSuppAlgDep.h:71
virtual void elem_resize(MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarMassElemSuppAlgDep.C:68
Definition: ScalarMassElemSuppAlgDep.h:24
double gamma1_
Definition: ScalarMassElemSuppAlgDep.h:59
ScalarFieldType * densityN_
Definition: ScalarMassElemSuppAlgDep.h:54
ScalarFieldType * densityNp1_
Definition: ScalarMassElemSuppAlgDep.h:55
std::vector< double > ws_rhoNm1_
Definition: ScalarMassElemSuppAlgDep.h:70
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
std::vector< double > ws_scv_volume_
Definition: ScalarMassElemSuppAlgDep.h:74
double dt_
Definition: ScalarMassElemSuppAlgDep.h:58
virtual void setup()
Definition: ScalarMassElemSuppAlgDep.C:97
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
virtual ~ScalarMassElemSuppAlgDep()
Definition: ScalarMassElemSuppAlgDep.h:33
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
Definition: UnitTestMasterElements.C:367
std::vector< double > ws_shape_function_
Definition: ScalarMassElemSuppAlgDep.h:66
std::vector< double > ws_coordinates_
Definition: ScalarMassElemSuppAlgDep.h:73
virtual void elem_execute(double *lhs, double *rhs, stk::mesh::Entity element, MasterElement *meSCS, MasterElement *meSCV)
Definition: ScalarMassElemSuppAlgDep.C:109
std::vector< double > ws_qN_
Definition: ScalarMassElemSuppAlgDep.h:68
std::vector< double > ws_qNm1_
Definition: ScalarMassElemSuppAlgDep.h:67
Definition: Realm.h:82
ScalarFieldType * scalarQNm1_
Definition: ScalarMassElemSuppAlgDep.h:50
Definition: SupplementalAlgorithm.h:24
const stk::mesh::BulkData * bulkData_
Definition: ScalarMassElemSuppAlgDep.h:48
ScalarFieldType * densityNm1_
Definition: ScalarMassElemSuppAlgDep.h:53
ScalarMassElemSuppAlgDep(Realm &realm, ScalarFieldType *scalarQ, const bool lumpedMass)
Definition: ScalarMassElemSuppAlgDep.C:32