31 if ((contfp = fopen(
"hecmw_vis.ini",
"r")) ==
NULL) {
33 if ((contfp = fopen(contfile,
"r")) ==
NULL)
59 int visual_id, init_flag, fg_text;
77 "ERROR: HEC-MW-VIS-E0009: Cannot open output directory");
83 for (visual_id = 0; visual_id <
psf->
num_of_psf; visual_id++) {
85 fprintf(stderr,
" Start visualize PSF %d at timestep %d\n",
86 visual_id + 1, timestep);
93 if (timestep >= 1000) {
94 sprintf(outfile1,
"%s_psf%d.%d", outfile, visual_id + 1, timestep);
95 sprintf(body,
"%s_psf%d.%d", buf1, visual_id + 1, timestep);
96 }
else if ((timestep >= 100) && (timestep <= 999)) {
97 sprintf(outfile1,
"%s_psf%d.0%d", outfile, visual_id + 1, timestep);
98 sprintf(body,
"%s_psf%d.0%d", buf1, visual_id + 1, timestep);
99 }
else if ((timestep >= 10) && (timestep <= 99)) {
100 sprintf(outfile1,
"%s_psf%d.00%d", outfile, visual_id + 1, timestep);
101 sprintf(body,
"%s_psf%d.00%d", buf1, visual_id + 1, timestep);
102 }
else if (timestep <= 9) {
103 sprintf(outfile1,
"%s_psf%d.000%d", outfile, visual_id + 1, timestep);
104 sprintf(body,
"%s_psf%d.000%d", buf1, visual_id + 1, timestep);
107 if (timestep >= 1000) {
108 sprintf(outfile1,
"%s_psf.%d", outfile, timestep);
109 sprintf(body,
"%s_psf.%d", buf1, timestep);
110 }
else if ((timestep >= 100) && (timestep <= 999)) {
111 sprintf(outfile1,
"%s_psf.0%d", outfile, timestep);
112 sprintf(body,
"%s_psf.0%d", buf1, timestep);
113 }
else if ((timestep >= 10) && (timestep <= 99)) {
114 sprintf(outfile1,
"%s_psf.00%d", outfile, timestep);
115 sprintf(body,
"%s_psf.00%d", buf1, timestep);
116 }
else if (timestep <= 9) {
117 sprintf(outfile1,
"%s_psf.000%d", outfile, timestep);
118 sprintf(body,
"%s_psf.000%d", buf1, timestep);
122 outfile1, body, VIS_COMM);
129 for (visual_id = 0; visual_id <
pvr->
num_of_pvr; visual_id++) {
131 fprintf(stderr,
" Start visualize PVR %d at timestep %d\n",
132 visual_id + 1, timestep);
138 if (timestep >= 1000)
139 sprintf(outfile1,
"%s_pvr%d.%d", outfile, visual_id + 1, timestep);
140 else if ((timestep >= 100) && (timestep <= 999))
141 sprintf(outfile1,
"%s_pvr%d.0%d", outfile, visual_id + 1, timestep);
142 else if ((timestep >= 10) && (timestep <= 99))
143 sprintf(outfile1,
"%s_pvr%d.00%d", outfile, visual_id + 1,
145 else if (timestep <= 9)
146 sprintf(outfile1,
"%s_pvr%d.000%d", outfile, visual_id + 1,
149 if (timestep >= 1000)
150 sprintf(outfile1,
"%s_pvr.%d", outfile, timestep);
151 else if ((timestep >= 100) && (timestep <= 999))
152 sprintf(outfile1,
"%s_pvr.0%d", outfile, timestep);
153 else if ((timestep >= 10) && (timestep <= 99))
154 sprintf(outfile1,
"%s_pvr.00%d", outfile, timestep);
155 else if (timestep <= 9)
156 sprintf(outfile1,
"%s_pvr.000%d", outfile, timestep);
int HECMW_Comm_rank(HECMW_Comm comm, int *rank)
HECMW_Comm HECMW_comm_get_comm(void)
int HECMW_Comm_size(HECMW_Comm comm, int *size)
int HECMW_Comm_free(HECMW_Comm *comm)
int HECMW_Comm_dup(HECMW_Comm comm, HECMW_Comm *new_comm)
#define HECMW_FILENAME_LEN
char * HECMW_ctrl_get_result_filebody(char *name_ID)
char * HECMW_ctrl_get_control_file(char *name_ID)
int HECMW_ctrl_is_subdir(void)
char * HECMW_ctrl_get_result_fileheader(char *name_ID, int istep, int *fg_text)
int HECMW_ctrl_make_subdir(char *filename)
struct hecmwST_local_mesh * mesh
#define HECMW_malloc(size)
void HECMW_vis_print_exit(char *var)
void HECMW_vis_memory_exit(char *var)
void HECMW_vis_pvr_rendering(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, int *timestep, int *init_flag, int num_of_pvr, Parameter_vr *vr, int stat_para[NUM_CONTROL_PVR], char *outfile, HECMW_Comm VIS_COMM)
void HECMW_vis_read_control(FILE *fp, int pesize, int mynode, PSF_link *psf, PVR_link *pvr)
void HECMW_vis_psf_rendering(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, int *timestep, struct surface_module *sf, Parameter_rendering *sr, int stat_para[NUM_CONTROL_PSF], char *outfile1, char *body, HECMW_Comm VIS_COMM)
int HECMW_visualize_init_by_comm(HECMW_Comm VIS_COMM)
int HECMW_visualize(struct hecmwST_local_mesh *mesh, struct hecmwST_result_data *data, int timestep)
int HECMW_visualize_init(void)
int HECMW_visualize_finalize(void)
struct _psf_link_struct * next_psf
int stat_para[NUM_CONTROL_PSF]
struct surface_module * sf
struct _pvr_link_struct * next_pvr
int stat_para[NUM_CONTROL_PVR]