51 |
sprintf(error_msg,"reading GMSH with MPI is not supported yet."); |
sprintf(error_msg,"reading GMSH with MPI is not supported yet."); |
52 |
Finley_setError(IO_ERROR,error_msg); |
Finley_setError(IO_ERROR,error_msg); |
53 |
return NULL; |
return NULL; |
|
|
|
54 |
#else |
#else |
55 |
/* allocate mesh */ |
/* allocate mesh */ |
56 |
|
|
257 |
final_face_element_type=Tri3; |
final_face_element_type=Tri3; |
258 |
} |
} |
259 |
} |
} |
260 |
|
printf("ELEMENTS READ\n"); |
261 |
mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order, mesh_p->reduced_order); |
mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order, mesh_p->reduced_order); |
262 |
mesh_p->FaceElements=Finley_ElementFile_alloc(final_face_element_type,mesh_p->order, mesh_p->reduced_order); |
mesh_p->FaceElements=Finley_ElementFile_alloc(final_face_element_type,mesh_p->order, mesh_p->reduced_order); |
263 |
mesh_p->ContactElements=Finley_ElementFile_alloc(Point1_Contact,mesh_p->order, mesh_p->reduced_order); |
mesh_p->ContactElements=Finley_ElementFile_alloc(Point1_Contact,mesh_p->order, mesh_p->reduced_order); |
301 |
} |
} |
302 |
} |
} |
303 |
} |
} |
304 |
|
printf("ELEMENTS reordered\n"); |
305 |
/* and clean up */ |
/* and clean up */ |
306 |
TMPMEMFREE(id); |
TMPMEMFREE(id); |
307 |
TMPMEMFREE(tag); |
TMPMEMFREE(tag); |
324 |
|
|
325 |
/* close file */ |
/* close file */ |
326 |
fclose(fileHandle_p); |
fclose(fileHandle_p); |
|
/* clean up */ |
|
|
if (! Finley_noError()) { |
|
|
Finley_Mesh_dealloc(mesh_p); |
|
|
return NULL; |
|
|
} |
|
327 |
/* resolve id's : */ |
/* resolve id's : */ |
328 |
Finley_Mesh_resolveNodeIds(mesh_p); |
if (Finley_noError()) { |
329 |
|
Finley_Mesh_resolveNodeIds(mesh_p); |
330 |
|
} |
331 |
/* rearrange elements: */ |
/* rearrange elements: */ |
332 |
Finley_Mesh_prepare(mesh_p); |
if (Finley_noError()) { |
333 |
|
Finley_Mesh_prepare(mesh_p); |
334 |
|
} |
335 |
|
|
336 |
|
/* optimize node labeling*/ |
337 |
|
if (Finley_noError()) { |
338 |
|
if (optimize_labeling) Finley_Mesh_optimizeNodeLabeling(mesh_p); |
339 |
|
} |
340 |
/* that's it */ |
/* that's it */ |
341 |
#ifdef Finley_TRACE |
#ifdef Finley_TRACE |
342 |
printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0); |
printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0); |
346 |
if ( ! Finley_Mesh_isPrepared(mesh_p)) { |
if ( ! Finley_Mesh_isPrepared(mesh_p)) { |
347 |
Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers."); |
Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers."); |
348 |
} |
} |
349 |
|
} else { |
350 |
|
Finley_Mesh_dealloc(mesh_p); |
351 |
} |
} |
352 |
return mesh_p; |
return mesh_p; |
353 |
} |
} |