38 int rank,
int nproc) {
47 int row=rank/proc_col, col=rank%proc_col;
49 const double width=100.,
length=100.;
54 coors[
i*ncol+
j][1]=row*width+width/(nrow-1)*
i;
55 coors[
i*ncol+
j][2]=0.01;
71 int row=rank/proc_col, col=rank%proc_col;
73 const double width=100.,
length=100.;
78 coors[
i*ncol+
j][1]=row*width+width/(nrow-1)*
i;
84 for (
int i=0;
i<nrow-1; ++
i) {
85 for (
int j=0;
j<ncol-1; ++
j) {
86 elmts[
i*(ncol-1)+
j][0]=
i*ncol+
j+1;
87 elmts[
i*(ncol-1)+
j][1]=
i*ncol+
j+ncol+1;
88 elmts[
i*(ncol-1)+
j][2]=
i*ncol+
j+ncol+2;
89 elmts[
i*(ncol-1)+
j][3]=
i*ncol+
j+2;
112 int main(
int argc,
char *argv[]) {
113 const int comm_rank=0;
114 const int comm_size=1;
118 std::cout <<
"Initializing Roccom and Rocface" << std::endl;
126 std::cout <<
"Creating window \"unstr\"" << std::endl;
132 for (
int pid=first_pane_id-1; pid<first_pane_id-1+npanes; ++pid) {
149 std::cout <<
"Creating window \"str\"" << std::endl;
155 for (
int pid=first_pane_id-1; pid<first_pane_id-1+npanes; ++pid) {
170 for (
int p=first_pane_id-1; p<first_pane_id-1+npanes; ++p) {
179 for (
int i=0;
i<(
nrow-1)*(ncol-1); ++
i) {
190 const char *format=
"HDF";
193 if ( comm_size == 1) {
196 std::cout <<
"Overlaying meshes..." << std::endl;
204 "str",
"unstr", format);
206 char prefix1[100], prefix2[100];
207 std::sprintf(prefix1,
"str%d", comm_rank);
208 std::sprintf(prefix2,
"unstr%d", comm_rank);
212 std::cout <<
"Perform data transfer..." << std::endl;
213 std::sprintf(prefix1,
"str_disp%d", comm_rank);
214 std::sprintf(prefix2,
"unstr_disp%d", comm_rank);
double coors_f[total_npanes][nrow *ncol][3]
double disps_s[total_npanes][num_nodes][3]
void init_structured_mesh(double coors[][3], int nrow, int ncol, int rank, int nproc, int check=1)
double burnr_s[3][total_npanes][(nrow-1)*(ncol-1)]
void COM_delete_window(const char *wname)
double disps_f[total_npanes][nrow *ncol][3]
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)
double length(Vector3D *const v, int n)
#define COM_UNLOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
double burnr_f[3][total_npanes][(nrow-1)*(ncol-1)]
void COM_print_profile(const char *fname, const char *header)
int elmts[total_npanes][num_elmts][4]
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_set_profiling(int i)
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 main(int argc, char *argv[])
double velcts_f[total_npanes][nrow *ncol][3]
double velcts_s[total_npanes][num_nodes][3]
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.
double coors_s[total_npanes][num_nodes][3]
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
int COM_get_function_handle(const char *wfname)
#define COM_EXTERN_MODULE(moduleName)
void init_unstructure_mesh(double coors[18][3], int elmts[4][8])