/[escript]/trunk/finley/src/Mesh_saveVTK.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_saveVTK.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1338 by gross, Mon Nov 5 06:32:29 2007 UTC
# Line 150  void Finley_Mesh_saveVTK(const char * fi Line 150  void Finley_Mesh_saveVTK(const char * fi
150    isCellCentered=TMPMEMALLOC(num_data,bool_t);    isCellCentered=TMPMEMALLOC(num_data,bool_t);
151    max_len_names=0;    max_len_names=0;
152    if (!Finley_checkPtr(isCellCentered)) {    if (!Finley_checkPtr(isCellCentered)) {
153         nodetype=FINLEY_UNKNOWN;
154         elementtype=FINLEY_UNKNOWN;
155       for (i_data=0;i_data<num_data;++i_data) {       for (i_data=0;i_data<num_data;++i_data) {
        elementtype=FINLEY_UNKNOWN;  
        nodetype=FINLEY_NODES;  
156         if (! isEmpty(data_pp[i_data])) {         if (! isEmpty(data_pp[i_data])) {
157           switch(getFunctionSpaceType(data_pp[i_data]) ) {           switch(getFunctionSpaceType(data_pp[i_data]) ) {
158           case FINLEY_NODES:           case FINLEY_NODES:
# Line 175  void Finley_Mesh_saveVTK(const char * fi Line 175  void Finley_Mesh_saveVTK(const char * fi
175             break;             break;
176           case FINLEY_ELEMENTS:           case FINLEY_ELEMENTS:
177           case FINLEY_REDUCED_ELEMENTS:           case FINLEY_REDUCED_ELEMENTS:
            nodetype = (nodetype == FINLEY_REDUCED_NODES) ? FINLEY_REDUCED_NODES :FINLEY_NODES;  
178             isCellCentered[i_data]=TRUE;             isCellCentered[i_data]=TRUE;
179             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_ELEMENTS) {             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_ELEMENTS) {
180               elementtype=FINLEY_ELEMENTS;               elementtype=FINLEY_ELEMENTS;
# Line 185  void Finley_Mesh_saveVTK(const char * fi Line 184  void Finley_Mesh_saveVTK(const char * fi
184             break;             break;
185           case FINLEY_FACE_ELEMENTS:           case FINLEY_FACE_ELEMENTS:
186           case FINLEY_REDUCED_FACE_ELEMENTS:           case FINLEY_REDUCED_FACE_ELEMENTS:
            nodetype = (nodetype == FINLEY_REDUCED_NODES) ? FINLEY_REDUCED_NODES :FINLEY_NODES;  
187             isCellCentered[i_data]=TRUE;             isCellCentered[i_data]=TRUE;
188             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_FACE_ELEMENTS) {             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_FACE_ELEMENTS) {
189               elementtype=FINLEY_FACE_ELEMENTS;               elementtype=FINLEY_FACE_ELEMENTS;
# Line 194  void Finley_Mesh_saveVTK(const char * fi Line 192  void Finley_Mesh_saveVTK(const char * fi
192             }             }
193             break;             break;
194           case FINLEY_POINTS:           case FINLEY_POINTS:
            nodetype = (nodetype == FINLEY_REDUCED_NODES) ? FINLEY_REDUCED_NODES : FINLEY_NODES;  
195             isCellCentered[i_data]=TRUE;             isCellCentered[i_data]=TRUE;
196             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_POINTS) {             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_POINTS) {
197               elementtype=FINLEY_POINTS;               elementtype=FINLEY_POINTS;
# Line 204  void Finley_Mesh_saveVTK(const char * fi Line 201  void Finley_Mesh_saveVTK(const char * fi
201             break;             break;
202           case FINLEY_CONTACT_ELEMENTS_1:           case FINLEY_CONTACT_ELEMENTS_1:
203           case FINLEY_REDUCED_CONTACT_ELEMENTS_1:           case FINLEY_REDUCED_CONTACT_ELEMENTS_1:
            nodetype = (nodetype == FINLEY_REDUCED_NODES) ? FINLEY_REDUCED_NODES :FINLEY_NODES;  
204             isCellCentered[i_data]=TRUE;             isCellCentered[i_data]=TRUE;
205             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_CONTACT_ELEMENTS_1) {             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_CONTACT_ELEMENTS_1) {
206               elementtype=FINLEY_CONTACT_ELEMENTS_1;               elementtype=FINLEY_CONTACT_ELEMENTS_1;
# Line 214  void Finley_Mesh_saveVTK(const char * fi Line 210  void Finley_Mesh_saveVTK(const char * fi
210             break;             break;
211           case FINLEY_CONTACT_ELEMENTS_2:           case FINLEY_CONTACT_ELEMENTS_2:
212           case FINLEY_REDUCED_CONTACT_ELEMENTS_2:           case FINLEY_REDUCED_CONTACT_ELEMENTS_2:
            nodetype = (nodetype == FINLEY_REDUCED_NODES) ? FINLEY_REDUCED_NODES :FINLEY_NODES;  
213             isCellCentered[i_data]=TRUE;             isCellCentered[i_data]=TRUE;
214             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_CONTACT_ELEMENTS_1) {             if (elementtype==FINLEY_UNKNOWN || elementtype==FINLEY_CONTACT_ELEMENTS_1) {
215               elementtype=FINLEY_CONTACT_ELEMENTS_1;               elementtype=FINLEY_CONTACT_ELEMENTS_1;
# Line 234  void Finley_Mesh_saveVTK(const char * fi Line 229  void Finley_Mesh_saveVTK(const char * fi
229           max_len_names =MAX(max_len_names,strlen(names_p[i_data]));           max_len_names =MAX(max_len_names,strlen(names_p[i_data]));
230         }         }
231       }       }
232         nodetype = (nodetype == FINLEY_UNKNOWN) ? FINLEY_NODES : nodetype;
233    }    }
234    if (Finley_noError()) {    if (Finley_noError()) {
235    

Legend:
Removed from v.1312  
changed lines
  Added in v.1338

  ViewVC Help
Powered by ViewVC 1.1.26