31 #include "SurfaceProjection.h"
38 const std::string& file_in)
43 double total_nodes =0;
56 cerr <<
"Window " << wName <<
" has " << nPanes <<
" panes." << endl;
59 for (
unsigned int i=0;
i<ps.size(); ++
i)
62 nc = pn->coordinates();
63 unsigned int n = pn->size_of_real_nodes();
65 SurfaceProjector_Pane sp(pn);
68 <<
" projecting " << pn->size_of_real_nodes() <<
" nodes."
72 for(
unsigned int j=0;
j < pn->size_of_real_nodes();
j++)
81 dist = sp.project_point(p,q);
91 cerr <<
"RESULTS: " << pass <<
" of " << pn->size_of_real_nodes()
92 <<
" points projected to themselves, average error = " << total_dist/total_nodes << endl;
97 int main(
int argc,
char* argv[])
103 std::cerr <<
"Usage:project_test <hdf file>" << std::endl;
114 std::string file_in(argv[1]);
115 std::string win_in(file_in);
116 std::string::size_type st = win_in.find_last_of(
'/');
117 if (st != std::string::npos)
118 win_in.erase(0, st+1);
119 st = win_in.find_first_not_of(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
120 if (st != std::string::npos)
124 char timeStr[16] =
"";
127 std::cout <<
"Reading HDF file(s) " << file_in
128 <<
" into window " << win_in << std::endl;
134 cerr <<
"Finished reading HDF file into window\n";
138 std::cout <<
"Projecting surface mesh to itself" << std::endl;
140 std::cout <<
"Done" << std::endl;
This file contains the prototypes for Roccom API.
void COM_set_verbose(int i)
int COM_get_attribute_handle(const char *waname)
void project_window(const std::string &wName, const std::string &timeStr, const std::string &file_in)
void COM_set_profiling(int i)
void COM_call_function(const int wf, int argc,...)
Rocin creates a series of Roccom windows by reading in a list of files.
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)
long double dist(long double *coord1, long double *coord2, int size)
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
int COM_get_function_handle(const char *wfname)
#define COM_EXTERN_MODULE(moduleName)
Contains declaration of the base class for Roccom implementations.
std::vector< int > paneIds
Array of paneIds.