51 |
|
|
52 |
#else |
#else |
53 |
/* allocate mesh */ |
/* allocate mesh */ |
54 |
|
|
55 |
mesh_p = Finley_Mesh_alloc(fname,numDim,order); |
mesh_p = Finley_Mesh_alloc(fname,numDim,order); |
56 |
if (! Finley_noError()) return NULL; |
if (! Finley_noError()) return NULL; |
57 |
|
|
232 |
for(j = 0; j < numNodesPerElement; j++) fscanf(fileHandle_p, "%d", &vertices[INDEX2(j,e,MAX_numNodes_gmsh)]); |
for(j = 0; j < numNodesPerElement; j++) fscanf(fileHandle_p, "%d", &vertices[INDEX2(j,e,MAX_numNodes_gmsh)]); |
233 |
} |
} |
234 |
/* all elements have been read, now we have to identify the elements for finley */ |
/* all elements have been read, now we have to identify the elements for finley */ |
235 |
|
|
236 |
if (Finley_noError()) { |
if (Finley_noError()) { |
237 |
/* first we have to identify the elements to define Elementis and FaceElements */ |
/* first we have to identify the elements to define Elementis and FaceElements */ |
238 |
mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order); |
mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order); |
291 |
Finley_setError(IO_ERROR,error_msg); |
Finley_setError(IO_ERROR,error_msg); |
292 |
} |
} |
293 |
if (feof(fileHandle_p)) { |
if (feof(fileHandle_p)) { |
294 |
sprintf(error_msg,"%s:Unexected end of file in %s",fname); |
sprintf(error_msg,"Unexected end of file in %s",fname); |
295 |
Finley_setError(IO_ERROR,error_msg); |
Finley_setError(IO_ERROR,error_msg); |
296 |
} |
} |
297 |
if (! Finley_noError()) break; |
if (! Finley_noError()) break; |
314 |
printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0); |
printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0); |
315 |
#endif |
#endif |
316 |
#endif |
#endif |
317 |
|
if (Finley_noError()) { |
318 |
|
if ( ! Finley_Mesh_isPrepared(mesh_p)) { |
319 |
|
Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers."); |
320 |
|
} |
321 |
|
} |
322 |
return mesh_p; |
return mesh_p; |
323 |
} |
} |
|
/* |
|
|
* $Log$ |
|
|
* |
|
|
*/ |
|
|
|
|