Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LoadTransfer_FSc_ALE Class Reference

#include <transfer_actions.h>

Inheritance diagram for LoadTransfer_FSc_ALE:
Collaboration diagram for LoadTransfer_FSc_ALE:

Public Member Functions

 LoadTransfer_FSc_ALE (FluidAgent *fag, SolidAgent *sag, BurnAgent *bag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string s_ts, const std::string s_pf)
 
void init (double t)
 
void run (double t, double dt, double alpha)
 
- Public Member Functions inherited from InterMeshTransfer
 InterMeshTransfer (FluidAgent *fag, SolidAgent *sag, char *name=NULL)
 
- Public Member Functions inherited from Action
 Action (void *p=0, char *name=NULL)
 
 Action (int n, const char *at[], int *i=NULL, void *p=0, char *name=NULL)
 
 Action (int n, const std::string at[], int *i=NULL, void *p=0, char *name=NULL)
 
virtual ~Action ()
 
virtual void declare (Scheduler &)
 
virtual void finalize ()
 
virtual char * name ()
 
void set_name (const char *name)
 
virtual void print (FILE *f)
 
virtual void print_toposort (FILE *f)
 
virtual void schedule ()
 

Private Attributes

int traction_mode
 
int size_ts
 
BurnAgentbagent
 
int f_tf_hdl
 
int f_ts_hdl
 
int s_ts_hdl
 
int s_pf_hdl
 
int f_pf_hdl
 
int fb_ts_hdl
 
int fb_pf_hdl
 
int fb_mdot_hdl
 
int fb_rhof_alp_hdl
 
int fb_mdot_tmp_hdl
 
int b_rb_hdl
 
int fb_nf_alp_hdl
 
int fb_tf_hdl
 
int RFC_transfer
 
int SURF_compute_face_normals
 

Additional Inherited Members

- Protected Types inherited from Action
enum  { IN =1, OUT =2, INOUT =3 }
 
- Protected Member Functions inherited from InterMeshTransfer
void load_rocface (const RocmanControl_parameters *param)
 
- Protected Member Functions inherited from Action
int get_attribute_handle (int i)
 
int get_attribute_handle_const (int i)
 
int get_attribute_handle (const std::string str)
 
void set_attr (int n, const std::string at[], int *id=NULL)
 
void set_attr (int n, const char *at[], int *id=NULL)
 
void set_io (int n, const int *io)
 
void set_io (const char *io)
 
int get_io (int i)
 
- Protected Attributes inherited from InterMeshTransfer
FluidAgentfagent
 
SolidAgentsagent
 
- Protected Attributes inherited from Action
char * action_name
 
char ** attr
 
int * idx
 
int count
 
void * usr_ptr
 
std::vector< int > inout
 

Detailed Description

Definition at line 61 of file transfer_actions.h.

Constructor & Destructor Documentation

LoadTransfer_FSc_ALE ( FluidAgent fag,
SolidAgent sag,
BurnAgent bag,
const std::string  f_pf,
const std::string  fb_mdot,
const std::string  b_rb,
const std::string  s_ts,
const std::string  s_pf 
)
explicit

Definition at line 207 of file transfer_actions.C.

References COM_DOUBLE, InterMeshTransfer::fagent, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), Agent::get_surface_window(), FluidAgent::ifluid_i, Action::IN, NO_SHEER, Action::OUT, Agent::register_clone_attribute(), Agent::register_new_attribute(), InterMeshTransfer::sagent, Action::set_attr(), Action::set_io(), SolidAgent::solidBufBase, traction_mode, and RocmanControl_parameters::traction_mode.

213  :
214  InterMeshTransfer(fag, sag, (char *)"LoadTransfer_FSc_ALE"),
215  bagent(bag)
216 {
217  int io[] = {IN, IN, IN, IN, OUT};
218  set_io( 5, io);
219 
220  std::string atts[5];
221  atts[0] = f_pf;
222  atts[1] = fb_mdot;
223  atts[2] = b_rb;
224  atts[3] = s_ts;
225  atts[4] = s_pf;
226  set_attr(5, atts);
227 
229 
230  // create_attribute
231  // for SolidAgent ??????????????????
232 // if (traction_mode == NO_SHEER && size_ts == 3) {
233  sagent->register_new_attribute( sagent->solidBufBase, ".pf", 'e', COM_DOUBLE, 1, "Pa");
234 // }
235 
236  // for FluidAgent
237  if (traction_mode == NO_SHEER) {
239  }
240  else
242 
243 // fagent->register_new_attribute( fagent->fluidBufB, ".mdot_tmp", 'e', COM_DOUBLE, 1, "kg/(m^2 s)");
244 }
SolidAgent * sagent
FluidAgent * fagent
void register_clone_attribute(int cond, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_, int wg_=1, const char *ptnname_=0, int val_=0)
Definition: Agent.C:328
void register_new_attribute(std::string target_window_, std::string attr_, char loc_, int type_, int ncomp_, const char *unit_)
Definition: Agent.C:322
std::string get_surface_window() const
Definition: Agent.h:217
std::string ifluid_i
Definition: FluidAgent.h:70
std::string solidBufBase
Definition: SolidAgent.h:67
Coupling * get_coupling()
Definition: Agent.h:213
void set_io(int n, const int *io)
Definition: Action.h:70
const int NO_SHEER
Definition: SolidAgent.h:31
InterMeshTransfer(FluidAgent *fag, SolidAgent *sag, char *name=NULL)
void set_attr(int n, const std::string at[], int *id=NULL)
Definition: Action.C:66
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184

Here is the call graph for this function:

Member Function Documentation

void init ( double  t)
virtual

Reimplemented from Action.

Definition at line 247 of file transfer_actions.C.

References b_rb_hdl, COM_assertion_msg, COM_get_attribute(), COM_get_attribute_handle(), COM_get_attribute_handle_const(), COM_get_function_handle(), f_pf_hdl, f_tf_hdl, f_ts_hdl, InterMeshTransfer::fagent, fb_mdot_hdl, fb_mdot_tmp_hdl, fb_nf_alp_hdl, fb_pf_hdl, fb_rhof_alp_hdl, fb_tf_hdl, fb_ts_hdl, FluidAgent::fluidBufB, FluidAgent::fluidBufNG, Action::get_attribute_handle(), Action::get_attribute_handle_const(), Agent::get_coupling(), Coupling::get_rocmancontrol_param(), InterMeshTransfer::load_rocface(), load_rocsurf(), MAN_DEBUG, MPI_COMM_WORLD, NO_SHEER, RFC_transfer, s_pf_hdl, s_ts_hdl, InterMeshTransfer::sagent, size_ts, SolidAgent::solidBufBase, SURF_compute_face_normals, and traction_mode.

247  {
248  // find out size_ts
249  int dummy;
250  std::string unit;
251  char loc;
252  COM_get_attribute( sagent->solidBufBase+".ts", &loc, &dummy, &size_ts, &unit);
253  if (size_ts == 1 && traction_mode != NO_SHEER) {
254  COM_assertion_msg(0, "If traction mode is with sheer, then solid tractions must be vectors!");
255  MPI_Abort(MPI_COMM_WORLD, -1);
256  }
257 
258  //f_pf_hdl = COM_get_attribute_handle_const( fagent->fluidBufNG+".pf");
263  if (traction_mode == NO_SHEER && size_ts == 3)
265  else
266  s_pf_hdl = -1;
267 
272 
275 
278 
280  RFC_transfer = COM_get_function_handle("RFC.least_squares_transfer");
281 
282  load_rocsurf();
283  SURF_compute_face_normals = COM_get_function_handle( "SURF.compute_element_normals");
284 
285  MAN_DEBUG(3, ("LoadTransfer_FSc_ALE::init() called - traction_mode: %d size_ts: %d.\n", traction_mode, size_ts));
286 }
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
SolidAgent * sagent
void COM_get_attribute(const std::string wa_str, char *loc, int *type, int *ncomp, std::string *unit)
Definition: roccom_c++.h:269
void load_rocface(const RocmanControl_parameters *param)
std::string fluidBufB
Definition: FluidAgent.h:80
#define COM_assertion_msg(EX, msg)
FluidAgent * fagent
int get_attribute_handle(int i)
Definition: Action.C:93
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
int get_attribute_handle_const(int i)
Definition: Action.C:110
std::string solidBufBase
Definition: SolidAgent.h:67
Coupling * get_coupling()
Definition: Agent.h:213
std::string fluidBufNG
Definition: FluidAgent.h:78
const int NO_SHEER
Definition: SolidAgent.h:31
int COM_get_attribute_handle_const(const char *waname)
Definition: roccom_c++.h:420
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
static void load_rocsurf()
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

void run ( double  t,
double  dt,
double  alpha 
)
virtual

Reimplemented from Action.

Definition at line 288 of file transfer_actions.C.

References b_rb_hdl, COM_assertion_msg, COM_call_function(), RocBlas::copy, RocBlas::div, f_pf_hdl, f_tf_hdl, f_ts_hdl, InterMeshTransfer::fagent, fb_mdot_hdl, fb_mdot_tmp_hdl, fb_nf_alp_hdl, fb_pf_hdl, fb_rhof_alp_hdl, fb_tf_hdl, fb_ts_hdl, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), MAN_DEBUG, RocBlas::mul, RocBlas::neg, NO_SHEER, RocmanControl_parameters::P_ambient, RFC_transfer, s_pf_hdl, s_ts_hdl, InterMeshTransfer::sagent, size_ts, RocBlas::sub, RocBlas::sub_scalar, SURF_compute_face_normals, traction_mode, and SolidAgent::withALE.

288  {
289  MAN_DEBUG(3, ("Rocstar: LoadTransfer_FSc_ALE::run() with t:%e dt:%e.\n", t, dt));
290  // ts = tf + ( mdot*Vs
291 
292 #if 1
293  // part 1 (POST_UPDATE_FLUID in fluid_agent.f90)
294  if (traction_mode != NO_SHEER) {
296 
297  // Compute tfmts = t_s-t_f (see developers guide).
298  // Here fb_mdot_tmp is used as buffer space.
300 
301  if ( sagent->withALE) {
303  }
304 
307 
308  // Compute ts = tf - (tf-ts)
310  }
311  else { // ts is a scalar
312 
314 
315  // Compute tsmpf = p_f-t_s (see developers guide).
316  // Here fb_mdot_tmp is used as buffer space.
318 
319  if ( sagent->withALE) {
321  }
322 
324 
325  // Compute ts = pf - (pf-ts)
327 
328  //debug_print(fagent->fluidBufB+".mdot", 102, 0, "LOADTRANSFER");
329  //debug_print(fagent->fluidBufB+".ts", 102, 0, "LOADTRANSFER");
330 
331  // Subtract from P_ambient if not zeros
332  double P_ambient = fagent->get_coupling()->get_rocmancontrol_param()->P_ambient;
333  if ( P_ambient != 0.0) {
335  }
336  }
337 
338 #endif
339 
340  // part 2 (solid_agent.f90 INIT_INBUFF_SOLID())
341  if (traction_mode == NO_SHEER && size_ts == 3) {
346  }
347  else if ( traction_mode == NO_SHEER && size_ts == 1) {
349  //debug_print(sagent->solidBuf+".ts", 102, 0, fagent->get_communicator(), "LOADTRANSFER");
350  }
351  else if (size_ts == 1) {
352  COM_assertion_msg(0, "If traction mode is with sheer, then solid tractions must be vectors!");
353  }
354  else {
356  }
357 }
SolidAgent * sagent
#define COM_assertion_msg(EX, msg)
int withALE
Definition: SolidAgent.h:84
FluidAgent * fagent
static int copy
Definition: RocBlas.h:34
static int div
Definition: RocBlas.h:39
Coupling * get_coupling()
Definition: Agent.h:213
static int neg
Definition: RocBlas.h:40
static int sub_scalar
Definition: RocBlas.h:44
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
const int NO_SHEER
Definition: SolidAgent.h:31
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184
static int sub
Definition: RocBlas.h:36
static int mul
Definition: RocBlas.h:38

Here is the call graph for this function:

Member Data Documentation

int b_rb_hdl
private

Definition at line 73 of file transfer_actions.h.

Referenced by init(), and run().

BurnAgent* bagent
private

Definition at line 69 of file transfer_actions.h.

int f_pf_hdl
private

Definition at line 71 of file transfer_actions.h.

Referenced by init(), and run().

int f_tf_hdl
private

Definition at line 70 of file transfer_actions.h.

Referenced by init(), and run().

int f_ts_hdl
private

Definition at line 70 of file transfer_actions.h.

Referenced by init(), and run().

int fb_mdot_hdl
private

Definition at line 72 of file transfer_actions.h.

Referenced by init(), and run().

int fb_mdot_tmp_hdl
private

Definition at line 72 of file transfer_actions.h.

Referenced by init(), and run().

int fb_nf_alp_hdl
private

Definition at line 73 of file transfer_actions.h.

Referenced by init(), and run().

int fb_pf_hdl
private

Definition at line 71 of file transfer_actions.h.

Referenced by init(), and run().

int fb_rhof_alp_hdl
private

Definition at line 72 of file transfer_actions.h.

Referenced by init(), and run().

int fb_tf_hdl
private

Definition at line 73 of file transfer_actions.h.

Referenced by init(), and run().

int fb_ts_hdl
private

Definition at line 71 of file transfer_actions.h.

Referenced by init(), and run().

int RFC_transfer
private

Definition at line 74 of file transfer_actions.h.

Referenced by init(), and run().

int s_pf_hdl
private

Definition at line 70 of file transfer_actions.h.

Referenced by init(), and run().

int s_ts_hdl
private

Definition at line 70 of file transfer_actions.h.

Referenced by init(), and run().

int size_ts
private

Definition at line 68 of file transfer_actions.h.

Referenced by init(), and run().

int SURF_compute_face_normals
private

Definition at line 75 of file transfer_actions.h.

Referenced by init(), and run().

int traction_mode
private

Definition at line 67 of file transfer_actions.h.

Referenced by init(), LoadTransfer_FSc_ALE(), and run().


The documentation for this class was generated from the following files: