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

#include <transfer_actions.h>

Inheritance diagram for GetDeformedMesh_ALE:
Collaboration diagram for GetDeformedMesh_ALE:

Public Member Functions

 GetDeformedMesh_ALE (FluidAgent *fag, SolidAgent *sag, const std::string s_x, const std::string uhat, const std::string s_y, double z)
 
void init (double t)
 
void run (double t, double dt, double alpha)
 
- Public Member Functions inherited from InterMeshTransfer
 InterMeshTransfer (FluidAgent *fag, SolidAgent *sag, char *name=NULL)
 
- 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

std::string s_x_str
 
std::string s_uhat_str
 
std::string s_y_str
 
int s_x_hdl
 
int s_uhat_hdl
 
int s_y_hdl
 
int s_rb_hdl
 
int s_mdot_hdl
 
int s_areas_hdl
 
int s_rhos_hdl
 
int withALE
 
double zoom
 
int SURF_compute_bounded_volumes
 
int SURF_compute_face_areas
 

Additional Inherited Members

- Protected Types inherited from Action
enum  { IN =1, OUT =2, INOUT =3 }
 
- Protected Member Functions inherited from InterMeshTransfer
void load_rocface (const RocmanControl_parameters *param)
 
- 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 InterMeshTransfer
FluidAgentfagent
 
SolidAgentsagent
 
- 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 107 of file transfer_actions.h.

Constructor & Destructor Documentation

GetDeformedMesh_ALE ( FluidAgent fag,
SolidAgent sag,
const std::string  s_x,
const std::string  uhat,
const std::string  s_y,
double  z 
)
explicit

Definition at line 521 of file transfer_actions.C.

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

521  :
522  InterMeshTransfer(fag, sag, (char *)"GetDeformedMesh_ALE"),
523  s_x_str(s_x), s_uhat_str(s_uhat), s_y_str(s_y), zoom(z)
524 {
525  int io[] = {IN, IN, OUT};
526  set_io( 3, io);
527 
528  std::string atts[4];
529  atts[0] = s_x;
530  atts[1] = s_uhat;
531  atts[2] = s_y;
532  set_attr(3, atts);
533 
534 /*
535  // register attributes
536  std::string::size_type pos = s_x_str.find( ".");
537  COM_assertion_msg(pos!=std::string::npos, "GetDeformedMesh_ALE::create_attribute failed!");
538  std::string s = s_x_str.substr( 0, pos);
539  std::string x = s_x_str.substr( pos, s_x_str.size());
540  sagent->register_use_attribute( s, x, sagent->solidBufBase, ".nc");
541 
542  // s_y = solidBuf+".nc"
543  pos = s_y_str.find( ".");
544  COM_assertion_msg(pos!=std::string::npos, "GetDeformedMesh_ALE::create_attribute failed!");
545  s = s_y_str.substr( 0, pos);
546  std::string y = s_y_str.substr( pos, s_y_str.size());
547  sagent->register_clone_attribute( 0, s, y, sagent->get_surface_window(), y);
548 */
549 }
void int int int REAL REAL REAL * z
Definition: write.cpp:76
void set_io(int n, const int *io)
Definition: Action.h:70
InterMeshTransfer(FluidAgent *fag, SolidAgent *sag, char *name=NULL)
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 551 of file transfer_actions.C.

References RocBlas::add, COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), Action::get_attribute_handle(), load_rocsurf(), s_areas_hdl, s_mdot_hdl, s_rb_hdl, s_rhos_hdl, s_uhat_hdl, s_x_hdl, s_y_hdl, InterMeshTransfer::sagent, SolidAgent::solidBuf, SURF_compute_bounded_volumes, SURF_compute_face_areas, SolidAgent::withALE, and withALE.

551  {
555 
557 
562 
563  load_rocsurf();
564  SURF_compute_bounded_volumes = COM_get_function_handle( "SURF.compute_bounded_volumes");
565  SURF_compute_face_areas = COM_get_function_handle( "SURF.compute_element_areas");
566 
567 #if 0
568  // POST_INIT_SOLID
570  // initial_start ?????
571  if (t == 0.0) {
572 // double alpha = 0.0;
573 // ????????????????? strange bug called in bcinitscheduler::init()
574 // sagent->obtain_bc(&alpha);
575  }
576 #endif
577 }
SolidAgent * sagent
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
static int add
Definition: RocBlas.h:35
std::string solidBuf
Definition: SolidAgent.h:68
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
static void load_rocsurf()
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

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

Reimplemented from Action.

Definition at line 580 of file transfer_actions.C.

References RocBlas::add, COM_call_function(), RocBlas::copy, RocBlas::div, RocBlas::div_scalar, InterMeshTransfer::fagent, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), MAN_DEBUG, RocBlas::maxof_scalar, RocBlas::min_scalar_MPI, MPI_COMM_SELF, MPI_COMM_WORLD, RocBlas::mul, RocmanControl_parameters::PROP_fom, s_areas_hdl, s_mdot_hdl, s_rb_hdl, s_rhos_hdl, s_uhat_hdl, s_x_hdl, s_y_hdl, SURF_compute_bounded_volumes, SURF_compute_face_areas, withALE, and zoom.

580  {
581  MAN_DEBUG(3, ("Rocstar: calling GetDeformedMesh_ALE::run() with t:%e dt:%e alpha:%e withALE=%d zoom=%e.\n", t, dt, alpha, withALE, zoom));
582 
583  double mdot_min;
584 
586  // compute volumes only for faces with nonzero burning rate
588 
589  //debug_print(sagent->solidBuf+".nc", 202, 1);
590  //debug_print(sagent->solidBuf+".x", 202, 1);
591 
592  // Compute mass injection using s_x and s_y as buffers.
593  // So far s_y stores the undeformed configuration s_x.
594  int one = 1;
596 
597  //debug_print(sagent->solidBuf+".nc", 202, 1);
598  //debug_print(attr[2], 202, 1);
599 
600 #if 0
601  // Check whether the burning rates are nonnegative.
602  int comm = MPI_COMM_SELF;
604 
605  if ( mdot_min < 0) {
606  printf("Rocstar ERROR: Negative mdot found %e. Aborting...\n", mdot_min);
607  MPI_Abort( MPI_COMM_WORLD, -1);
608  }
609 #else
610  double zero = 0.0;
612 #endif
613 
614  // Compute deformed configuration
617 
618  // Compute mdot=dV*rhos/area/dt
622  }
623  else {
624  // Compute deformed configuration
626  // Compute mdot as rb*rhos
627  if ( withALE)
629  }
630 }
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_SELF
static int min_scalar_MPI
Definition: RocBlas.h:49
FluidAgent * fagent
static int copy
Definition: RocBlas.h:34
static int div
Definition: RocBlas.h:39
static int add
Definition: RocBlas.h:35
Coupling * get_coupling()
Definition: Agent.h:213
static int maxof_scalar
Definition: RocBlas.h:52
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184
static int mul
Definition: RocBlas.h:38
static int div_scalar
Definition: RocBlas.h:46

Here is the call graph for this function:

Member Data Documentation

int s_areas_hdl
private

Definition at line 115 of file transfer_actions.h.

Referenced by init(), and run().

int s_mdot_hdl
private

Definition at line 115 of file transfer_actions.h.

Referenced by init(), and run().

int s_rb_hdl
private

Definition at line 115 of file transfer_actions.h.

Referenced by init(), and run().

int s_rhos_hdl
private

Definition at line 115 of file transfer_actions.h.

Referenced by init(), and run().

int s_uhat_hdl
private

Definition at line 114 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_uhat_str
private

Definition at line 113 of file transfer_actions.h.

int s_x_hdl
private

Definition at line 114 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_x_str
private

Definition at line 113 of file transfer_actions.h.

int s_y_hdl
private

Definition at line 114 of file transfer_actions.h.

Referenced by init(), and run().

std::string s_y_str
private

Definition at line 113 of file transfer_actions.h.

int SURF_compute_bounded_volumes
private

Definition at line 118 of file transfer_actions.h.

Referenced by init(), and run().

int SURF_compute_face_areas
private

Definition at line 118 of file transfer_actions.h.

Referenced by init(), and run().

int withALE
private

Definition at line 116 of file transfer_actions.h.

Referenced by init(), and run().

double zoom
private

Definition at line 117 of file transfer_actions.h.

Referenced by run().


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