/[escript]/branches/domexper/dudley/src/Mesh_readGmsh.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Mesh_readGmsh.c

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

revision 940 by gross, Mon Jan 29 00:09:08 2007 UTC revision 1003 by gross, Thu Mar 1 01:53:37 2007 UTC
# Line 51  Finley_Mesh* Finley_Mesh_readGmsh(char* Line 51  Finley_Mesh* Finley_Mesh_readGmsh(char*
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    
# Line 231  Finley_Mesh* Finley_Mesh_readGmsh(char* Line 232  Finley_Mesh* Finley_Mesh_readGmsh(char*
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               if (final_element_type == NoType) {
239                  if (numDim==1) {
240                     final_element_type=Line2;
241                  } else if (numDim==2) {
242                     final_element_type=Tri3;
243                  } else if (numDim==2) {
244                     final_element_type=Tet4;
245                  }
246               }
247               if (final_face_element_type == NoType) {
248                  if (numDim==1) {
249                     final_face_element_type=Point1;
250                  } else if (numDim==2) {
251                     final_face_element_type=Line2;
252                  } else if (numDim==2) {
253                     final_face_element_type=Tri3;
254                  }
255               }
256             mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order);             mesh_p->Elements=Finley_ElementFile_alloc(final_element_type,mesh_p->order);
257             mesh_p->FaceElements=Finley_ElementFile_alloc(final_face_element_type,mesh_p->order);             mesh_p->FaceElements=Finley_ElementFile_alloc(final_face_element_type,mesh_p->order);
258             mesh_p->ContactElements=Finley_ElementFile_alloc(Point1_Contact,mesh_p->order);             mesh_p->ContactElements=Finley_ElementFile_alloc(Point1_Contact,mesh_p->order);
# Line 312  Finley_Mesh* Finley_Mesh_readGmsh(char* Line 332  Finley_Mesh* Finley_Mesh_readGmsh(char*
332    printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0);    printf("timing: reading mesh: %.4e sec\n",Finley_timer()-time0);
333    #endif    #endif
334    #endif    #endif
335      if (Finley_noError()) {
336           if (  ! Finley_Mesh_isPrepared(mesh_p)) {
337              Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers.");
338           }
339      }
340    return mesh_p;    return mesh_p;
341  }  }
 /*  
 * $Log$  
 *  
 */  
   

Legend:
Removed from v.940  
changed lines
  Added in v.1003

  ViewVC Help
Powered by ViewVC 1.1.26