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

#include <Action.h>

Inheritance diagram for SchedulerAction:
Collaboration diagram for SchedulerAction:

Public Member Functions

 SchedulerAction (Scheduler *s, int n, const char *at[], int i[], void *p=0, char *name=NULL)
 
virtual ~SchedulerAction ()
 
virtual void declare (Scheduler &)=0
 
virtual void init (double t)
 
virtual void run (double t, double dt, double alpha)
 
virtual void finalize ()
 
virtual void print (FILE *f, char *container_name)
 
virtual void print_toposort (FILE *f)
 
virtual void schedule ()
 
- 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 char * name ()
 
void set_name (const char *name)
 
virtual void print (FILE *f)
 

Private Attributes

Schedulersched
 

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 78 of file Action.h.

Constructor & Destructor Documentation

SchedulerAction ( Scheduler s,
int  n,
const char *  at[],
int  i[],
void *  p = 0,
char *  name = NULL 
)
inline

Definition at line 83 of file Action.h.

83 : Action(n, at, i, p, name), sched(s) {}
virtual char * name()
Definition: Action.h:53
blockLoc i
Definition: read.cpp:79
const NT & n
Action(void *p=0, char *name=NULL)
Definition: Action.C:32
Scheduler * sched
Definition: Action.h:81
~SchedulerAction ( )
virtual

Definition at line 119 of file Action.C.

References sched.

119  {
120  if ( sched) delete sched;
121 }
Scheduler * sched
Definition: Action.h:81

Member Function Documentation

virtual void declare ( Scheduler )
pure virtual

Reimplemented from Action.

Implemented in ActionE.

void finalize ( )
virtual

Reimplemented from Action.

Definition at line 138 of file Action.C.

References Scheduler::finalize_actions(), and sched.

139 {
141 }
void finalize_actions()
Definition: Scheduler.C:351
Scheduler * sched
Definition: Action.h:81

Here is the call graph for this function:

void init ( double  t)
virtual

Reimplemented from Action.

Definition at line 123 of file Action.C.

References Scheduler::init_actions(), and sched.

124 {
125  sched->init_actions(t);
126 }
Scheduler * sched
Definition: Action.h:81
void init_actions(double t)
Definition: Scheduler.C:324

Here is the call graph for this function:

void print ( FILE *  f,
char *  container_name 
)
virtual

Definition at line 143 of file Action.C.

References Action::name(), Scheduler::print(), and sched.

144 {
145  fprintf(f, "graph: { title: \"%s\" label: \"%s\" \n\
146  status: folded \n\
147  display_edge_labels: yes \n\
148  layoutalgorithm: tree \n\
149  scaling: maxspect \n\
150  color : red \n\
151  node.color : black \n\
152  node.textcolor : red \n\
153  node.bordercolor: black \n\
154  node.borderwidth: 1 \n\
155  edge.color : lightblue \n\
156  edge.arrowsize : 7 \n\
157  edge.thickness : 2 \n\
158  edge.fontname:\"helvO08\" \n\
159  node.label: \"no type\" \n", name(), name());
160  sched->print(f, container_name);
161  fprintf(f, "}\n");
162 }
virtual char * name()
Definition: Action.h:53
void print(const char *fname)
Definition: Scheduler.C:244
Scheduler * sched
Definition: Action.h:81

Here is the call graph for this function:

void print_toposort ( FILE *  f)
virtual

Reimplemented from Action.

Definition at line 164 of file Action.C.

References Scheduler::print_toposort(), and sched.

165 {
166  fprintf(f, "( ");
167  sched->print_toposort(f);
168  fprintf(f, ") ");
169 }
void print_toposort(FILE *f)
Definition: Scheduler.C:302
Scheduler * sched
Definition: Action.h:81

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 132 of file Action.C.

References Scheduler::run_actions(), and sched.

133 {
134  //sched->set_alpha(alpha);
135  sched->run_actions(t, dt);
136 }
Scheduler * sched
Definition: Action.h:81
void run_actions(double t, double dt)
Definition: Scheduler.C:339

Here is the call graph for this function:

void schedule ( )
virtual

Reimplemented from Action.

Definition at line 128 of file Action.C.

References sched, and Scheduler::schedule().

128  {
129  sched->schedule();
130 }
virtual void schedule()
Definition: Scheduler.C:162
Scheduler * sched
Definition: Action.h:81

Here is the call graph for this function:

Member Data Documentation

Scheduler* sched
private

Definition at line 81 of file Action.h.

Referenced by finalize(), init(), print(), print_toposort(), run(), schedule(), and ~SchedulerAction().


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