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

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

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

temp_trunk_copy/finley/src/Mesh_hex20.c revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC trunk/finley/src/Mesh_hex20.c revision 1733 by gross, Thu Aug 28 01:46:07 2008 UTC
# Line 70  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 70  Finley_Mesh* Finley_RectangularMesh_Hex2
70    }    }
71    
72    if (useFullElementOrder) {    if (useFullElementOrder) {
73       Finley_setError(SYSTEM_ERROR,"full element order for Hex elements is not supported yet.");       /* Finley_setError(SYSTEM_ERROR,"full element order for Hex elements is not supported yet."); */
 /*  
74       Finley_Mesh_setElements(out,Finley_ElementFile_alloc(Hex27,       Finley_Mesh_setElements(out,Finley_ElementFile_alloc(Hex27,
75                                              out->order,                                              out->order,
76                                              out->reduced_order,                                              out->reduced_order,
77                                              mpi_info))`;                                              mpi_info));
78       if (useElementsOnFace) {       if (useElementsOnFace) {
79           Finley_setError(SYSTEM_ERROR,"rich elements for Hex27 elements is not supported yet.");           Finley_setError(SYSTEM_ERROR,"rich elements for Hex27 elements is not supported yet.");
80       } else {       } else {
# Line 88  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 87  Finley_Mesh* Finley_RectangularMesh_Hex2
87                                                         out->reduced_order,                                                         out->reduced_order,
88                                                         mpi_info));                                                         mpi_info));
89       }       }
 */  
90    
91    } else  {    } else  {
92       Finley_Mesh_setElements(out,Finley_ElementFile_alloc(Hex20,out->order,out->reduced_order,mpi_info));       Finley_Mesh_setElements(out,Finley_ElementFile_alloc(Hex20,out->order,out->reduced_order,mpi_info));
# Line 154  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 152  Finley_Mesh* Finley_RectangularMesh_Hex2
152    offset0=e_offset0*N_PER_E;    offset0=e_offset0*N_PER_E;
153    offset1=e_offset1*N_PER_E;    offset1=e_offset1*N_PER_E;
154    offset2=e_offset2*N_PER_E;    offset2=e_offset2*N_PER_E;
155    local_N0=local_NE0*N_PER_E+1;    local_N0=local_NE0>0 ? local_NE0*N_PER_E+1 : 0;
156    local_N1=local_NE1*N_PER_E+1;    local_N1=local_NE1>0 ? local_NE1*N_PER_E+1 : 0;
157    local_N2=local_NE2*N_PER_E+1;    local_N2=local_NE0>0 ? local_NE2*N_PER_E+1 : 0;
158    
159    /* get the number of surface elements */    /* get the number of surface elements */
160    
161    NFaceElements=0;    NFaceElements=0;
162    if (!periodic[2]) {    if (!periodic[2] && (local_NE2>0) ) {
163      NDOF2=N2;      NDOF2=N2;
164      if (offset2==0) NFaceElements+=local_NE1*local_NE0;      if (offset2==0) NFaceElements+=local_NE1*local_NE0;
165      if (local_NE2+e_offset2 == NE2) NFaceElements+=local_NE1*local_NE0;      if (local_NE2+e_offset2 == NE2) NFaceElements+=local_NE1*local_NE0;
# Line 169  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 167  Finley_Mesh* Finley_RectangularMesh_Hex2
167        NDOF2=N2-1;        NDOF2=N2-1;
168    }    }
169    
170    if (!periodic[0]) {    if (!periodic[0] && (local_NE1>0) ) {
171       NDOF0=N0;       NDOF0=N0;
172       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;
173       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;
174    } else {    } else {
175        NDOF0=N0-1;        NDOF0=N0-1;
176    }    }
177    if (!periodic[1]) {    if (!periodic[1] && (local_NE1>0) ) {
178       NDOF1=N1;       NDOF1=N1;
179       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;
180       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;
181    } else {    } else {
182        NDOF1=N1-1;        NDOF1=N1-1;
183    }    }
184    printf("HEX20 %d %d %d\n",local_NE0,local_NE1,local_NE2);
185    
186    /*  allocate tables: */    /*  allocate tables: */
187    
# Line 263  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 262  Finley_Mesh* Finley_RectangularMesh_Hex2
262       totalNECount=NE0*NE1*NE2;       totalNECount=NE0*NE1*NE2;
263       faceNECount=0;       faceNECount=0;
264       /*   these are the quadrilateral elements on boundary 1 (x3=0): */       /*   these are the quadrilateral elements on boundary 1 (x3=0): */
265       if (!periodic[2]) {       if (!periodic[2] && (local_NE2>0)) {
266         /* **  elements on boundary 100 (x3=0): */         /* **  elements on boundary 100 (x3=0): */
267         if (offset2==0) {         if (offset2==0) {
268            #pragma omp parallel for private(i0,i1,k,node0)            #pragma omp parallel for private(i0,i1,k,node0)
# Line 373  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 372  Finley_Mesh* Finley_RectangularMesh_Hex2
372         }         }
373         totalNECount+=NE1*NE0;         totalNECount+=NE1*NE0;
374       }       }
375       if (!periodic[0]) {       if (!periodic[0] && (local_NE0>0)) {
376          /* **  elements on boundary 001 (x1=0): */          /* **  elements on boundary 001 (x1=0): */
377            
378          if (e_offset0 == 0) {          if (e_offset0 == 0) {
# Line 489  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 488  Finley_Mesh* Finley_RectangularMesh_Hex2
488           }           }
489           totalNECount+=NE1*NE2;           totalNECount+=NE1*NE2;
490       }       }
491       if (!periodic[1]) {       if (!periodic[1] && (local_NE1>0)) {
492          /* **  elements on boundary 010 (x2=0): */          /* **  elements on boundary 010 (x2=0): */
493          if (e_offset1 == 0) {          if (e_offset1 == 0) {
494             #pragma omp parallel for private(i0,i2,k,node0)             #pragma omp parallel for private(i0,i2,k,node0)

Legend:
Removed from v.1384  
changed lines
  Added in v.1733

  ViewVC Help
Powered by ViewVC 1.1.26