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
Transfer.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 Transfer_h
10 #define Transfer_h
11 
12 // yaml for parsing..
13 #include <yaml-cpp/yaml.h>
14 
15 #include <string>
16 #include <vector>
17 #include <utility>
18 
19 // stk_transfer related
20 #include <boost/shared_ptr.hpp>
21 #include <stk_transfer/TransferBase.hpp>
22 
23 // stk
24 namespace stk {
25 namespace mesh {
26 class Part;
27 typedef std::vector<Part*> PartVector;
28 }
29 }
30 
31 namespace sierra{
32 namespace nalu{
33 
34 class Realm;
35 class Transfers;
36 class Simulation;
37 
38 class Transfer
39 {
40 public:
41  Transfer( Transfers &transfers);
42  virtual ~Transfer();
43 
44  void load(const YAML::Node & node);
45 
46  void breadboard();
47  void initialize_begin();
48  void change_ghosting();
49  void initialize_end();
50  void execute();
51 
52 
53  Simulation *root();
54  Transfers *parent();
55 
57  boost::shared_ptr<stk::transfer::TransferBase> transfer_;
58 
61  std::string couplingPhysicsName_;
62 
65 
66  // during load
67  std::string name_;
68  std::string transferType_;
69  std::string transferObjective_;
70  std::string searchMethodName_;
73  std::pair<std::string, std::string> realmPairName_;
74 
75  // allow the user to provide a vector "from" and "to" parts; names
76  std::vector<std::string> fromPartNameVec_;
77  std::vector<std::string> toPartNameVec_;
78  // actual parts
81 
82  // all of the fields
83  std::vector<std::pair<std::string, std::string> > transferVariablesPairName_;
84 
85  void allocate_stk_transfer();
86  void ghost_from_elements();
87 };
88 
89 
90 } // namespace nalu
91 } // namespace Sierra
92 
93 #endif
boost::shared_ptr< stk::transfer::TransferBase > transfer_
Definition: Transfer.h:57
std::vector< Part * > PartVector
Definition: Algorithm.h:16
Definition: Simulation.h:28
Definition: ABLForcingAlgorithm.C:26
std::vector< std::pair< std::string, std::string > > transferVariablesPairName_
Definition: Transfer.h:83
bool couplingPhysicsSpecified_
Definition: Transfer.h:59
std::string transferType_
Definition: Transfer.h:68
Definition: Algorithm.h:14
std::vector< std::string > fromPartNameVec_
Definition: Transfer.h:76
std::string searchMethodName_
Definition: Transfer.h:70
std::vector< std::string > toPartNameVec_
Definition: Transfer.h:77
std::pair< std::string, std::string > realmPairName_
Definition: Transfer.h:73
std::string transferObjective_
Definition: Transfer.h:69
double searchTolerance_
Definition: Transfer.h:71
double searchExpansionFactor_
Definition: Transfer.h:72
Transfers & transfers_
Definition: Transfer.h:56
std::string name_
Definition: Transfer.h:67
Definition: Transfer.h:38
std::string couplingPhysicsName_
Definition: Transfer.h:61
bool transferVariablesSpecified_
Definition: Transfer.h:60
Tpetra::Map< LocalOrdinal, GlobalOrdinal >::node_type Node
Definition: LinearSolver.h:32
stk::mesh::PartVector toPartVec_
Definition: Transfer.h:80
Definition: Transfers.h:31
Definition: Realm.h:82
Realm * fromRealm_
Definition: Transfer.h:63
Realm * toRealm_
Definition: Transfer.h:64
stk::mesh::PartVector fromPartVec_
Definition: Transfer.h:79