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

#include <transfer_actions.h>

Inheritance diagram for MeshMotionTransferISS:
Collaboration diagram for MeshMotionTransferISS:

Public Member Functions

 MeshMotionTransferISS (FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string s_vs, const std::string f_vm)
 
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

std::string s_u_str
 
std::string s_vs_str
 
std::string f_vm_str
 
int s_u_hdl
 
int s_vs_hdl
 
int f_vm_hdl
 
int f_u_hdl
 
int f_vs_hdl
 
int f_uold_hdl
 
int f_vsold_hdl
 
int f_utmp_hdl
 
int f_vtmp_hdl
 
int RFC_interpolate
 

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 148 of file transfer_actions.h.

Constructor & Destructor Documentation

MeshMotionTransferISS ( FluidAgent fag,
SolidAgent sag,
const std::string  s_u,
const std::string  s_vs,
const std::string  f_vm 
)
explicit

Definition at line 736 of file transfer_actions.C.

References COM_assertion_msg, COM_DOUBLE, f_vm_str, InterMeshTransfer::fagent, FluidAgent::fluidBufNG, Action::IN, Action::OUT, Agent::register_clone_attribute(), Agent::register_new_attribute(), Action::set_attr(), and Action::set_io().

736  :
737  InterMeshTransfer(fag, sag, (char *)"MeshMotionTransferISS"),
738  s_u_str(s_u), s_vs_str(s_vs), f_vm_str(f_vm)
739 {
740  // isolid_i+".u" (in), isolid_i+".vs" (in), ifluid_i+".vm" (out)
741  int io[] = {IN, IN, OUT};
742  set_io( 3, io);
743 
744  std::string atts[3];
745  atts[0] = s_u;
746  atts[1] = s_vs;
747  atts[2] = f_vm;
748  set_attr(3, atts);
749 
750  std::string::size_type pos = f_vm_str.find( ".");
751  COM_assertion_msg(pos!=std::string::npos, "MeshMotionTransferISS failed!");
752  std::string f = f_vm_str.substr( 0, pos);
753  std::string vm = f_vm_str.substr( pos, f_vm_str.size());
754  fagent->register_new_attribute( f, vm, 'n', COM_DOUBLE, 3, "m/s");
755  // used internally
758  // avoid vs because vs is 'e'
763 }
#define COM_assertion_msg(EX, msg)
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 fluidBufNG
Definition: FluidAgent.h:78
void set_io(int n, const int *io)
Definition: Action.h:70
InterMeshTransfer(FluidAgent *fag, SolidAgent *sag, char *name=NULL)
void set_attr(int n, const std::string at[], int *id=NULL)
Definition: Action.C:66

Here is the call graph for this function:

Member Function Documentation

void init ( double  t)
virtual

Reimplemented from Action.

Definition at line 765 of file transfer_actions.C.

References COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), RocBlas::copy_scalar, f_u_hdl, f_uold_hdl, f_utmp_hdl, f_vm_hdl, f_vs_hdl, f_vsold_hdl, f_vtmp_hdl, InterMeshTransfer::fagent, FluidAgent::fluidBufNG, Action::get_attribute_handle(), Agent::get_coupling(), Coupling::get_rocmancontrol_param(), InterMeshTransfer::load_rocface(), RFC_interpolate, s_u_hdl, and s_vs_hdl.

765  {
769 
776 
777  // set zero
778  double zero = 0.0;
781 
783  RFC_interpolate = COM_get_function_handle("RFC.interpolate");
784 }
void load_rocface(const RocmanControl_parameters *param)
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
static int copy_scalar
Definition: RocBlas.h:43
Coupling * get_coupling()
Definition: Agent.h:213
std::string fluidBufNG
Definition: FluidAgent.h:78
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
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 787 of file transfer_actions.C.

References RocBlas::add, COM_call_function(), RocBlas::copy, RocBlas::div_scalar, f_u_hdl, f_uold_hdl, f_utmp_hdl, f_vm_hdl, f_vs_hdl, f_vsold_hdl, f_vtmp_hdl, MAN_DEBUG, RocBlas::mul_scalar, RFC_interpolate, s_u_hdl, s_vs_hdl, and RocBlas::sub.

787  {
788  MAN_DEBUG(3, ("Rocstar: calling MeshMotionTransferISS::run() with t:%e dt:%e.\n", t, dt));
789  // fomular: Vm = (un-un-1)/deltaT + (vsn - vsn-1) /2
790 
793 
795 
797 
799 
800  double half = 0.5;
802 
804 
805  // save copies
808 }
static int copy
Definition: RocBlas.h:34
static int add
Definition: RocBlas.h:35
static int mul_scalar
Definition: RocBlas.h:47
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
static int sub
Definition: RocBlas.h:36
static int div_scalar
Definition: RocBlas.h:46

Here is the call graph for this function:

Member Data Documentation

int f_u_hdl
private

Definition at line 156 of file transfer_actions.h.

Referenced by init(), and run().

int f_uold_hdl
private

Definition at line 157 of file transfer_actions.h.

Referenced by init(), and run().

int f_utmp_hdl
private

Definition at line 157 of file transfer_actions.h.

Referenced by init(), and run().

int f_vm_hdl
private

Definition at line 155 of file transfer_actions.h.

Referenced by init(), and run().

std::string f_vm_str
private

Definition at line 154 of file transfer_actions.h.

Referenced by MeshMotionTransferISS().

int f_vs_hdl
private

Definition at line 156 of file transfer_actions.h.

Referenced by init(), and run().

int f_vsold_hdl
private

Definition at line 157 of file transfer_actions.h.

Referenced by init(), and run().

int f_vtmp_hdl
private

Definition at line 157 of file transfer_actions.h.

Referenced by init(), and run().

int RFC_interpolate
private

Definition at line 158 of file transfer_actions.h.

Referenced by init(), and run().

int s_u_hdl
private

Definition at line 155 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_u_str
private

Definition at line 154 of file transfer_actions.h.

int s_vs_hdl
private

Definition at line 155 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_vs_str
private

Definition at line 154 of file transfer_actions.h.


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