36 int main(
int argc,
char *argv[]) {
40 std::cout <<
"Usage:\n\tTo run in serial: " << argv[0]
41 <<
" <surffile> <hdffile> " << endl;
42 std::cout <<
"\n\tTo run in parallel: <mpirun-command> " << argv[0]
43 <<
" -com-mpi <Rocin control file> <hdfoutput-prefix> " << endl;
47 std::cout <<
"Reading surface mesh file \"" << argv[1] <<
'"' << endl;
49 std::string fname(argv[1]), wname;
50 string::size_type n0 = fname.find_last_of(
"/");
52 if ( n0 != std::string::npos)
53 fname = fname.substr( n0+1, fname.size());
56 ni = fname.find_first_of(
".:-*[]?\\\"\'0123456789");
59 if ( ni == std::string::npos) {
63 while (fname[ni-1]==
'_') --
ni;
64 wname = fname.substr( 0, ni);
67 std::cout <<
"Creating window \"" << wname <<
'"' << endl;
74 const string nrmls = wname+
".normals";
79 const string eval = wname+
".eval";
83 const string nval = wname+
".nval";
89 const string win1 = wname+
".win1";
96 const string win2 = wname+
".win2";
100 vs_dbl[0] = 1; vs_dbl[1] = 2; vs_dbl[2] = 3;
102 const string rks = wname+
".franks";
115 cout <<
"Testing feature detection..." << endl;
123 cout <<
"Testing elements-to-nodes..." << endl;
133 const int *
scheme; COM_get_array_const(
"SURF.E2N_ONE", 0, &scheme);
136 std::cout <<
"Computing normals..." << endl;
143 std::cout <<
"Output window into file..." << endl;
152 (
char*)wname.c_str(),
"000");
158 (
char*)wname.c_str(),
"001");
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
#define COM_assertion_msg(EX, msg)
double eval(const char *const expression, const double x=0, const double y=0, const double z=0, const double v=0)
Evaluate math expression.
void COM_set_size(const char *wa_str, int pane_id, int size, int ng=0)
Set sizes of for a specific attribute.
This file contains the prototypes for Roccom API.
int COM_get_attribute_handle(const char *waname)
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_call_function(const int wf, int argc,...)
int main(int argc, char *argv[])
void COM_init(int *argc, char ***argv)
void int int REAL REAL REAL *z blockDim dim * ni
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
int read_winmesh(const char *fname, const std::string &wname, bool del=true)
#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)