38 void read_file(
const char *fname,
const string &wname,
double alpha)
40 char *lastdot=strrchr( const_cast<char *>(fname),
'.');
46 std::cout <<
"Reading file " << fname <<
" " << wname << std::endl;
54 if ( strcmp( lastdot,
".hdf")==0)
60 MPI_Comm comm_null = MPI_COMM_NULL;
61 std::string bufwin(
"bufwin");
73 int npanes, *pane_ids;
77 for (
int i=0;
i<npanes; ++
i) {
80 if ( flag==NULL || *flag>1)
97 std::cout <<
"Obtained window " << wname <<
" from file " << fname << std::endl;
105 Action( 0, (const char**)NULL, NULL, NULL, (char *)
"SurfDiver"),
106 fagent(fag), sagent(sag)
150 std::string time_str;
155 std::string fluid_wname =
outdir+
"ifluid";
156 std::string solid_wname =
outdir+
"isolid";
158 read_file( fluid_file.c_str(), fluid_wname.c_str(), 1.);
161 read_file( solid_file.c_str(), solid_wname.c_str(), 1.);
167 const char *format =
"HDF";
170 MAN_DEBUG(2,(
"Starting mesh overlay..."));
175 fluid_wname.c_str(), solid_wname.c_str(), format);
184 std::string fluid_dir =
outdir+
"ifluid";
185 std::string solid_dir =
outdir+
"isolid";
187 MAN_DEBUG(2,(
"Reload partitioned mesh overlay... "));
209 std::string time_str;
211 std::string fluid_file = fagent->
get_rocmod_name()+
"/Rocout/ifluid_"+time_str+
".txt";
212 std::string solid_file = sagent->
get_rocmod_name()+
"/Rocout/isolid_"+time_str+
".txt";
215 std::string fluid_wname = outdir+
"ifluid";
216 std::string solid_wname = outdir+
"isolid";
219 read_file( fluid_file.c_str(), fluid_wname.c_str(), 1.);
222 read_file( solid_file.c_str(), solid_wname.c_str(), 1.);
228 const char *format =
"HDF";
242 MAN_DEBUG(2,(
"Starting mesh overlay... "));
247 fluid_wname.c_str(), solid_wname.c_str(), format);
virtual void output_restart_files(double t)
virtual void output_restart_files(double t)
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
void COM_delete_window(const char *wname)
void read_file(const char *fname, const string &wname, double alpha)
std::string solid_mesh_str
void COM_set_default_communicator(MPI_Comm comm)
This file contains the prototypes for Roccom API.
void COM_get_array(const char *wa_str, int pane_id, void **addr, int *strd, int *cap)
Get the address for an attribute on a specific pane.
SurfDiver(FluidAgent *fag, SolidAgent *sag)
int COM_get_attribute_handle(const char *waname)
void COM_delete_attribute(const char *wa_str)
Delete an existing attribute.
void get_time_string(double t, std::string &s)
Coupling * get_coupling()
std::string get_rocmod_name() const
virtual void run(double t, double dt, double alpha)
virtual void run(double t, double dt, double alpha)
void _load_rocface(FluidAgent *fagent, SolidAgent *sagent, const RocmanControl_parameters *param)
void COM_window_init_done(const char *w_str, int pane_changed=true)
std::string fluid_mesh_str
void COM_clone_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Clone the subset of panes of another window of which the given pane attribute has value val...
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_set_profiling(int i)
void COM_call_function(const int wf, int argc,...)
int COM_get_attribute_handle_const(const char *waname)
void COM_delete_pane(const char *str, int pid)
int get_comm_rank() const
const RocmanControl_parameters * get_rocmancontrol_param()
void compute_overlay(FluidAgent *fagent, SolidAgent *sagent, double t)
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
void COM_free_buffer(int **buf)
MPI_Comm get_communicator() const
MPI_Comm COM_get_default_communicator()
int COM_get_function_handle(const char *wfname)