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
MomentumBuoyancyBoussinesqSrcElemKernel.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 MOMENTUMBUOYANCYBOUSSINESQSRCELEMKERNEL_H
9 #define MOMENTUMBUOYANCYBOUSSINESQSRCELEMKERNEL_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 
28 template<typename AlgTraits>
30 {
31 public:
33  const stk::mesh::BulkData&,
34  const SolutionOptions&,
36 
38 
42  virtual void execute(
46 
47 private:
49 
52 
53  double rhoRef_;
54  double tRef_;
55  double beta_;
56  Kokkos::View<DoubleType[AlgTraits::nDim_]> gravity_{ "v_gravity"};
57 
58  const int* ipNodeMap_;
59 
60  // scratch space
61  Kokkos::View<DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_ { "v_shape_func" };
62 };
63 
64 } // nalu
65 } // sierra
66 
67 #endif /* MOMENTUMBUOYANCYSRCELEMKERNEL_H */
Definition: ABLForcingAlgorithm.C:26
virtual ~MomentumBuoyancyBoussinesqSrcElemKernel()
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.C:62
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: MomentumBuoyancyBoussinesqSrcElemKernel.C:67
double tRef_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:54
Definition: ElemDataRequests.h:66
Definition: SolutionOptions.h:38
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
VectorFieldType * coordinates_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:51
ScalarFieldType * temperatureNp1_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:50
const int * ipNodeMap_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:58
double beta_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:55
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
CMM buoyancy term for momentum equation (velocity DOF)
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:29
Definition: UnitTestMasterElements.C:367
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
Kokkos::View< DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:61
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
Kokkos::View< DoubleType[AlgTraits::nDim_]> gravity_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:56
double rhoRef_
Definition: MomentumBuoyancyBoussinesqSrcElemKernel.h:53
Definition: ScratchViews.h:82