Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
basic_actions.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: basic_actions.h,v 1.53 2009/08/27 14:04:54 mtcampbe Exp $
24 
25 #ifndef _BASIC_ACTIONS_H_
26 #define _BASIC_ACTIONS_H_
27 
28 #include "rocman.h"
29 
30 class FluidAgent;
31 class SolidAgent;
32 class BurnAgent;
33 
34 class DummyAction : public Action {
35 public:
36  DummyAction() : Action(0, (const char **)NULL, NULL, NULL, (char *)"DummyAction") {}
37  void init(double t) {}
38  void run(double t, double dt, double alpha) {}
39 };
40 
41 class SetValueDouble : public Action {
42  public:
43  SetValueDouble(const std::string at, const double val);
44  void init(double t);
45  void run(double t, double dt, double alpha);
46 private:
47  int attr_hdl;
48  double v;
49 };
50 
51 class SetZero : public SetValueDouble {
52  public:
53  SetZero(const std::string at);
54 };
55 
56 class CopyValue: public Action {
57  public:
58  CopyValue(const std::string from, const std::string to, int *cond=NULL);
59  void init(double t);
60  void run(double t, double dt, double alpha);
61 private:
63  int * condition;
64 };
65 
66 class DummyPrint: public Action {
67  public:
68  DummyPrint(BurnAgent *bag, SolidAgent *sag, FluidAgent *fag, const std::string l);
69  void init(double t);
70  void run(double t, double dt, double alpha);
71 private:
75  std::string label;
76 };
77 
78 class BCInvoker: public Action {
79  public:
80  BCInvoker(Agent *ag, int l=1);
81  void init(double t);
82  void run(double t, double dt, double alpha);
83 private:
85  int level;
86 };
87 
88 class GMInvoker: public Action {
89  public:
90  GMInvoker(Agent *ag);
91  void init(double t);
92  void run(double t, double dt, double alpha);
93 private:
95 };
96 
97 class BCInitInvoker: public Action {
98  public:
99  BCInitInvoker(Agent *ag);
100  void init(double t);
101  void run(double t, double dt, double alpha);
102 private:
104 };
105 
106 // stop and run surfdiver
107 class SurfDiver: public Action {
108  public:
109  SurfDiver(FluidAgent *fag, SolidAgent *sag);
110  void init(double t);
111  virtual void run(double t, double dt, double alpha);
112  protected:
113  //void read_file( const char *fname, const string &wname, double alpha);
116  std::string outdir;
121 };
122 
123 // run surfdiver if overlay mesh is missing
125  public:
127  SurfDiver(fag, sag) {}
128  virtual void run(double t, double dt, double alpha);
129 };
130 
131 // POST_UPDATE_FLUID
133  public:
134  explicit ComputeFluidLoad_ALE( FluidAgent *fag, SolidAgent *sag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string f_ts);
135  void init(double t);
136  void run(double t, double dt, double alpha);
137  private:
145 };
146 
147 // UPDATE_INBUF_GM_FLUID
148 class ComputeMeshMotion : public Action {
149  public:
150  ComputeMeshMotion(FluidAgent *ag, const std::string a_vm, const std::string f_du_alp, double z);
151  void init(double t);
152  void run(double t, double dt, double alpha);
153  private:
155  double zoom;
157 };
158 
159 class ComputeFaceCenters : public Action {
160  public:
161  ComputeFaceCenters(BurnAgent *ag, const std::string b_nc, const std::string b_cnts,
162  const std::string b_nrml="");
163  void init(double t);
164  void run(double t, double dt, double alpha);
165  private:
169 };
170 
172  public:
173  FluidPropagateSurface(FluidAgent *ag, BurnAgent *bag, const std::string b_rb, const std::string a_vm, double z);
174  void init(double t);
175  void run(double t, double dt, double alpha);
176  private:
179  double zoom;
187 };
188 
189 class MassTransfer: public Action {
190  public:
191  MassTransfer(FluidAgent *ag, BurnAgent *bag, const std::string b_rhos, const std::string b_rb, const std::string f_mdot);
192  void init(double t);
193  void run(double t, double dt, double alpha);
194  private:
198 };
199 
200 class ZoomInterface : public Action {
201  public:
202  ZoomInterface(FluidAgent *ag, BurnAgent *bag, const std::string fb_mdot_alp, double z);
203  void init(double t);
204  void run(double t, double dt, double alpha);
205  private:
209  double zoom;
210 };
211 
212 class ComputeRhofvf : public Action {
213  public:
214  ComputeRhofvf(FluidAgent *ag, std::string f_vs_alp, std::string f_rhof_alp, std::string f_rhofvf_alp);
215  void init(double t);
216  void run(double t, double dt, double alpha);
217  private:
221 };
222 
223 class ComputeBurnPane : public Action {
224  public:
225  ComputeBurnPane(FluidAgent *ag, BurnAgent *bag, SolidAgent *sag, const std::string fb_mdot_alp, const std::string rhofvf_alp, double z);
226  void init(double t);
227  void run(double t, double dt, double alpha);
228  private:
232  double zoom;
235 };
236 
237 // copy mesh from parent window to fluid face
239  public:
241  void init(double t);
242  void run(double t, double dt, double alpha);
243  private:
246  std::string burn_mesh, parent_mesh;
247 };
248 
249 // copy bflag from rocburn if not at time 0
250 class CopyBflagFromBurn : public Action {
251  public:
253  void init(double t);
254  void run(double t, double dt, double alpha);
255  private:
257  std::string parent_bflag, burn_bflag;
258 };
259 
260 // compute pconn for the whole surface, which will be used by surface propagation
261 class ComputePconn : public Action {
262  public:
263  ComputePconn(Agent *ag, std::string a_mesh, std::string a_pconn, std::string p_pmesh, int *cond=NULL);
264  void init(double t);
265  void run(double t, double dt, double alpha);
266  private:
272  int *cond_addr;
273 };
274 
275 /*
276 class InitBurnBuffer : public Action {
277  public:
278  InitBurnBuffer(FluidAgent *ag, BurnAgent *bag, double z);
279  void init(double t);
280  void run(double t, double dt, double alpha);
281  private:
282  FluidAgent *fagent;
283  BurnAgent *bagent;
284  double zoom;
285  int b_rb_alp_hdl, fb_rhof_alp_hdl, fb_mdot_alp_hdl;
286 };
287 */
288 
290  public:
291  SolidPropagateSurface_ALE(SolidAgent *ag, const std::string p_rb, const std::string a_vbar, double z);
292  void init(double t);
293  void run(double t, double dt, double alpha);
294  private:
296  double zoom;
302 };
303 
304 class Reset_du_alp : public Action {
305  public:
306  Reset_du_alp(FluidAgent *fag);
307  void init(double t);
308  void run(double t, double dt, double alpha);
309 private:
312 };
313 
314 #endif
315 
316 
317 
318 
319 
320 
321 
322 
SolidAgent * sagent
DummyPrint(BurnAgent *bag, SolidAgent *sag, FluidAgent *fag, const std::string l)
Definition: basic_actions.C:84
void run(double t, double dt, double alpha)
void init(double t)
Definition: basic_actions.h:37
void run(double t, double dt, double alpha)
FluidAgent * fagent
void init(double t)
void init(double t)
SolidPropagateSurface_ALE(SolidAgent *ag, const std::string p_rb, const std::string a_vbar, double z)
Reset_du_alp(FluidAgent *fag)
ComputeFaceCenters(BurnAgent *ag, const std::string b_nc, const std::string b_cnts, const std::string b_nrml="")
std::string a_pconn_str
void init(double t)
BurnAgent * bagent
BCInvoker(Agent *ag, int l=1)
void init(double t)
Definition: basic_actions.C:47
void run(double t, double dt, double alpha)
Agent * agent
Definition: basic_actions.h:94
void init(double t)
BurnAgent * bagent
int RFC_interpolate
void run(double t, double dt, double alpha)
void run(double t, double dt, double alpha)
FluidAgent * fagent
void run(double t, double dt, double alpha)
Definition: basic_actions.C:78
void run(double t, double dt, double alpha)
Definition: basic_actions.C:51
FluidAgent * fagent
std::string solid_mesh_str
int RFC_transfer
std::string f_vs_alp_str
int * condition
Definition: basic_actions.h:63
SurfDiver(FluidAgent *fag, SolidAgent *sag)
Definition: Surfdiver.C:104
std::string f_rhof_alp_str
FluidAgent * fagent
Definition: basic_actions.h:74
SolidAgent * sagent
void run(double t, double dt, double alpha)
void init(double t)
void init(double t)
Definition: Action.h:32
void run(double t, double dt, double alpha)
void init(double t)
std::string a_mesh_str
BurnAgent * bagent
std::string outdir
BCInitInvoker(Agent *ag)
void run(double t, double dt, double alpha)
void init(double t)
Definition: Surfdiver.C:111
FluidAgent * fagent
Definition: Agent.h:110
void run(double t, double dt, double alpha)
Definition: basic_actions.h:38
ComputePconn(Agent *ag, std::string a_mesh, std::string a_pconn, std::string p_pmesh, int *cond=NULL)
ComputeBurnPane(FluidAgent *ag, BurnAgent *bag, SolidAgent *sag, const std::string fb_mdot_alp, const std::string rhofvf_alp, double z)
void int int int REAL REAL REAL * z
Definition: write.cpp:76
BurnAgent * bagent
void init(double t)
Definition: basic_actions.C:73
ComputeRhofvf(FluidAgent *ag, std::string f_vs_alp, std::string f_rhof_alp, std::string f_rhofvf_alp)
void run(double t, double dt, double alpha)
GMInvoker(Agent *ag)
virtual void run(double t, double dt, double alpha)
Definition: Surfdiver.C:128
virtual void run(double t, double dt, double alpha)
Definition: Surfdiver.C:257
void run(double t, double dt, double alpha)
Definition: basic_actions.C:98
SolidAgent * sagent
Definition: basic_actions.h:73
std::string fluid_mesh_str
std::string p_pmesh_str
SetZero(const std::string at)
Definition: basic_actions.C:56
CopyValue(const std::string from, const std::string to, int *cond=NULL)
Definition: basic_actions.C:59
void init(double t)
ComputeMeshMotion(FluidAgent *ag, const std::string a_vm, const std::string f_du_alp, double z)
SurfDiverAfterRemeshing(FluidAgent *fag, SolidAgent *sag)
void init(double t)
void init(double t)
void init(double t)
void run(double t, double dt, double alpha)
FluidAgent * fagent
void run(double t, double dt, double alpha)
int RFC_readcntr
FluidAgent * fagent
void init(double t)
ComputeFluidLoad_ALE(FluidAgent *fag, SolidAgent *sag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string f_ts)
std::string parent_bflag
void run(double t, double dt, double alpha)
void run(double t, double dt, double alpha)
Agent * agent
Definition: basic_actions.h:84
MassTransfer(FluidAgent *ag, BurnAgent *bag, const std::string b_rhos, const std::string b_rb, const std::string f_mdot)
std::string f_rhofvf_alp_str
FluidAgent * fagent
ZoomInterface(FluidAgent *ag, BurnAgent *bag, const std::string fb_mdot_alp, double z)
FluidPropagateSurface(FluidAgent *ag, BurnAgent *bag, const std::string b_rb, const std::string a_vm, double z)
void init(double t)
Definition: basic_actions.C:94
void init(double t)
void run(double t, double dt, double alpha)
BurnAgent * bagent
Definition: basic_actions.h:72
void run(double t, double dt, double alpha)
CopyBurnFromParentMesh(BurnAgent *bag, FluidAgent *fag)
CopyBflagFromBurn(BurnAgent *bag)
void run(double t, double dt, double alpha)
std::string burn_bflag
SetValueDouble(const std::string at, const double val)
Definition: basic_actions.C:38
std::string label
Definition: basic_actions.h:75
void init(double t)