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
ScalarMassElemKernel.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 SCALARMASSELEMKERNEL_H
9 #define SCALARMASSELEMKERNEL_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 TimeIntegrator;
23 class SolutionOptions;
24 class MasterElement;
25 class ElemDataRequests;
26 
29 template<typename AlgTraits>
31 {
32 public:
34  const stk::mesh::BulkData&,
35  const SolutionOptions&,
38  const bool);
39 
40  virtual ~ScalarMassElemKernel();
41 
44  virtual void setup(const TimeIntegrator&);
45 
49  virtual void execute(
53 
54 private:
55  ScalarMassElemKernel() = delete;
56 
64 
65  double dt_{0.0};
66  double gamma1_{0.0};
67  double gamma2_{0.0};
68  double gamma3_{0.0};
69  const bool lumpedMass_;
70 
72  const int* ipNodeMap_;
73 
75  Kokkos::View<DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_ {"view_shape_func"};
76 };
77 
78 } // nalu
79 } // sierra
80 
81 #endif /* SCALARMASSELEMKERNEL_H */
Definition: TimeIntegrator.h:26
Definition: ABLForcingAlgorithm.C:26
Definition: ElemDataRequests.h:66
double gamma1_
Definition: ScalarMassElemKernel.h:66
Definition: SolutionOptions.h:38
CMM (BDF2/BE) for scalar equation.
Definition: ScalarMassElemKernel.h:30
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
ScalarFieldType * densityNm1_
Definition: ScalarMassElemKernel.h:60
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
ScalarFieldType * scalarQN_
Definition: ScalarMassElemKernel.h:58
const int * ipNodeMap_
Integration point to node mapping.
Definition: ScalarMassElemKernel.h:72
double gamma2_
Definition: ScalarMassElemKernel.h:67
ScalarFieldType * scalarQNm1_
Definition: ScalarMassElemKernel.h:57
double dt_
Definition: ScalarMassElemKernel.h:65
Definition: UnitTestMasterElements.C:367
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
VectorFieldType * coordinates_
Definition: ScalarMassElemKernel.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: ScalarMassElemKernel.C:98
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
virtual void setup(const TimeIntegrator &)
Perform pre-timestep work for the computational kernel.
Definition: ScalarMassElemKernel.C:88
ScalarFieldType * densityNp1_
Definition: ScalarMassElemKernel.h:62
double gamma3_
Definition: ScalarMassElemKernel.h:68
ScalarFieldType * scalarQNp1_
Definition: ScalarMassElemKernel.h:59
ScalarFieldType * densityN_
Definition: ScalarMassElemKernel.h:61
Definition: ScratchViews.h:82
const bool lumpedMass_
Definition: ScalarMassElemKernel.h:69
Kokkos::View< DoubleType[AlgTraits::numScvIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Shape functions.
Definition: ScalarMassElemKernel.h:75
virtual ~ScalarMassElemKernel()
Definition: ScalarMassElemKernel.C:83