30 #include "../Rocsurf/test/IM_Reader.h"
40 void read_file(
const char *fname,
const string &wname,
double alpha) {
41 char *lastdot=strrchr( const_cast<char *>(fname),
'.');
45 std::cout <<
"Reading file " << fname <<
"..." << std::endl;
52 if ( strcmp( lastdot,
".hdf")==0)
57 MPI_Comm comm_null = MPI_COMM_NULL;
58 std::string bufwin(
"bufwin");
69 int npanes, *pane_ids;
73 for (
int i=0;
i<npanes; ++
i) {
76 if ( flag==NULL || *flag>1)
92 std::cout <<
"Obtained window " << wname
93 <<
" from file " << fname << std::endl;
102 int main(
int argc,
char *argv[]) {
106 std::cerr <<
"Usage: " << argv[0]
107 <<
" <HDF|RocinControlFile1> <HDF|RocinControlFile2> [<out_prefix>] [<RocfaceControlFile>]\n\n"
108 <<
"\t<HDF|RocinControl File1> specifies the files for the first window\n"
109 <<
"\t<HDF|RocinControl File2> specifies the files for the second window\n"
110 <<
"\t<out_prefix> specifies a prefix for output files. \n\t\tDefault is the current directory\n"
111 <<
"\t<RocfaceControlFile> specifies a file name for Rocface control parameters. \n"
113 << argv[0] <<
" \"ifluid*.hdf\" \"isolid*.hdf\" " <<
"\n\t\t"
114 << argv[0] <<
" Rocflo/Rocin/\"ifluid*.txt\" Rocfrac/Rocin/\"isolid*.txt\" Rocman/RocfloRocfrac/" <<
"\n\t\t"
119 if ( argc >= 2 && strcmp( argv[1],
"-h") == 0) {
120 std::cout <<
"Usage: " << argv[0] <<
" [-v]"
134 string fnames[2] = {string(argv[1]), string(argv[2])};
135 const string wnames[2] = {string(
"solid"), string(
"fluid")};
137 for (
int k=0;
k<2; ++
k) {
171 initial = atoi(argv[2]);
172 if (initial<0) initial = 0;
174 std::sprintf( buf,
"%05d", initial);
176 int MAP_compute_face_normals =
178 int MAP_compute_nodal_normals =
191 &w1_flux, wnames[0].c_str(), buf);
193 &w2_flux, wnames[1].c_str(), buf);
200 &w1_flux, wnames[0].c_str(), buf);
205 &w2_flux, wnames[1].c_str(), buf);
218 for (
int i=initial;
i<1; ++
i) {
235 std::sprintf( buf,
"%05d",
i+1);
237 &w1_flux, wnames[0].c_str(), buf);
239 &w2_flux, wnames[1].c_str(), buf);
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
void COM_delete_window(const char *wname)
void read_file(const char *fname, const string &wname, double alpha)
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.
int COM_get_attribute_handle(const char *waname)
void COM_delete_attribute(const char *wa_str)
Delete an existing attribute.
#define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
void COM_print_profile(const char *fname, const char *header)
void COM_set_profiling_barrier(int hdl, MPI_Comm comm)
void COM_window_init_done(const char *w_str, int pane_changed=true)
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 main(int argc, char *argv[])
void COM_delete_pane(const char *str, int pid)
void COM_init(int *argc, char ***argv)
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
void COM_free_buffer(int **buf)
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
void COM_resize_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=-1, int cap=0)
Resize an attribute on a specific pane and return the address by setting addr.
int COM_get_function_handle(const char *wfname)
#define COM_EXTERN_MODULE(moduleName)