42 Four_tuple(
int a,
int b,
int c,
int d) : v1(a), v2(b), v3(c), v4(d) {}
46 int main(
int argc,
char **argv) {
50 cout <<
"Usage: " << argv[0] <<
" nrow ncol" << endl;
56 const int n_row=atoi(argv[1]), n_col=atoi(argv[2]);
58 const double row_max=double(n_row-1.)/2., col_max=double(n_col-1.)/2.;
60 vector<SURF::Point_3<double> > pnts(n_row*n_col);
61 vector<Four_tuple > elems((n_row-1)*(n_col-1));
63 const double pi_by_2 =
asin(1.);
65 for (
int i=0;
i<n_row; ++
i)
66 for (
int j=0;
j<n_col; ++
j) {
67 double sin_1 =
sin((
i+row_max)/(n_row-1)*pi_by_2);
68 double sin_2 =
sin((
j+col_max)/(n_col-1)*pi_by_2);
69 double cos_1 =
cos((
i+row_max)/(n_row-1)*pi_by_2);
70 double cos_2 =
cos((
j+col_max)/(n_col-1)*pi_by_2);
72 pnts[
i*n_col+
j] = SURF::Point_3<double>( cos_1*sin_2, cos_2, sin_1*sin_2);
75 for (
int i=0;
i<n_row-1; ++
i)
76 for (
int j=0;
j<n_col-1; ++
j)
78 (
i+1)*n_col+
j+2,
i*n_col+
j+2);
79 vector<SURF::Vector_3<double> > nrms( pnts.size());
81 cout <<
"Creating window \"quad1\"..." << endl;
98 double *evals_p;
COM_get_array(
"quad1.evals", 1, &(
void*&)evals_p);
99 for (
int i=0,
n=3*elems.size();
i<
n; ++
i) evals_p[
i] = 1.;
117 cout <<
"Output normals into file..." << endl;
124 sprintf(prefix1,
"quad1_all");
A structure used to represent element faces.
void COM_delete_window(const char *wname)
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.
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.
void COM_set_verbose(int i)
int COM_get_attribute_handle(const char *waname)
CImg< _cimg_Tfloat > asin(const CImg< T > &instance)
Four_tuple(int a, int b, int c, int d)
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,...)
void COM_set_array(const char *wa_str, int pane_id, void *addr, int strd=0, int cap=0)
Associates an array with an attribute for a specific pane.
int COM_get_attribute_handle_const(const char *waname)
int main(int argc, char *argv[])
void COM_init(int *argc, char ***argv)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
#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)