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

#include <basic_actions.h>

Inheritance diagram for CopyValue:
Collaboration diagram for CopyValue:

Public Member Functions

 CopyValue (const std::string from, const std::string to, int *cond=NULL)
 
void init (double t)
 
void run (double t, double dt, double alpha)
 
- 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 from_hdl
 
int to_hdl
 
int * condition
 

Additional Inherited Members

- Protected Types inherited from Action
enum  { IN =1, OUT =2, INOUT =3 }
 
- 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 Action
char * action_name
 
char ** attr
 
int * idx
 
int count
 
void * usr_ptr
 
std::vector< int > inout
 

Detailed Description

Definition at line 56 of file basic_actions.h.

Constructor & Destructor Documentation

CopyValue ( const std::string  from,
const std::string  to,
int *  cond = NULL 
)

Definition at line 59 of file basic_actions.C.

References Action::IN, Action::OUT, Action::set_attr(), and Action::set_io().

59  :
60  Action( 0, (const char**)NULL, NULL, NULL, (char *)"CopyValue"), condition(cond)
61 {
62  // Define I/O of the arguments.
63  int io[] = {IN, OUT};
64  set_io( 2, io);
65 
66  std::string atts[2];
67  atts[0] = from;
68  atts[1] = to;
69  set_attr(2, atts);
70 }
int * condition
Definition: basic_actions.h:63
void set_io(int n, const int *io)
Definition: Action.h:70
Action(void *p=0, char *name=NULL)
Definition: Action.C:32
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 73 of file basic_actions.C.

References from_hdl, Action::get_attribute_handle(), and to_hdl.

73  {
76 }
int get_attribute_handle(int i)
Definition: Action.C:93

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 78 of file basic_actions.C.

References Action::attr, COM_call_function(), condition, RocBlas::copy, from_hdl, MAN_DEBUG, and to_hdl.

78  {
79  MAN_DEBUG(3, ("Rocstar: CopyValue::run() %s => %s.\n", attr[0], attr[1]));
80  if (!condition || *condition)
82 }
int * condition
Definition: basic_actions.h:63
static int copy
Definition: RocBlas.h:34
char ** attr
Definition: Action.h:37
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
#define MAN_DEBUG(l, x)
Definition: rocman.h:98

Here is the call graph for this function:

Member Data Documentation

int* condition
private

Definition at line 63 of file basic_actions.h.

Referenced by run().

int from_hdl
private

Definition at line 62 of file basic_actions.h.

Referenced by init(), and run().

int to_hdl
private

Definition at line 62 of file basic_actions.h.

Referenced by init(), and run().


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