Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Coupling.C File Reference
#include "rocman.h"
Include dependency graph for Coupling.C:

Go to the source code of this file.

Functions

 COM_EXTERN_MODULE (Rocblas)
 
 COM_EXTERN_MODULE (Rocface)
 
 COM_EXTERN_MODULE (Rocsurf)
 
 COM_EXTERN_MODULE (Rocprop)
 
void RocstarShutdown (int=0)
 
void _load_rocface (FluidAgent *fagent, SolidAgent *sagent, const RocmanControl_parameters *param)
 

Function Documentation

void _load_rocface ( FluidAgent fagent,
SolidAgent sagent,
const RocmanControl_parameters param 
)

Definition at line 43 of file transfer_actions.C.

Referenced by SurfDiver::init(), InterMeshTransfer::load_rocface(), and FullyCoupling::reload_rocface().

44 {
45  int rank = fagent->get_comm_rank();
46 
47  // INIT_ROCFACE of rocman.f90
48  if (COM_get_window_handle( "RFC") <=0 ) {
49  if(rank == 0)
50  MAN_DEBUG(3, ("Rocstar: load module RocFace.\n"));
51  COM_LOAD_MODULE_STATIC_DYNAMIC( Rocface, "RFC");
52 
53  int RFC_setv = COM_get_function_handle( "RFC.set_verbose");
54  COM_call_function( RFC_setv, &param->rfc_verb);
55 
56 #if 0
57  // if remeshed
58  MAN_DEBUG(3, ("Rocstar: remeshed: %d.\n", param->remeshed));
59  if (param->remeshed) {
60  double t = fagent->get_coupling()->get_control_param()->current_time;
61  compute_overlay( fagent, sagent, t);
62  }
63 #endif
64 
65  // load overlay
66  MPI_Comm comm = fagent->get_communicator();
67 
68  int RFC_read = COM_get_function_handle( "RFC.read_overlay");
69  int fluid_mesh = COM_get_attribute_handle_const( fagent->fluidBufNG+".mesh");
70  int solid_mesh = COM_get_attribute_handle_const( sagent->solidBuf+".mesh");
71  std::string rfc_dir = "Rocman/"+fagent->get_modinstance_name()+sagent->get_modinstance_name()+"/";
72  //std::string rfc_dir = "Rocman/RocfloRocsolid/";
73  std::string fluid_dir = rfc_dir+"ifluid";
74  std::string solid_dir = rfc_dir+"isolid";
75 
76  if(rank == 0)
77  MAN_DEBUG(2, ("Rocstar: read RocFace overlay mesh from %s.\n", rfc_dir.c_str()));
78 
79  //COM_call_function( RFC_read, &fluid_mesh, &solid_mesh, &comm, fluid_dir.c_str(), solid_dir.c_str(), "HDF");
80  COM_call_function( RFC_read, &fluid_mesh, &solid_mesh, &comm, fluid_dir.c_str(), solid_dir.c_str(), "CGNS");
81 
82  int RFC_transfer = COM_get_function_handle("RFC.least_squares_transfer");
83  int RFC_interpolate = COM_get_function_handle("RFC.interpolate");
84  COM_set_profiling_barrier( RFC_transfer, comm);
85  COM_set_profiling_barrier( RFC_interpolate, comm);
86  }
87 }
std::string get_modinstance_name() const
Definition: Agent.h:222
Coupling * get_coupling()
Definition: Agent.h:213
std::string fluidBufNG
Definition: FluidAgent.h:78
std::string solidBuf
Definition: SolidAgent.h:68
void COM_set_profiling_barrier(int hdl, MPI_Comm comm)
Definition: roccom_c++.h:554
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
int COM_get_attribute_handle_const(const char *waname)
Definition: roccom_c++.h:420
int COM_get_window_handle(const char *wname)
Definition: roccom_c++.h:404
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
int get_comm_rank() const
Definition: Agent.h:224
double current_time
Definition: Coupling.h:54
void compute_overlay(FluidAgent *fagent, SolidAgent *sagent, double t)
Definition: Surfdiver.C:192
static int rank
Definition: advectest.C:66
MPI_Comm get_communicator() const
Definition: Agent.h:220
const Control_parameters * get_control_param()
Definition: Coupling.h:183
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:111
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the caller graph for this function:

COM_EXTERN_MODULE ( Rocblas  )
COM_EXTERN_MODULE ( Rocface  )
COM_EXTERN_MODULE ( Rocsurf  )
COM_EXTERN_MODULE ( Rocprop  )
void RocstarShutdown ( int  status = 0)

Definition at line 59 of file rocstar_driver.C.

References COM_finalize().

Referenced by Coupling::Interrupt(), and Coupling::ProcessInterrupt().

60 {
61  /* Finalize Roccom. */
62  COM_finalize();
63 #ifdef ROCPROF
64  Rocprof_Finalize(true);
65 #endif
66  /* Close down MPI. */
67  MPI_Finalize();
68  exit(status);
69 }
void COM_finalize()
Definition: roccom_c++.h:59

Here is the call graph for this function:

Here is the caller graph for this function: