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
MomentumBuoyancySrcElemKernel.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 MOMENTUMBUOYANCYSRCELEMKERNEL_H
9 #define MOMENTUMBUOYANCYSRCELEMKERNEL_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  Kokkos::View<DoubleType[AlgTraits::nDim_]> gravity_{ "v_gravity"};
55 
56  const int* ipNodeMap_;
57 
58  // scratch space
59  Kokkos::View<DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_ { "v_shape_func" };
60 };
61 
62 } // nalu
63 } // sierra
64 
65 #endif /* MOMENTUMBUOYANCYSRCELEMKERNEL_H */
Definition: ABLForcingAlgorithm.C:26
Definition: ElemDataRequests.h:66
const int * ipNodeMap_
Definition: MomentumBuoyancySrcElemKernel.h:56
ScalarFieldType * densityNp1_
Definition: MomentumBuoyancySrcElemKernel.h:50
double rhoRef_
Definition: MomentumBuoyancySrcElemKernel.h:53
Definition: SolutionOptions.h:38
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
Kokkos::View< DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Definition: MomentumBuoyancySrcElemKernel.h:59
Kokkos::View< DoubleType[AlgTraits::nDim_]> gravity_
Definition: MomentumBuoyancySrcElemKernel.h:54
CMM buoyancy term for momentum equation (velocity DOF)
Definition: MomentumBuoyancySrcElemKernel.h:29
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
virtual ~MomentumBuoyancySrcElemKernel()
Definition: MomentumBuoyancySrcElemKernel.C:60
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: MomentumBuoyancySrcElemKernel.C:65
VectorFieldType * coordinates_
Definition: MomentumBuoyancySrcElemKernel.h:51
Definition: ScratchViews.h:82