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
MomentumNSOElemKernel.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 MOMENTUMNSOELEMKERNEL_H
9 #define MOMENTUMNSOELEMKERNEL_H
10 
11 #include "Kernel.h"
12 #include "FieldTypeDef.h"
13 
14 #include <stk_mesh/base/BulkData.hpp>
15 #include <stk_mesh/base/Entity.hpp>
16 
17 #include <Kokkos_Core.hpp>
18 
19 namespace sierra {
20 namespace nalu {
21 
22 class SolutionOptions;
23 class MasterElement;
24 class ElemDataRequests;
25 
29 template<typename AlgTraits>
31 {
32 public:
34  const stk::mesh::BulkData&,
35  const SolutionOptions&,
39  const double,
40  const double,
42 
44 
45  virtual void setup(const TimeIntegrator&);
46 
47  virtual void execute(
51 
52 private:
53  MomentumNSOElemKernel() = delete;
54 
66 
67  const int *lrscv_;
68 
69  double dt_{0.0};
70  double gamma1_{0.0};
71  double gamma2_{0.0};
72  double gamma3_{0.0};
73  const double Cupw_{0.1};
74  const double fourthFac_;
75  const double altResFac_;
76  const double om_altResFac_;
77  const double nonConservedForm_{0.0};
78  const double includeDivU_;
79  const bool shiftedGradOp_;
80  const double small_{1.0e-16};
81 
82  // fixed scratch space
83  Kokkos::View<DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_{"v_shape_function"};
84  Kokkos::View<DoubleType[AlgTraits::nDim_][AlgTraits::nDim_]> v_kd_{"v_kd"};
85 };
86 
87 } // nalu
88 } // sierra
89 
90 #endif /* MOMENTUMNSOELEMKERNEL_H */
NSO for momentum equation.
Definition: MomentumNSOElemKernel.h:30
Definition: TimeIntegrator.h:26
Definition: ABLForcingAlgorithm.C:26
double dt_
Definition: MomentumNSOElemKernel.h:69
VectorFieldType * velocityN_
Definition: MomentumNSOElemKernel.h:56
double gamma2_
Definition: MomentumNSOElemKernel.h:71
stk::mesh::Field< double, stk::mesh::SimpleArrayTag > GenericFieldType
Definition: FieldTypeDef.h:27
ScalarFieldType * pressure_
Definition: MomentumNSOElemKernel.h:61
virtual void setup(const TimeIntegrator &)
Perform pre-timestep work for the computational kernel.
Definition: MomentumNSOElemKernel.C:116
const double includeDivU_
Definition: MomentumNSOElemKernel.h:78
Definition: ElemDataRequests.h:66
const bool shiftedGradOp_
Definition: MomentumNSOElemKernel.h:79
VectorFieldType * velocityNp1_
Definition: MomentumNSOElemKernel.h:57
Definition: SolutionOptions.h:38
double gamma3_
Definition: MomentumNSOElemKernel.h:72
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
const double nonConservedForm_
Definition: MomentumNSOElemKernel.h:77
ScalarFieldType * viscosity_
Definition: MomentumNSOElemKernel.h:64
const double small_
Definition: MomentumNSOElemKernel.h:80
Kokkos::View< DoubleType[AlgTraits::nDim_][AlgTraits::nDim_]> v_kd_
Definition: MomentumNSOElemKernel.h:84
VectorFieldType * coordinates_
Definition: MomentumNSOElemKernel.h:63
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
ScalarFieldType * densityNp1_
Definition: MomentumNSOElemKernel.h:60
const double altResFac_
Definition: MomentumNSOElemKernel.h:75
virtual ~MomentumNSOElemKernel()
Definition: MomentumNSOElemKernel.h:43
const int * lrscv_
Definition: MomentumNSOElemKernel.h:67
const double fourthFac_
Definition: MomentumNSOElemKernel.h:74
Definition: UnitTestMasterElements.C:367
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
virtual void execute(SharedMemView< DoubleType ** > &, SharedMemView< DoubleType * > &, ScratchViews< DoubleType > &)
Execute the kernel within a Kokkos loop and populate the LHS and RHS for the linear solve...
Definition: MomentumNSOElemKernel.C:126
ScalarFieldType * densityN_
Definition: MomentumNSOElemKernel.h:59
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
ScalarFieldType * densityNm1_
Definition: MomentumNSOElemKernel.h:58
double gamma1_
Definition: MomentumNSOElemKernel.h:70
VectorFieldType * velocityNm1_
Definition: MomentumNSOElemKernel.h:55
Kokkos::View< DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Definition: MomentumNSOElemKernel.h:83
const double om_altResFac_
Definition: MomentumNSOElemKernel.h:76
Definition: ScratchViews.h:82
GenericFieldType * Gju_
Definition: MomentumNSOElemKernel.h:65
VectorFieldType * velocityRTM_
Definition: MomentumNSOElemKernel.h:62
const double Cupw_
Definition: MomentumNSOElemKernel.h:73