FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_fstr_output_vtk.c
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
6 
7 #include <stdint.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <stdlib.h>
11 #include <math.h>
12 #include "hecmw_malloc.h"
13 #include "hecmw_etype.h"
14 #include "hecmw_vis_mem_util.h"
15 #include "hecmw_vis_comm_util.h"
16 #include "hecmw_vis_combine.h"
17 #include "hecmw_fstr_endian.h"
18 
19 void vtk_output (struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
20 {
21  int i, j, k;
22  int jS, jE;
23  int myrank, petot, steptot;
24  int n_node, n_elem, shift, etype;
25  int data_tot_n, data_tot_e;
26  int table342[10] = {0, 1, 2, 3, 6, 4, 5, 7, 8, 9};
27  char file_pvd[HECMW_FILENAME_LEN], file_pvtu[HECMW_FILENAME_LEN], file_vtu[HECMW_FILENAME_LEN], buf[HECMW_FILENAME_LEN];
28  char *data_label, *p;
29  static int is_first=0;
30  FILE *outfp;
31  HECMW_Status stat;
32 
33  HECMW_Comm_rank (VIS_COMM, &myrank);
34  HECMW_Comm_size (VIS_COMM, &petot);
35  n_node = mesh->n_node;
36  n_elem = mesh->n_elem;
37  data_tot_n = 0;
38  for(i=0; i<data->nn_component; i++){
39  data_tot_n += data->nn_dof[i];
40  }
41  data_tot_e = 0;
42  for(i=0; i<data->ne_component; i++){
43  data_tot_e += data->ne_dof[i];
44  }
45 
46  p = strrchr(outfile, (int)(unsigned char)'/');
47  if(NULL != p){
48  outfile = p+1;
49  }
50 
51  sprintf(file_vtu, "%s/%s.%d.vtu", outfile1, outfile, myrank);
52  if(HECMW_ctrl_make_subdir(file_vtu)) {
53  HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0009: Cannot open output directory");
54  }
55 
56  if (myrank == 0) {
57  /* outpu pvtu file */
58  sprintf(file_pvtu, "%s.pvtu", outfile1);
59  outfp = fopen (file_pvtu, "w");
60  fprintf (outfp, "<?xml version=\"1.0\"?>\n");
61  fprintf (outfp, "<VTKFile type=\"PUnstructuredGrid\" version=\"1.0\" byte_order=\"%s\">\n", HECMW_endian_str());
62  fprintf (outfp, "<PUnstructuredGrid>\n");
63  for(i=0; i<data->ng_component; i++){
64  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfTuples=\"%d\"/>\n", data->global_label[i], data->ng_dof[i]);
65  }
66  fprintf (outfp, "<PPoints>\n");
67  fprintf (outfp, "<PDataArray type=\"Float32\" NumberOfComponents=\"3\"/>\n");
68  fprintf (outfp, "</PPoints>\n");
69  fprintf (outfp, "<PCells>\n");
70  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\"/>\n");
71  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\"/>\n");
72  fprintf (outfp, "<PDataArray type=\"UInt8\" Name=\"types\" format=\"ascii\"/>\n");
73  fprintf (outfp, "</PCells>\n");
74  fprintf (outfp, "<PPointData>\n");
75  for(i=0; i<data->nn_component; i++){
76  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"ascii\"/>\n", data->node_label[i], data->nn_dof[i]);
77  }
78  fprintf (outfp, "</PPointData>\n");
79  fprintf (outfp, "<PCellData>\n");
80  fprintf (outfp, "<PDataArray type=\"Int16\" Name=\"Mesh_Type\" NumberOfComponents=\"1\" format=\"ascii\"/>\n");
81  for(i=0; i<data->ne_component; i++){
82  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"ascii\"/>\n", data->elem_label[i], data->ne_dof[i]);
83  }
84  fprintf (outfp, "</PCellData>\n");
85  for(i=0; i<petot; i++){
86  sprintf (buf, "./%s/%s.%d.vtu", outfile, outfile, i);
87  fprintf (outfp, "<Piece Source=\"%s\"/>\n", buf);
88  }
89  fprintf (outfp, "</PUnstructuredGrid>\n");
90  fprintf (outfp, "</VTKFile>\n");
91  fclose (outfp);
92  }
93 
94  /* output vtu file */
95  outfp = fopen (file_vtu, "w");
96  fprintf (outfp, "<?xml version=\"1.0\"?>\n");
97  fprintf (outfp, "<VTKFile type=\"UnstructuredGrid\" version=\"1.0\">\n");
98  fprintf (outfp, "<UnstructuredGrid>\n");
99  fprintf (outfp, "<FieldData>\n");
100  for(i=0; i<data->ng_component; i++){
101  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfTuples=\"%d\" >\n", data->global_label[i], data->ng_dof[i]);
102  shift=0;
103  for(j=0; j<i; j++){
104  shift += data->ng_dof[j];
105  }
106  for(k=0; k<data->ng_dof[i]; k++){
107  fprintf (outfp, "%e ", (float)data->global_val_item[k+shift]);
108  }
109  fprintf (outfp, "\n");
110  fprintf (outfp, "</DataArray>\n");
111  }
112  fprintf (outfp, "</FieldData>\n");
113  fprintf (outfp, "<Piece NumberOfPoints=\"%d\" NumberOfCells=\"%d\">\n", n_node, n_elem);
114  fprintf (outfp, "<Points>\n");
115  fprintf (outfp, "<DataArray type=\"Float32\" NumberOfComponents=\"3\" format=\"ascii\">\n");
116  for(i=0; i<n_node; i++){
117  fprintf (outfp, "%e %e %e\n", (float)mesh->node[3*i], (float)mesh->node[3*i+1], (float)mesh->node[3*i+2]);
118  }
119  fprintf (outfp, "</DataArray>\n");
120  fprintf (outfp, "</Points>\n");
121  fprintf (outfp, "<Cells>\n");
122  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">\n");
123  for(i=0; i<n_elem; i++){
124  jS=mesh->elem_node_index[i];
125  jE=mesh->elem_node_index[i+1];
126  shift=0;
127  if(mesh->elem_type[i]==641) shift=2;
128  if(mesh->elem_type[i]==761) shift=3;
129  if(mesh->elem_type[i]==781) shift=4;
130  if(mesh->elem_type[i]==342){
131  for(j=jS; j<jE-shift; j++){
132  fprintf (outfp, "%d ", mesh->elem_node_item[jS+table342[j-jS]]-1);
133  }
134  }else{
135  for(j=jS; j<jE-shift; j++){
136  fprintf (outfp, "%d ", mesh->elem_node_item[j]-1);
137  }
138  }
139  fprintf (outfp, "\n");
140  }
141  fprintf (outfp, "</DataArray>\n");
142  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">\n");
143  shift=0;
144  for(i=0; i<n_elem; i++){
145  if(mesh->elem_type[i]==641) shift+=2;
146  if(mesh->elem_type[i]==761) shift+=3;
147  if(mesh->elem_type[i]==781) shift+=4;
148  fprintf (outfp, "%d ", mesh->elem_node_index[i+1]-shift);
149  }
150  fprintf (outfp, "\n");
151  fprintf (outfp, "</DataArray>\n");
152  fprintf (outfp, "<DataArray type=\"UInt8\" Name=\"types\" format=\"ascii\">\n");
153  for(i=0; i<n_elem; i++){
154  fprintf (outfp, "%d ", HECMW_get_etype_vtk_shape(mesh->elem_type[i]));
155  }
156  fprintf (outfp, "\n");
157  fprintf (outfp, "</DataArray>\n");
158  fprintf (outfp, "</Cells>\n");
159  fprintf (outfp, "<PointData>\n");
160  for(i=0; i<data->nn_component; i++){
161  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"ascii\">\n", data->node_label[i], data->nn_dof[i]);
162  shift=0;
163  for(j=0; j<i; j++){
164  shift += data->nn_dof[j];
165  }
166  for(j=0; j<n_node; j++){
167  for(k=0; k<data->nn_dof[i]; k++){
168  fprintf (outfp, "%e ", (float)data->node_val_item[j*data_tot_n+k+shift]);
169  }
170  fprintf (outfp, "\n");
171  }
172  fprintf (outfp, "</DataArray>\n");
173  }
174  fprintf (outfp, "</PointData>\n");
175  fprintf (outfp, "<CellData>\n");
176  fprintf (outfp, "<DataArray type=\"Int16\" Name=\"Mesh_Type\" NumberOfComponents=\"1\" format=\"ascii\">\n");
177  for(i=0; i<n_elem; i++){
178  fprintf (outfp, "%d ", mesh->elem_type[i]);
179  }
180  fprintf (outfp, "\n");
181  fprintf (outfp, "</DataArray>\n");
182  for(i=0; i<data->ne_component; i++){
183  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"ascii\">\n", data->elem_label[i], data->ne_dof[i]);
184  shift=0;
185  for(j=0; j<i; j++){
186  shift += data->ne_dof[j];
187  }
188  for(j=0; j<n_elem; j++){
189  for(k=0; k<data->ne_dof[i]; k++){
190  fprintf (outfp, "%e ", (float)data->elem_val_item[j*data_tot_e+k+shift]);
191  }
192  fprintf (outfp, "\n");
193  }
194  fprintf (outfp, "</DataArray>\n");
195  }
196  fprintf (outfp, "</CellData>\n");
197  fprintf (outfp, "</Piece>\n");
198  fprintf (outfp, "</UnstructuredGrid>\n");
199  fprintf (outfp, "</VTKFile>\n");
200  fclose (outfp);
201 }
202 
203 void bin_vtk_output (struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
204 {
205  int i, j, k;
206  int jS, jE;
207  int myrank, petot, steptot;
208  int n_node, n_elem, shift, etype;
209  int data_tot_n, data_tot_e, in, ioffset;
210  int *offset;
211  uint8_t uint8;
212  uint16_t uint16;
213  uint32_t uint32;
214  uint64_t uint64;
215  float val, val1, val2, val3;
216  char file_pvd[HECMW_FILENAME_LEN], file_pvtu[HECMW_FILENAME_LEN], file_vtu[HECMW_FILENAME_LEN], buf[HECMW_FILENAME_LEN];
217  char *data_label;
218  static int is_first=0;
219  int table342[10] = {0, 1, 2, 3, 6, 4, 5, 7, 8, 9};
220  FILE *outfp;
221  HECMW_Status stat;
222 
223  HECMW_Comm_rank (VIS_COMM, &myrank);
224  HECMW_Comm_size (VIS_COMM, &petot);
225  n_node = mesh->n_node;
226  n_elem = mesh->n_elem;
227  data_tot_n = 0;
228  for(i=0; i<data->nn_component; i++){
229  data_tot_n += data->nn_dof[i];
230  }
231  data_tot_e = 0;
232  for(i=0; i<data->ne_component; i++){
233  data_tot_e += data->ne_dof[i];
234  }
235 
236  sprintf(file_vtu, "%s/%s.%d.vtu", outfile1, outfile, myrank);
237  if(HECMW_ctrl_make_subdir(file_vtu)) {
238  HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0009: Cannot open output directory");
239  }
240 
241  if (myrank == 0) {
242  /* outpu pvtu file */
243  sprintf(file_pvtu, "%s.pvtu", outfile1);
244  outfp = fopen (file_pvtu, "wb");
245  fprintf (outfp, "<?xml version=\"1.0\"?>\n");
246  fprintf (outfp, "<VTKFile type=\"PUnstructuredGrid\" version=\"1.0\" byte_order=\"%s\" header_type=\"UInt32\">\n", HECMW_endian_str());
247  fprintf (outfp, "<PUnstructuredGrid>\n");
248  for(i=0; i<data->ng_component; i++){
249  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfTuples=\"%d\"/>\n", data->global_label[i], data->ng_dof[i]);
250  }
251  fprintf (outfp, "<PPoints>\n");
252  fprintf (outfp, "<PDataArray type=\"Float32\" NumberOfComponents=\"3\"/>\n");
253  fprintf (outfp, "</PPoints>\n");
254  fprintf (outfp, "<PCells>\n");
255  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"connectivity\" format=\"appended\"/>\n");
256  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"offsets\" format=\"appended\"/>\n");
257  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"types\" format=\"appended\"/>\n");
258  fprintf (outfp, "</PCells>\n");
259  fprintf (outfp, "<PPointData>\n");
260  for(i=0; i<data->nn_component; i++){
261  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"appended\"/>\n", data->node_label[i], data->nn_dof[i]);
262  }
263  fprintf (outfp, "</PPointData>\n");
264  fprintf (outfp, "<PCellData>\n");
265  for(i=0; i<data->ne_component; i++){
266  fprintf (outfp, "<PDataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"appended\"/>\n", data->elem_label[i], data->ne_dof[i]);
267  }
268  fprintf (outfp, "<PDataArray type=\"Int32\" Name=\"Mesh_Type\" NumberOfComponents=\"1\" format=\"appended\"/>\n");
269  fprintf (outfp, "</PCellData>\n");
270  for(i=0; i<petot; i++){
271  sprintf (buf, "./%s/%s.%d.vtu", outfile, outfile, i);
272  fprintf (outfp, "<Piece Source=\"%s\"/>\n", buf);
273  }
274  fprintf (outfp, "</PUnstructuredGrid>\n");
275  fprintf (outfp, "</VTKFile>\n");
276  fclose (outfp);
277  is_first = 1;
278  }
279 
280  /* outpu vtu file */
281  ioffset = 5 + data->nn_component + data->ne_component;
282  offset = HECMW_malloc(sizeof(int)*ioffset);
283 
284  uint64 = 0;
285  for(i=0; i<n_elem; i++){
286  jS=mesh->elem_node_index[i];
287  jE=mesh->elem_node_index[i+1];
288  shift=0;
289  if(mesh->elem_type[i]==641) shift=2;
290  if(mesh->elem_type[i]==761) shift=3;
291  if(mesh->elem_type[i]==781) shift=4;
292  uint64 += jE-shift-jS;
293  }
294 
295  offset[0] = 0;
296  offset[1] = offset[0] + sizeof(int) + 3*n_node *sizeof(float);
297  offset[2] = offset[1] + sizeof(int) + (int)uint64*sizeof(int);
298  offset[3] = offset[2] + sizeof(int) + n_elem *sizeof(int);
299  offset[4] = offset[3] + sizeof(int) + n_elem *sizeof(int);
300  for(i=0; i<data->nn_component; i++){
301  offset[5+i] = offset[4+i] + sizeof(int) + data->nn_dof[i]*n_node*sizeof(int);
302  }
303  for(i=0; i<data->ne_component; i++){
304  offset[5+data->nn_component+i] = offset[4+data->nn_component+i] + sizeof(int) + data->ne_dof[i]*n_elem*sizeof(int);
305  }
306 
307  outfp = fopen (file_vtu, "wb");
308  fprintf (outfp, "<?xml version=\"1.0\"?>\n");
309  fprintf (outfp, "<VTKFile type=\"UnstructuredGrid\" version=\"1.0\" byte_order=\"%s\" header_type=\"UInt32\">\n", HECMW_endian_str());
310  fprintf (outfp, "<UnstructuredGrid>\n");
311  fprintf (outfp, "<FieldData>\n");
312  for(i=0; i<data->ng_component; i++){
313  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfTuples=\"%d\" >\n", data->global_label[i], data->ng_dof[i]);
314  shift=0;
315  for(j=0; j<i; j++){
316  shift += data->ng_dof[j];
317  }
318  for(k=0; k<data->ng_dof[i]; k++){
319  fprintf (outfp, "%e ", (float)data->global_val_item[k+shift]);
320  }
321  fprintf (outfp, "\n");
322  fprintf (outfp, "</DataArray>\n");
323  }
324  fprintf (outfp, "</FieldData>\n");
325  fprintf (outfp, "<Piece NumberOfPoints=\"%d\" NumberOfCells=\"%d\">\n", n_node, n_elem);
326  fprintf (outfp, "<Points>\n");
327  fprintf (outfp, "<DataArray type=\"Float32\" NumberOfComponents=\"3\" format=\"appended\" offset=\"%d\">\n", offset[0]);
328  fprintf (outfp, "</DataArray>\n");
329  fprintf (outfp, "</Points>\n");
330  fprintf (outfp, "<Cells>\n");
331  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"connectivity\" format=\"appended\" offset=\"%d\">\n", offset[1]);
332  fprintf (outfp, "</DataArray>\n");
333  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"offsets\" format=\"appended\" offset=\"%d\">\n", offset[2]);
334  fprintf (outfp, "</DataArray>\n");
335  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"types\" format=\"appended\" offset=\"%d\">\n", offset[3]);
336  fprintf (outfp, "</DataArray>\n");
337  fprintf (outfp, "</Cells>\n");
338  fprintf (outfp, "<PointData>\n");
339 
340  for(i=0; i<data->nn_component; i++){
341  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"appended\" offset=\"%d\">\n", data->node_label[i], data->nn_dof[i], offset[4+i]);
342  fprintf (outfp, "</DataArray>\n");
343  }
344 
345  fprintf (outfp, "</PointData>\n");
346  fprintf (outfp, "<CellData>\n");
347  for(i=0; i<data->ne_component; i++){
348  fprintf (outfp, "<DataArray type=\"Float32\" Name=\"%s\" NumberOfComponents=\"%d\" format=\"appended\" offset=\"%d\">\n", data->elem_label[i], data->ne_dof[i], offset[4+data->nn_component+i]);
349  fprintf (outfp, "</DataArray>\n");
350  }
351 
352  fprintf (outfp, "<DataArray type=\"Int32\" Name=\"Mesh_Type\" NumberOfComponents=\"1\" format=\"appended\" offset=\"%d\">\n", offset[ioffset-1]);
353  fprintf (outfp, "</DataArray>\n");
354  fprintf (outfp, "</CellData>\n");
355  fprintf (outfp, "</Piece>\n");
356  fprintf (outfp, "</UnstructuredGrid>\n");
357  fprintf (outfp, "<AppendedData encoding=\"raw\">\n");
358 
359  fprintf (outfp, " _");
360  uint32 = (uint32_t)(3*n_node*sizeof(float));
361  fwrite (&uint32, sizeof(uint32), 1, outfp);
362  for(i=0; i<n_node; i++){
363  val = (float)mesh->node[3*i];
364  fwrite (&val, sizeof(float), 1, outfp);
365  val = (float)mesh->node[3*i+1];
366  fwrite (&val, sizeof(float), 1, outfp);
367  val = (float)mesh->node[3*i+2];
368  fwrite (&val, sizeof(float), 1, outfp);
369  }
370 
371  uint32 = (uint32_t)(uint64*sizeof(int));
372  fwrite (&uint32, sizeof(uint32), 1, outfp);
373  for(i=0; i<n_elem; i++){
374  jS=mesh->elem_node_index[i];
375  jE=mesh->elem_node_index[i+1];
376  shift=0;
377  if(mesh->elem_type[i]==641) shift=2;
378  if(mesh->elem_type[i]==761) shift=3;
379  if(mesh->elem_type[i]==781) shift=4;
380  if(mesh->elem_type[i]==342){
381  for(j=jS; j<jE-shift; j++){
382  in = (int)mesh->elem_node_item[jS+table342[j-jS]]-1;
383  fwrite (&in, sizeof(int), 1, outfp);
384  }
385  }else{
386  for(j=jS; j<jE-shift; j++){
387  in = (int)mesh->elem_node_item[j]-1;
388  fwrite (&in, sizeof(int), 1, outfp);
389  }
390  }
391  }
392 
393  uint32 = (uint32_t)(n_elem*sizeof(int));
394  fwrite (&uint32, sizeof(uint32), 1, outfp);
395  shift=0;
396  for(i=0; i<n_elem; i++){
397  if(mesh->elem_type[i]==641) shift+=2;
398  if(mesh->elem_type[i]==761) shift+=3;
399  if(mesh->elem_type[i]==781) shift+=4;
400  in = (int)mesh->elem_node_index[i+1]-shift;
401  fwrite (&in, sizeof(int), 1, outfp);
402  }
403 
404  uint32 = (uint32_t)(n_elem*sizeof(int));
405  fwrite (&uint32, sizeof(uint32), 1, outfp);
406  for(i=0; i<n_elem; i++){
407  //uint8 = (uint8_t)HECMW_get_etype_vtk_shape(mesh->elem_type[i]);
408  //fwrite (&uint8, sizeof(u_int8_t), 1, outfp);
410  fwrite (&in, sizeof(int), 1, outfp);
411  }
412 
413  for(i=0; i<data->nn_component; i++){
414  uint32 = (uint32_t)(data->nn_dof[i]*n_node*sizeof(int));
415  fwrite (&uint32, sizeof(uint32), 1, outfp);
416 
417  shift=0;
418  for(j=0; j<i; j++){
419  shift += data->nn_dof[j];
420  }
421  for(j=0; j<n_node; j++){
422  for(k=0; k<data->nn_dof[i]; k++){
423  val = (float)data->node_val_item[j*data_tot_n+k+shift];
424  fwrite (&val, sizeof(float), 1, outfp);
425  }
426  }
427  }
428 
429  for(i=0; i<data->ne_component; i++){
430  uint32 = (uint32_t)(data->ne_dof[i]*n_elem*sizeof(int));
431  fwrite (&uint32, sizeof(uint32), 1, outfp);
432 
433  shift=0;
434  for(j=0; j<i; j++){
435  shift += data->ne_dof[j];
436  }
437  for(j=0; j<n_elem; j++){
438  for(k=0; k<data->ne_dof[i]; k++){
439  val = (float)data->elem_val_item[j*data_tot_e+k+shift];
440  fwrite (&val, sizeof(float), 1, outfp);
441  }
442  }
443  }
444 
445  uint32 = (uint32_t)(n_elem*sizeof(int));
446  fwrite (&uint32, sizeof(uint32), 1, outfp);
447  for(i=0; i<n_elem; i++){
448  //uint16 = (uint16_t)mesh->elem_type[i];
449  //fwrite (&uint16, sizeof(u_int16_t), 1, outfp);
450  in = (int)mesh->elem_type[i];
451  fwrite (&in, sizeof(int), 1, outfp);
452  }
453 
454  fprintf (outfp, "</AppendedData>\n");
455  fprintf (outfp, "</VTKFile>\n");
456  fclose (outfp);
457 }
458 
459 void HECMW_vtk_output (struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
460 {
461  vtk_output (mesh, data, outfile, outfile1, VIS_COMM);
462 }
463 
464 void HECMW_bin_vtk_output (struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
465 {
466  bin_vtk_output (mesh, data, outfile, outfile1, VIS_COMM);
467 }
hecmw_malloc.h
hecmw_etype.h
hecmwST_result_data
Definition: hecmw_result.h:11
HECMW_vtk_output
void HECMW_vtk_output(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
Definition: hecmw_fstr_output_vtk.c:459
hecmw_vis_mem_util.h
hecmwST_local_mesh::elem_node_item
int * elem_node_item
Definition: hecmw_struct.h:196
HECMW_malloc
#define HECMW_malloc(size)
Definition: hecmw_malloc.h:20
mesh
struct hecmwST_local_mesh * mesh
Definition: hecmw_repart.h:71
m_fstr::myrank
integer(kind=kint) myrank
PARALLEL EXECUTION.
Definition: m_fstr.f90:96
hecmwST_local_mesh
Definition: hecmw_struct.h:139
hecmwST_local_mesh::elem_type
int * elem_type
Definition: hecmw_struct.h:191
is_first
int is_first
Definition: fstr_ctrl_util.c:1104
HECMW_vis_print_exit
void HECMW_vis_print_exit(char *var)
Definition: hecmw_vis_mem_util.c:21
hecmwST_local_mesh::n_elem
int n_elem
Definition: hecmw_struct.h:184
HECMW_endian_str
const char * HECMW_endian_str(void)
function for investigating endian of running CPU
Definition: hecmw_fstr_endian.c:35
HECMW_ctrl_make_subdir
int HECMW_ctrl_make_subdir(char *filename)
Definition: hecmw_control.c:2447
bin_vtk_output
void bin_vtk_output(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
Definition: hecmw_fstr_output_vtk.c:203
hecmwST_local_mesh::n_node
int n_node
Definition: hecmw_struct.h:161
hecmwST_local_mesh::node
double * node
Definition: hecmw_struct.h:170
hecmw_vis_combine.h
HECMW_Status
MPI_Status HECMW_Status
Definition: hecmw_config.h:36
hecmw_vis_comm_util.h
hecmwST_local_mesh::elem_node_index
int * elem_node_index
Definition: hecmw_struct.h:195
data
CNFData data
Definition: neu_reporter.cpp:18
HECMW_bin_vtk_output
void HECMW_bin_vtk_output(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
Definition: hecmw_fstr_output_vtk.c:464
hecmw_fstr_output_vtk.h
HECMW_Comm
MPI_Comm HECMW_Comm
Definition: hecmw_config.h:30
HECMW_Comm_rank
int HECMW_Comm_rank(HECMW_Comm comm, int *rank)
Definition: hecmw_comm.c:18
hecmw_fstr_endian.h
HECMW_Comm_size
int HECMW_Comm_size(HECMW_Comm comm, int *size)
Definition: hecmw_comm.c:37
vtk_output
void vtk_output(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, char *outfile, char *outfile1, HECMW_Comm VIS_COMM)
Definition: hecmw_fstr_output_vtk.c:19
NULL
#define NULL
Definition: hecmw_io_nastran.c:30
HECMW_FILENAME_LEN
#define HECMW_FILENAME_LEN
Definition: hecmw_config.h:72
HECMW_get_etype_vtk_shape
int HECMW_get_etype_vtk_shape(int etype)
Definition: hecmw_etype.c:1731