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

#include <transfer_actions.h>

Inheritance diagram for LoadTransfer_FS:
Collaboration diagram for LoadTransfer_FS:

Public Member Functions

 LoadTransfer_FS (FluidAgent *fag, SolidAgent *sag, const std::string f_ts, 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
 
std::string f_ts_str
 
std::string s_ts_str
 
std::string s_pf_str
 
int f_tf_hdl
 
int f_ts_hdl
 
int s_ts_hdl
 
int s_pf_hdl
 
int f_pf_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 45 of file transfer_actions.h.

Constructor & Destructor Documentation

LoadTransfer_FS ( FluidAgent fag,
SolidAgent sag,
const std::string  f_ts,
const std::string  s_ts,
const std::string  s_pf 
)
explicit

Definition at line 105 of file transfer_actions.C.

References COM_assertion_msg, COM_DOUBLE, f_ts_str, InterMeshTransfer::fagent, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), Agent::get_surface_window(), 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.

108  :
109  InterMeshTransfer(fag, sag, (char *)"LoadTransfer_FS"),
110  f_ts_str(f_ts), s_ts_str(s_ts), s_pf_str(s_pf)
111 {
112  int io[] = {IN, IN, OUT};
113  set_io( 3, io);
114 
115  std::string atts[3];
116  atts[0] = f_ts;
117  atts[1] = s_ts;
118  atts[2] = s_pf;
119  set_attr(3, atts);
120 
122 
123  // create_attribute
124  // for SolidAgent ??????????????????
125 // if (traction_mode == NO_SHEER && size_ts == 3) {
126  sagent->register_new_attribute( sagent->solidBufBase, ".pf", 'e', COM_DOUBLE, 1, "Pa");
127 // }
128 
129  // for FluidAgent
130  std::string::size_type pos = f_ts_str.find( ".");
131  COM_assertion_msg(pos!=std::string::npos, "LoadTransfer_FS failed!");
132  std::string f = f_ts_str.substr( 0, pos);
133  std::string ts = f_ts_str.substr( pos, f_ts_str.size());
134  if (traction_mode == NO_SHEER) {
136  }
137  else
139 }
SolidAgent * sagent
#define COM_assertion_msg(EX, msg)
std::string f_ts_str
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 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)
std::string s_pf_str
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
std::string s_ts_str

Here is the call graph for this function:

Member Function Documentation

void init ( double  t)
virtual

Reimplemented from Action.

Definition at line 142 of file transfer_actions.C.

References COM_assertion_msg, COM_get_attribute(), COM_get_attribute_handle_const(), COM_get_function_handle(), f_pf_hdl, f_tf_hdl, f_ts_hdl, InterMeshTransfer::fagent, FluidAgent::fluidBufNG, Action::get_attribute_handle(), 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.

142  {
143  // find out size_ts ???
144  int dummy;
145  std::string unit;
146  char loc;
147  COM_get_attribute( sagent->solidBufBase+".ts", &loc, &dummy, &size_ts, &unit);
148  if (size_ts == 1 && traction_mode != NO_SHEER) {
149  COM_assertion_msg(0, "If traction mode is with sheer, then solid tractions must be vectors!");
150  MPI_Abort(MPI_COMM_WORLD, -1);
151  }
152 
154 
155  // for SolidAgent
158  if (traction_mode == NO_SHEER && size_ts == 3)
160  else
161  s_pf_hdl = -1;
162 
165 
166  RFC_transfer = COM_get_function_handle("RFC.least_squares_transfer");
167 
168  load_rocsurf();
169  SURF_compute_face_normals = COM_get_function_handle( "SURF.compute_element_normals");
170 
171  MAN_DEBUG(3, ("LoadTransfer_FS::init() called - traction_mode: %d size_ts: %d.\n", traction_mode, size_ts));
172 }
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)
#define COM_assertion_msg(EX, msg)
FluidAgent * fagent
int get_attribute_handle(int i)
Definition: Action.C:93
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 174 of file transfer_actions.C.

References COM_assertion_msg, COM_call_function(), RocBlas::copy, f_pf_hdl, f_tf_hdl, f_ts_hdl, MAN_DEBUG, RocBlas::mul, RocBlas::neg, NO_SHEER, RFC_transfer, s_pf_hdl, s_ts_hdl, size_ts, SURF_compute_face_normals, and traction_mode.

174  {
175  MAN_DEBUG(3, ("Rocstar: LoadTransfer_FS::run() with t:%e dt:%e.\n", t, dt));
176  // ts = tf + ( mdot*Vs
177 
178  // part 1 (POST_UPDATE_FLUID in fluid_agent.f90)
179  if (traction_mode != NO_SHEER) {
181  }
182  else { // ts is a scalar
184  }
185 
186  // part 2 (solid_agent.f90 INIT_INBUFF_SOLID())
187  if (traction_mode == NO_SHEER && size_ts == 3) {
192  }
193  else if ( traction_mode == NO_SHEER && size_ts == 1) {
195  }
196  else if (size_ts == 1) {
197  COM_assertion_msg(0, "ERROR: NOT IMPLEMENTED!");
198  }
199  else {
200  COM_assertion_msg(0, "ERROR: NOT IMPLEMENTED!");
201  }
202 }
#define COM_assertion_msg(EX, msg)
static int copy
Definition: RocBlas.h:34
static int neg
Definition: RocBlas.h:40
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
static int mul
Definition: RocBlas.h:38

Here is the call graph for this function:

Member Data Documentation

int f_pf_hdl
private

Definition at line 55 of file transfer_actions.h.

Referenced by init(), and run().

int f_tf_hdl
private

Definition at line 54 of file transfer_actions.h.

Referenced by init(), and run().

int f_ts_hdl
private

Definition at line 54 of file transfer_actions.h.

Referenced by init(), and run().

std::string f_ts_str
private

Definition at line 53 of file transfer_actions.h.

Referenced by LoadTransfer_FS().

int RFC_transfer
private

Definition at line 56 of file transfer_actions.h.

Referenced by init(), and run().

int s_pf_hdl
private

Definition at line 54 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_pf_str
private

Definition at line 53 of file transfer_actions.h.

int s_ts_hdl
private

Definition at line 54 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_ts_str
private

Definition at line 53 of file transfer_actions.h.

int size_ts
private

Definition at line 52 of file transfer_actions.h.

Referenced by init(), and run().

int SURF_compute_face_normals
private

Definition at line 57 of file transfer_actions.h.

Referenced by init(), and run().

int traction_mode
private

Definition at line 51 of file transfer_actions.h.

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


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