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

#include <basic_actions.h>

Inheritance diagram for ComputeMeshMotion:
Collaboration diagram for ComputeMeshMotion:

Public Member Functions

 ComputeMeshMotion (FluidAgent *ag, const std::string a_vm, const std::string f_du_alp, double z)
 
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

FluidAgentfagent
 
double zoom
 
int a_vm_hdl
 
int f_du_alp_hdl
 
int f_zoom_hdl
 

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

Constructor & Destructor Documentation

ComputeMeshMotion ( FluidAgent ag,
const std::string  a_vm,
const std::string  f_du_alp,
double  z 
)

Definition at line 296 of file basic_actions.C.

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

297  :
298  Action(0, (const char**)NULL, NULL, NULL, (char *)"ComputeMeshMotion"),
299  fagent(ag), zoom(z)
300 {
301  int io[] = {IN, OUT};
302  set_io( 2, io);
303 
304  std::string atts[2];
305  atts[0] = a_vm;
306  atts[1] = f_du_alp;
307  set_attr(2, atts);
308 
309  fagent->register_new_attribute( fagent->propBufAll, ".vm", 'n', COM_DOUBLE, 3, "m/s");
310 }
std::string propBufAll
Definition: FluidAgent.h:77
void register_new_attribute(std::string target_window_, std::string attr_, char loc_, int type_, int ncomp_, const char *unit_)
Definition: Agent.C:322
void int int int REAL REAL REAL * z
Definition: write.cpp:76
void set_io(int n, const int *io)
Definition: Action.h:70
FluidAgent * fagent
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 312 of file basic_actions.C.

References a_vm_hdl, Action::attr, COM_get_attribute_handle(), f_du_alp_hdl, f_zoom_hdl, fagent, FluidAgent::fluidBufNG, Action::get_attribute_handle(), and Agent::get_surface_window().

312  {
315 
316  // can not be set earlier because surface window was unkown
317  //f_du_alp_hdl = COM_get_attribute_handle(fagent->get_surface_window()+".du_alp");
318  f_zoom_hdl = COM_get_attribute_handle(fagent->fluidBufNG+".zoomFact"); // used internally
319 }
int get_attribute_handle(int i)
Definition: Action.C:93
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
std::string get_surface_window() const
Definition: Agent.h:217
char ** attr
Definition: Action.h:37
std::string fluidBufNG
Definition: FluidAgent.h:78
FluidAgent * fagent

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 322 of file basic_actions.C.

References a_vm_hdl, COM_assertion_msg, COM_call_function(), RocBlas::copy_scalar, f_du_alp_hdl, f_zoom_hdl, MAN_DEBUG, RocBlas::mul_scalar, cimg_library::cimg::time(), and zoom.

322  {
323  MAN_DEBUG(3, ("Rocstar: ComputeMeshMotion::run() with dt:%e alpha:%e.\n", dt, alpha));
324 
325  COM_assertion_msg(alpha>=0.0, "ERROR: ComputeMeshMotion called with invalid alpha!");
326 
327 // debug_print(fagent->get_surface_window()+".du_alp", 102, 0);
328 
329  double time = alpha * dt;
331 
332 // debug_print(fagent->propBufAll+".vm", 202, 1);
333 // debug_print(fagent->get_surface_window()+".du_alp", 102, 0);
334 
335  if (f_zoom_hdl>0) {
337  }
338 }
#define COM_assertion_msg(EX, msg)
static int copy_scalar
Definition: RocBlas.h:43
static int mul_scalar
Definition: RocBlas.h:47
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
unsigned long time()
Get the value of a system timer with a millisecond precision.
Definition: CImg.h:4605
#define MAN_DEBUG(l, x)
Definition: rocman.h:98

Here is the call graph for this function:

Member Data Documentation

int a_vm_hdl
private

Definition at line 156 of file basic_actions.h.

Referenced by init(), and run().

int f_du_alp_hdl
private

Definition at line 156 of file basic_actions.h.

Referenced by init(), and run().

int f_zoom_hdl
private

Definition at line 156 of file basic_actions.h.

Referenced by init(), and run().

FluidAgent* fagent
private

Definition at line 154 of file basic_actions.h.

Referenced by ComputeMeshMotion(), and init().

double zoom
private

Definition at line 155 of file basic_actions.h.

Referenced by run().


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