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

#include <transfer_actions.h>

Inheritance diagram for TransferSolidDensity:
Collaboration diagram for TransferSolidDensity:

Public Member Functions

 TransferSolidDensity (FluidAgent *fag, SolidAgent *sag, const std::string s_rhos, const std::string f_rhos)
 
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_rhos_str
 
std::string f_rhos_str
 
int s_rhos_hdl
 
int f_rhos_hdl
 
int RFC_transfer
 

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

Constructor & Destructor Documentation

TransferSolidDensity ( FluidAgent fag,
SolidAgent sag,
const std::string  s_rhos,
const std::string  f_rhos 
)
explicit

Definition at line 812 of file transfer_actions.C.

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

813  :
814  InterMeshTransfer(fag, sag, (char *)"TransferSolidDensity"),
815  s_rhos_str(s_rhos), f_rhos_str(f_rhos)
816 {
817  int io[] = {IN, OUT};
818  set_io( 2, io);
819 
820  std::string atts[2];
821  atts[0] = s_rhos;
822  atts[1] = f_rhos;
823  set_attr(2, atts);
824 
825  fagent->register_new_attribute(fagent->fluidBufNG, ".rhos", 'e', COM_DOUBLE, 1, "kg/(m^3)");
826 
827 /*
828  sagent->register_use_attribute( sagent->solidBuf, ".x", sagent->solidBufBase, ".nc");
829  sagent->register_clone_attribute( 0, sagent->solidBuf, ".nc", sagent->get_surface_window(), ".nc");
830 */
831 }
FluidAgent * fagent
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 833 of file transfer_actions.C.

References COM_get_function_handle(), f_rhos_hdl, InterMeshTransfer::fagent, Action::get_attribute_handle(), Agent::get_coupling(), Coupling::get_rocmancontrol_param(), InterMeshTransfer::load_rocface(), MAN_DEBUG, RFC_transfer, and s_rhos_hdl.

833  {
834  MAN_DEBUG(3, ("Rocstar: TransferSolidDensity::init() with t:%e.\n", t));
837 
839 
840  RFC_transfer = COM_get_function_handle("RFC.least_squares_transfer");
841 }
void load_rocface(const RocmanControl_parameters *param)
FluidAgent * fagent
int get_attribute_handle(int i)
Definition: Action.C:93
Coupling * get_coupling()
Definition: Agent.h:213
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
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 843 of file transfer_actions.C.

References COM_call_function(), RocBlas::copy, f_rhos_hdl, InterMeshTransfer::fagent, Agent::get_coupling(), Coupling::initial_start(), MAN_DEBUG, RFC_transfer, SolidAgent::rhos_mode, s_rhos_hdl, and InterMeshTransfer::sagent.

843  {
844  int rhos_mode = sagent->rhos_mode;
845 
846  MAN_DEBUG(3, ("Rocstar: TransferSolidDensity::run() with rhs_mode=%d t:%e dt:%e alpha:%e.\n", rhos_mode, t, dt, alpha));
847 
848  if (rhos_mode == 1) // Constant density
850  else if (fagent->get_coupling()->initial_start())
852  else if (rhos_mode == 3) // Varying density
854 }
SolidAgent * sagent
FluidAgent * fagent
static int copy
Definition: RocBlas.h:34
Coupling * get_coupling()
Definition: Agent.h:213
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
int initial_start() const
Definition: Coupling.h:163
int rhos_mode
Definition: SolidAgent.h:85

Here is the call graph for this function:

Member Data Documentation

int f_rhos_hdl
private

Definition at line 170 of file transfer_actions.h.

Referenced by init(), and run().

std::string f_rhos_str
private

Definition at line 169 of file transfer_actions.h.

int RFC_transfer
private

Definition at line 171 of file transfer_actions.h.

Referenced by init(), and run().

int s_rhos_hdl
private

Definition at line 170 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_rhos_str
private

Definition at line 169 of file transfer_actions.h.


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