35 int main(
int argc,
char *argv[]) {
39 cout <<
"Usage: " << argv[0] <<
" <im_file> [hdf_prefix] " << endl
40 <<
"\tWrite each pane into a separate HDF file." << std::endl;
41 cout <<
"Usage: " << argv[0] <<
" <im_file> [hdf_name] " << endl
42 <<
"\tWrite all panes into one HDF file." << std::endl;
46 char *firstdot=strchr( argv[1],
'.');
47 const string wname(argv[1], firstdot? firstdot-argv[1]: strlen( argv[1]));
49 std::cout <<
"Reading surface mesh file \"" << argv[1] <<
'"' << endl;
63 if ( argc>2) fname = argv[2];
else fname = wname+
".hdf";
65 int separate_files = fname.find(
".hdf") == string::npos;
67 if ( !separate_files) {
68 std::cout <<
"Writing HDF file(s) " << fname << endl;
76 for (
int i=0;
i<npanes; ++
i) {
77 std::ostringstream ostr;
80 ostr.fill(
'0'); ostr.width(5);
81 ostr << paneIDs[
i] <<
".hdf";
83 std::cout <<
"Writing HDF file(s) " << ostr.str() << endl;
87 "000", NULL, NULL, &paneIDs[
i]);
This file contains the prototypes for Roccom API.
int read_mesh(const char *fname, const std::string &wname, Func_ptr is_local)
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_call_function(const int wf, int argc,...)
int COM_get_attribute_handle_const(const char *waname)
int main(int argc, char *argv[])
void COM_init(int *argc, char ***argv)
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)
int COM_get_function_handle(const char *wfname)
#define COM_EXTERN_MODULE(moduleName)