/[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

revision 1414 by gross, Thu Feb 14 10:01:43 2008 UTC revision 1733 by gross, Thu Aug 28 01:46:07 2008 UTC
# Line 152  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 167  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 261  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 371  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 487  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.1414  
changed lines
  Added in v.1733

  ViewVC Help
Powered by ViewVC 1.1.26