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
ContinuityAdvElemKernel.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 CONTINUITYADVELEMKERNEL_H
9 #define CONTINUITYADVELEMKERNEL_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&,
37 
38  virtual ~ContinuityAdvElemKernel();
39 
42  virtual void setup(const TimeIntegrator&);
43 
47  virtual void execute(
51 
52 private:
53  ContinuityAdvElemKernel() = delete;
54 
55  // extract fields; nodal
61 
62  double projTimeScale_{1.0};
63 
64  const bool meshMotion_;
65  const bool shiftMdot_;
66  const bool shiftPoisson_;
68  const double interpTogether_;
69  const double om_interpTogether_;
70 
71  // scratch space
72  Kokkos::View<DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_ { "view_shape_func" };
73 
74  const int* lrscv_;
75 };
76 
77 } // nalu
78 } // sierra
79 
80 #endif /* CONTINUITYADVELEMKERNEL_H */
Definition: TimeIntegrator.h:26
Definition: ABLForcingAlgorithm.C:26
const bool meshMotion_
Definition: ContinuityAdvElemKernel.h:64
const double om_interpTogether_
Definition: ContinuityAdvElemKernel.h:69
VectorFieldType * coordinates_
Definition: ContinuityAdvElemKernel.h:60
Definition: ElemDataRequests.h:66
Definition: SolutionOptions.h:38
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
Definition: FieldTypeDef.h:24
const bool shiftMdot_
Definition: ContinuityAdvElemKernel.h:65
VectorFieldType * Gpdx_
Definition: ContinuityAdvElemKernel.h:57
VectorFieldType * velocityRTM_
Definition: ContinuityAdvElemKernel.h:56
stk::mesh::Field< double > ScalarFieldType
Definition: FieldTypeDef.h:19
const bool reducedSensitivities_
Definition: ContinuityAdvElemKernel.h:67
CMM (BDF2) for continuity equation (pressure DOF)
Definition: ContinuityAdvElemKernel.h:30
ScalarFieldType * densityNp1_
Definition: ContinuityAdvElemKernel.h:59
Kokkos::View< DoubleType[AlgTraits::numScsIp_][AlgTraits::nodesPerElement_]> v_shape_function_
Definition: ContinuityAdvElemKernel.h:72
ScalarFieldType * pressure_
Definition: ContinuityAdvElemKernel.h:58
double projTimeScale_
Definition: ContinuityAdvElemKernel.h:62
Definition: UnitTestMasterElements.C:367
Base class for computational kernels in Nalu.
Definition: Kernel.h:63
const double interpTogether_
Definition: ContinuityAdvElemKernel.h:68
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: ContinuityAdvElemKernel.C:94
Definition: ScratchViews.h:82
virtual void setup(const TimeIntegrator &)
Perform pre-timestep work for the computational kernel.
Definition: ContinuityAdvElemKernel.C:85
virtual ~ContinuityAdvElemKernel()
Definition: ContinuityAdvElemKernel.C:80
const int * lrscv_
Definition: ContinuityAdvElemKernel.h:74
const bool shiftPoisson_
Definition: ContinuityAdvElemKernel.h:66