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

#include <basic_actions.h>

Inheritance diagram for ComputeFaceCenters:
Collaboration diagram for ComputeFaceCenters:

Public Member Functions

 ComputeFaceCenters (BurnAgent *ag, const std::string b_nc, const std::string b_cnts, const std::string b_nrml="")
 
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

BurnAgentagent
 
int b_nc_hdl
 
int b_cnts_hdl
 
int b_nrml_hdl
 
int SURF_n2f
 
int SURF_fn
 

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

Constructor & Destructor Documentation

ComputeFaceCenters ( BurnAgent ag,
const std::string  b_nc,
const std::string  b_cnts,
const std::string  b_nrml = "" 
)

Definition at line 391 of file basic_actions.C.

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

392  :
393  Action(0, (const char**)NULL, NULL, NULL, (char *)"ComputeFaceCenters"), agent(ag)
394 {
395  int io[] = {IN, OUT};
396  set_io( 2, io);
397 
398  std::string atts[3];
399  atts[0] = b_nc;
400  atts[1] = b_cnts;
401  atts[2] = b_nrml;
402  set_attr(3, atts);
403 }
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 405 of file basic_actions.C.

405  {
406 /*
407  b_nc_hdl = get_attribute_handle(0);
408  if (COM_get_attribute_handle(agent->get_surface_window()+".centers") > 0)
409  b_cnts_hdl = get_attribute_handle(1);
410  else
411  b_cnts_hdl = -1;
412 
413  load_rocsurf();
414  SURF_n2f = COM_get_function_handle( "SURF.interpolate_to_centers");
415 */
416 }
void run ( double  t,
double  dt,
double  alpha 
)
virtual

Reimplemented from Action.

Definition at line 418 of file basic_actions.C.

References agent, Action::attr, b_cnts_hdl, b_nc_hdl, b_nrml_hdl, COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), Action::get_attribute_handle(), Agent::get_surface_window(), load_rocsurf(), MAN_DEBUG, SURF_fn, and SURF_n2f.

418  {
419 
420  // ???????????
421 /*
422  double a = 0.0;
423  int level = 1;
424  agent->obtain_bc(&a, &level);
425 */
426 
428  b_cnts_hdl = -1;
429  if (COM_get_attribute_handle(agent->get_surface_window()+".centers") > 0){
431  }
432  b_nrml_hdl = -1;
433  if(COM_get_attribute_handle(agent->get_surface_window()+".normals") > 0){
435  }
436 
437  // ?????????????
438 // double zero = 0.0;
439 // agent->obtain_bc(&zero);
440 
441  if (b_cnts_hdl >= 0 || b_nrml_hdl >= 0) {
442  load_rocsurf();
443  MAN_DEBUG(3, ("Rocstar: ComputeFaceCenters::run() with t:%e dt:%e b_cnts_hdl:%d b_nrml_hdl:%d.\n", t, dt, b_cnts_hdl, b_nrml_hdl));
444  if(b_cnts_hdl >= 0){
445  SURF_n2f = COM_get_function_handle( "SURF.interpolate_to_centers");
447  }
448  if(b_nrml_hdl >= 0){
449  SURF_fn = COM_get_function_handle( "SURF.compute_element_normals");
451  }
452  }
453 }
int get_attribute_handle(int i)
Definition: Action.C:93
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
static void load_rocsurf()
std::string get_surface_window() const
Definition: Agent.h:217
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
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

Member Data Documentation

BurnAgent* agent
private

Definition at line 166 of file basic_actions.h.

Referenced by run().

int b_cnts_hdl
private

Definition at line 167 of file basic_actions.h.

Referenced by run().

int b_nc_hdl
private

Definition at line 167 of file basic_actions.h.

Referenced by run().

int b_nrml_hdl
private

Definition at line 167 of file basic_actions.h.

Referenced by run().

int SURF_fn
private

Definition at line 168 of file basic_actions.h.

Referenced by run().

int SURF_n2f
private

Definition at line 168 of file basic_actions.h.

Referenced by run().


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