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
MomentumNSOSijElemKernel.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 MOMENTUMNSOSIJELEMKERNEL_H
9 #define MOMENTUMNSOSIJELEMKERNEL_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&,
38 
40 
41  virtual void execute(
45 
46 private:
47  MomentumNSOSijElemKernel() = delete;
48 
54  VectorFieldType *Gjp_{nullptr};
55 
56  // master element
57  const int *lrscv_;
58 
59  const double Cupw_{0.1};
60  const double small_{1.0e-16};
61  const double includeDivU_;
62  const bool shiftedGradOp_;
63 
64  // fixed scratch space
65  Kokkos::View<DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_{"v_shape_function"};
66 };
67 
68 } // nalu
69 } // sierra
70 
71 #endif /* MOMENTUMNSOSIJELEMKERNEL_H */
Definition: ABLForcingAlgorithm.C:26
const int * lrscv_
Definition: MomentumNSOSijElemKernel.h:57
VectorFieldType * velocityNp1_
Definition: MomentumNSOSijElemKernel.h:49
Definition: ElemDataRequests.h:66
const double includeDivU_
Definition: MomentumNSOSijElemKernel.h:61
Definition: SolutionOptions.h:38
NSO for momentum equation.
Definition: MomentumNSOSijElemKernel.h:30
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
VectorFieldType * velocityRTM_
Definition: MomentumNSOSijElemKernel.h:52
ScalarFieldType * pressure_
Definition: MomentumNSOSijElemKernel.h:51
const double small_
Definition: MomentumNSOSijElemKernel.h:60
Kokkos::View< DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Definition: MomentumNSOSijElemKernel.h:65
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
VectorFieldType * Gjp_
Definition: MomentumNSOSijElemKernel.h:54
const double Cupw_
Definition: MomentumNSOSijElemKernel.h:59
VectorFieldType * coordinates_
Definition: MomentumNSOSijElemKernel.h:53
Definition: UnitTestMasterElements.C:367
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
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: MomentumNSOSijElemKernel.C:86
ScalarFieldType * densityNp1_
Definition: MomentumNSOSijElemKernel.h:50
Definition: ScratchViews.h:82
const bool shiftedGradOp_
Definition: MomentumNSOSijElemKernel.h:62
virtual ~MomentumNSOSijElemKernel()
Definition: MomentumNSOSijElemKernel.h:39