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
SolverAlgorithm.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
2 /* Copyright 2014 Sandia Corporation. */
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 
9 #ifndef SolverAlgorithm_h
10 #define SolverAlgorithm_h
11 
12 #include <Algorithm.h>
13 #include <KokkosInterface.h>
14 
15 #include <stk_mesh/base/Entity.hpp>
16 #include <vector>
17 
18 namespace sierra{
19 namespace nalu{
20 
21 class EquationSystem;
22 class Realm;
23 
24 class SolverAlgorithm : public Algorithm
25 {
26 public:
27 
29  Realm &realm,
30  stk::mesh::Part *part,
31  EquationSystem *eqSystem);
32  virtual ~SolverAlgorithm() {}
33 
34  virtual void execute() = 0;
35  virtual void initialize_connectivity() = 0;
36 
37 protected:
38 
39  // Need to find out whether this ever gets called inside a modification cycle.
40  void apply_coeff(
41  const std::vector<stk::mesh::Entity> & sym_meshobj,
42  std::vector<int> &scratchIds,
43  std::vector<double> &scratchVals,
44  const std::vector<double> &rhs,
45  const std::vector<double> &lhs,
46  const char *trace_tag=0);
47 
48  void apply_coeff(
49  unsigned numMeshobjs,
50  const stk::mesh::Entity* symMeshobjs,
51  const SharedMemView<int*> & scratchIds,
52  const SharedMemView<int*> & sortPermutation,
53  const SharedMemView<const double*> & rhs,
55  const char *trace_tag);
56 
58 };
59 
60 } // namespace nalu
61 } // namespace Sierra
62 
63 #endif
virtual ~SolverAlgorithm()
Definition: SolverAlgorithm.h:32
Definition: ABLForcingAlgorithm.C:26
EquationSystem * eqSystem_
Definition: SolverAlgorithm.h:57
virtual void initialize_connectivity()=0
Definition: SolverAlgorithm.h:24
void apply_coeff(const std::vector< stk::mesh::Entity > &sym_meshobj, std::vector< int > &scratchIds, std::vector< double > &scratchVals, const std::vector< double > &rhs, const std::vector< double > &lhs, const char *trace_tag=0)
Definition: SolverAlgorithm.C:47
static constexpr double lhs[8][8]
Definition: UnitTestContinuityAdvElem.C:25
Base class representation of a PDE.
Definition: EquationSystem.h:46
static constexpr double rhs[8]
Definition: UnitTestContinuityAdvElem.C:18
Definition: Algorithm.h:28
Kokkos::View< T, Kokkos::LayoutRight, DeviceShmem, Kokkos::MemoryUnmanaged > SharedMemView
Definition: KokkosInterface.h:25
Definition: Realm.h:82
SolverAlgorithm(Realm &realm, stk::mesh::Part *part, EquationSystem *eqSystem)
Definition: SolverAlgorithm.C:33