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
Adapter.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 #if defined (NALU_USES_PERCEPT)
9 
10 #ifndef Adapter_h
11 #define Adapter_h
12 
13 #include <stk_mesh/base/Selector.hpp>
14 
15 namespace percept {
16  class PerceptMesh;
17  class AdaptedMeshVerifier;
18  struct ElementRefinePredicate;
19  template<class RefinePredicate> class TransitionElementAdapter;
20  class UniformRefinerPatternBase;
21  class UniformRefiner;
22 }
23 
24 namespace sierra{
25 namespace nalu{
26 
27 class Realm;
28 
29 enum AdapterInsruction {
30  ADAPT_NOTHING = 0,
31  ADAPT_REFINE = 1 << 1,
32  ADAPT_UNREFINE = 1 << 2
33 };
34 
35 class Adapter
36 {
37 public:
38 
39  Adapter(
40  const Realm &realm);
41  ~Adapter();
42 
43  void do_adapt(int what_to_do);
44  void do_uniform_refine();
45 
46  const Realm& realm_;
47  percept::UniformRefinerPatternBase *uniformRefinementPattern_;
48  percept::UniformRefinerPatternBase *refinementPattern_;
49  percept::PerceptMesh *perceptMesh_;
50  percept::UniformRefiner *uniformBreaker_;
51  percept::TransitionElementAdapter<percept::ElementRefinePredicate> *breaker_;
52  percept::ElementRefinePredicate *elementRefinePredicate_;
53  stk::mesh::Selector *selector_;
54  // mesh verifier
55  percept::AdaptedMeshVerifier * adaptedMeshVerifier_;
56 
57  private:
58  void setNaluGlobalId();
59 };
60 
61 } // namespace nalu
62 } // namespace Sierra
63 
64 #endif
65 
66 #endif
Definition: ABLForcingAlgorithm.C:26