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

#include <Agent.h>

Inheritance diagram for PhysicsAction:
Collaboration diagram for PhysicsAction:

Public Member Functions

 PhysicsAction (Agent *ag)
 
void run (double t, double dt, double alpha)
 
void declare (Scheduler &)
 
virtual void print (FILE *f)
 
virtual char * name ()
 
- 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 init (double t)
 
virtual void finalize ()
 
void set_name (const char *name)
 
virtual void print_toposort (FILE *f)
 
virtual void schedule ()
 

Private Attributes

Agentagent
 

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 99 of file Agent.h.

Constructor & Destructor Documentation

PhysicsAction ( Agent ag)
inline

Definition at line 103 of file Agent.h.

103 : Action(0, (const char **)NULL, NULL, NULL, (char *)"PhysicsAction"), agent(ag) {}
Agent * agent
Definition: Agent.h:101
Action(void *p=0, char *name=NULL)
Definition: Action.C:32

Member Function Documentation

void declare ( Scheduler )
inlinevirtual

Reimplemented from Action.

Definition at line 105 of file Agent.h.

105 {}
char * name ( )
virtual

Reimplemented from Action.

Definition at line 80 of file Agent.C.

References agent, and Agent::get_agent_name().

81 {
82  return (char *)agent->get_agent_name().c_str();
83 }
std::string get_agent_name() const
Definition: Agent.h:223
Agent * agent
Definition: Agent.h:101

Here is the call graph for this function:

void print ( FILE *  f)
virtual

Reimplemented from Action.

Definition at line 75 of file Agent.C.

References agent, and Agent::print().

76 {
77  agent->print(f);
78 }
void print(FILE *f)
Definition: Agent.C:762
Agent * agent
Definition: Agent.h:101

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 50 of file Agent.C.

References agent, Agent::bc_handle, COM_call_function(), Agent::comm_rank, Agent::current_deltatime, Agent::current_time, Agent::get_agent_name(), Agent::get_coupling(), Coupling::get_ipc(), Agent::gm_handle, MAN_DEBUG, Agent::old_dt, Agent::run_bcinitaction(), Agent::timestamp, Agent::update_handle, and Agent::withgm.

51 {
52  MAN_DEBUG(3, ("[%d] Rocstar: Agent %s::PhysicsAction run with t:%e dt:%e alpha:%e.\n", agent->comm_rank, agent->get_agent_name().c_str(), t, dt, alpha));
53 
54  // store it, gm callback needs it
56  agent->timestamp = t;
57 
58  if (agent->get_coupling()->get_ipc() == 1)
59  agent->old_dt = dt;
60 
61  // include Interpolate::backup
62  agent->run_bcinitaction(t, dt);
63 
64  //
65  if(!agent->withgm)
67  &agent->bc_handle);
68  else
71 
72  agent->current_time = t;
73 }
double current_deltatime
Definition: Agent.h:144
void run_bcinitaction(double t, double dt)
Definition: Agent.C:562
int bc_handle
Definition: Agent.h:136
int get_ipc() const
Definition: Coupling.h:160
std::string get_agent_name() const
Definition: Agent.h:223
int gm_handle
Definition: Agent.h:136
int update_handle
Definition: Agent.h:131
Coupling * get_coupling()
Definition: Agent.h:213
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
Agent * agent
Definition: Agent.h:101
double current_time
Definition: Agent.h:144
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
double timestamp
Definition: Agent.h:144
double old_dt
Definition: Agent.h:144
int comm_rank
Definition: Agent.h:130
bool withgm
Definition: Agent.h:137

Here is the call graph for this function:

Member Data Documentation

Agent* agent
private

Definition at line 101 of file Agent.h.

Referenced by name(), print(), and run().


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