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

#include <basic_actions.h>

Inheritance diagram for SolidPropagateSurface_ALE:
Collaboration diagram for SolidPropagateSurface_ALE:

Public Member Functions

 SolidPropagateSurface_ALE (SolidAgent *ag, const std::string p_rb, const std::string a_vbar, 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

SolidAgentsagent
 
double zoom
 
int p_rb_hdl
 
int b_rb_hdl
 
int p_pmesh_hdl
 
int p_vm_hdl
 
int p_vbar_hdl
 
int a_vbar_hdl
 
int p_cnstr_hdl
 
int p_pos_hdl
 
int MAP_reduce_maxabs
 
int PROP_propagate
 
int PROPCON_find_intersections
 
int PROPCON_constrain_displacements
 

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

Constructor & Destructor Documentation

SolidPropagateSurface_ALE ( SolidAgent ag,
const std::string  p_rb,
const std::string  a_vbar,
double  z 
)

Definition at line 937 of file basic_actions.C.

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

938  :
939  Action(0, (const char**)NULL, NULL, NULL, (char *)"SolidPropagateSurface"),
940  sagent(fag), zoom(z)
941 {
942  int io[] = {IN, OUT};
943  set_io( 2, io);
944 
945  std::string atts[2];
946  atts[0] = p_rb;
947  atts[1] = a_vbar;
948  set_attr(2, atts);
949 
950 /*
951  fagent->register_new_attribute( fagent->propBufAll, ".vm", 'n', COM_DOUBLE, 3, "m/s");
952  fagent->register_new_attribute( fagent->propBufAll, ".rb", 'e', COM_DOUBLE, 1, "m/s");
953 */
954 }
void int int int REAL REAL REAL * z
Definition: write.cpp:76
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 956 of file basic_actions.C.

References a_vbar_hdl, COM_get_attribute_handle(), COM_get_function_handle(), COM_get_window_handle(), Action::get_attribute_handle(), Agent::get_communicator(), Agent::get_coupling(), Coupling::get_rocmancontrol_param(), load_rocmap(), load_rocon(), load_rocprop(), MAP_reduce_maxabs, p_cnstr_hdl, p_pmesh_hdl, p_pos_hdl, p_rb_hdl, p_vbar_hdl, p_vm_hdl, RocmanControl_parameters::PROP_fom, PROP_propagate, SolidAgent::propBuf, SolidAgent::propBufAll, PROPCON_constrain_displacements, PROPCON_find_intersections, sagent, and SolidAgent::withALE.

956  {
957 
958  if (sagent->withALE == 0) return;
959 
962 
963  std::string propBuf = sagent->propBufAll;
964  int PROP_fom = sagent->get_coupling()->get_rocmancontrol_param()->PROP_fom;
965  if (!PROP_fom) propBuf = sagent->propBuf;
966  p_vbar_hdl = COM_get_attribute_handle( propBuf+".vbar");
967  p_pmesh_hdl = COM_get_attribute_handle( propBuf+".pmesh");
968  p_vm_hdl = COM_get_attribute_handle( propBuf+".vm");
969  p_cnstr_hdl = COM_get_attribute_handle( propBuf+".cflag");
970  p_pos_hdl = COM_get_attribute_handle( propBuf+".positions");
971  //p_cnstr_type = COM_get_attribute_handle( propBuf+".cnstr_type");
972 
975  PROP_propagate = COM_get_function_handle("PROP.propagate");
976  if(COM_get_window_handle("PROPCON") >= 0){
977  PROPCON_find_intersections = COM_get_function_handle("PROPCON.find_intersections");
978  PROPCON_constrain_displacements = COM_get_function_handle("PROPCON.constrain_displacements");
979  }
980  else {
983  }
984  load_rocmap();
985  MAP_reduce_maxabs = COM_get_function_handle("MAP.reduce_maxabs_on_shared_nodes");
986 }
static void load_rocprop(const RocmanControl_parameters *param, MPI_Comm comm)
int withALE
Definition: SolidAgent.h:84
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 propBuf
Definition: SolidAgent.h:70
static void load_rocmap()
Coupling * get_coupling()
Definition: Agent.h:213
std::string propBufAll
Definition: SolidAgent.h:69
int COM_get_window_handle(const char *wname)
Definition: roccom_c++.h:404
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184
MPI_Comm get_communicator() const
Definition: Agent.h:220
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
static void load_rocon(const RocmanControl_parameters *param, MPI_Comm comm)

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 988 of file basic_actions.C.

References a_vbar_hdl, COM_call_function(), RocBlas::copy_scalar, RocBlas::div_scalar, Agent::get_communicator(), Agent::get_coupling(), Coupling::initial_start(), man_verbose, MAP_reduce_maxabs, RocBlas::neg, p_pmesh_hdl, p_rb_hdl, p_vbar_hdl, PROP_propagate, rank, sagent, SolidAgent::withALE, and zoom.

989 {
990  if (sagent->withALE == 0) return;
991 
992  int rank = 0;
993  MPI_Comm mycomm = sagent->get_communicator();
994  MPI_Comm_rank(mycomm,&rank);
995  if(!rank && man_verbose > 1)
996  std::cout << "Rocstar: SolidPropagateSurface_ALE::run() with t:"<< t
997  << "dt:" << dt << " zoom:" << zoom << std::endl;
998 
999  if ( !sagent->get_coupling()->initial_start() && zoom>0)
1000  {
1001  COM_call_function( RocBlas::neg, &p_rb_hdl, &p_rb_hdl); // Flip the sign of burn rate
1002  double dtz = dt*zoom;
1003 
1005 
1006  if(!rank && man_verbose > 2)
1007  std::cout << "Rocstar: Rocprop done" << std::endl;
1008 
1010 
1011  // Update shared nodes for the whole surface
1013  }
1014  else {
1015  double dtz = 0;
1017  }
1018 }
int withALE
Definition: SolidAgent.h:84
static int copy_scalar
Definition: RocBlas.h:43
int man_verbose
Coupling * get_coupling()
Definition: Agent.h:213
static int neg
Definition: RocBlas.h:40
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
static int rank
Definition: advectest.C:66
MPI_Comm get_communicator() const
Definition: Agent.h:220
int initial_start() const
Definition: Coupling.h:163
static int div_scalar
Definition: RocBlas.h:46

Here is the call graph for this function:

Member Data Documentation

int a_vbar_hdl
private

Definition at line 297 of file basic_actions.h.

Referenced by init(), and run().

int b_rb_hdl
private

Definition at line 297 of file basic_actions.h.

int MAP_reduce_maxabs
private

Definition at line 299 of file basic_actions.h.

Referenced by init(), and run().

int p_cnstr_hdl
private

Definition at line 298 of file basic_actions.h.

Referenced by init().

int p_pmesh_hdl
private

Definition at line 297 of file basic_actions.h.

Referenced by init(), and run().

int p_pos_hdl
private

Definition at line 298 of file basic_actions.h.

Referenced by init().

int p_rb_hdl
private

Definition at line 297 of file basic_actions.h.

Referenced by init(), and run().

int p_vbar_hdl
private

Definition at line 297 of file basic_actions.h.

Referenced by init(), and run().

int p_vm_hdl
private

Definition at line 297 of file basic_actions.h.

Referenced by init().

int PROP_propagate
private

Definition at line 300 of file basic_actions.h.

Referenced by init(), and run().

int PROPCON_constrain_displacements
private

Definition at line 301 of file basic_actions.h.

Referenced by init().

int PROPCON_find_intersections
private

Definition at line 301 of file basic_actions.h.

Referenced by init().

SolidAgent* sagent
private

Definition at line 295 of file basic_actions.h.

Referenced by init(), and run().

double zoom
private

Definition at line 296 of file basic_actions.h.

Referenced by run().


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