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

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

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1733 by gross, Thu Aug 28 01:46:07 2008 UTC
# Line 130  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 130  Finley_Mesh* Finley_RectangularMesh_Hex8
130    offset0=e_offset0*N_PER_E;    offset0=e_offset0*N_PER_E;
131    offset1=e_offset1*N_PER_E;    offset1=e_offset1*N_PER_E;
132    offset2=e_offset2*N_PER_E;    offset2=e_offset2*N_PER_E;
133    local_N0=local_NE0*N_PER_E+1;    local_N0=local_NE0>0 ? local_NE0*N_PER_E+1 : 0;
134    local_N1=local_NE1*N_PER_E+1;    local_N1=local_NE1>0 ? local_NE1*N_PER_E+1 : 0;
135    local_N2=local_NE2*N_PER_E+1;    local_N2=local_NE2>0 ? local_NE2*N_PER_E+1 : 0;
136    
137    /* get the number of surface elements */    /* get the number of surface elements */
138    
139    NFaceElements=0;    NFaceElements=0;
140    if (!periodic[2]) {    if (!periodic[2] && (local_NE2>0)) {
141      NDOF2=N2;      NDOF2=N2;
142      if (offset2==0) NFaceElements+=local_NE1*local_NE0;      if (offset2==0) NFaceElements+=local_NE1*local_NE0;
143      if (local_NE2+e_offset2 == NE2) NFaceElements+=local_NE1*local_NE0;      if (local_NE2+e_offset2 == NE2) NFaceElements+=local_NE1*local_NE0;
# Line 145  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 145  Finley_Mesh* Finley_RectangularMesh_Hex8
145        NDOF2=N2-1;        NDOF2=N2-1;
146    }    }
147    
148    if (!periodic[0]) {    if (!periodic[0] && (local_NE0>0)) {
149       NDOF0=N0;       NDOF0=N0;
150       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;
151       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;
152    } else {    } else {
153        NDOF0=N0-1;        NDOF0=N0-1;
154    }    }
155    if (!periodic[1]) {    if (!periodic[1] && (local_NE1>0)) {
156       NDOF1=N1;       NDOF1=N1;
157       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;
158       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;
# Line 218  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 218  Finley_Mesh* Finley_RectangularMesh_Hex8
218       totalNECount=NE0*NE1*NE2;       totalNECount=NE0*NE1*NE2;
219       faceNECount=0;       faceNECount=0;
220       /*   these are the quadrilateral elements on boundary 1 (x3=0): */       /*   these are the quadrilateral elements on boundary 1 (x3=0): */
221       if (!periodic[2]) {       if (!periodic[2]  && (local_NE2>0)) {
222         /* **  elements on boundary 100 (x3=0): */         /* **  elements on boundary 100 (x3=0): */
223         if (e_offset2==0) {         if (e_offset2==0) {
224            #pragma omp parallel for private(i0,i1,k,node0)            #pragma omp parallel for private(i0,i1,k,node0)
# Line 286  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 286  Finley_Mesh* Finley_RectangularMesh_Hex8
286         }         }
287         totalNECount+=NE1*NE0;         totalNECount+=NE1*NE0;
288       }       }
289       if (!periodic[0]) {       if (!periodic[0]  && (local_NE0>0)) {
290          /* **  elements on boundary 001 (x1=0): */          /* **  elements on boundary 001 (x1=0): */
291            
292          if (e_offset0 == 0) {          if (e_offset0 == 0) {
# Line 355  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 355  Finley_Mesh* Finley_RectangularMesh_Hex8
355           }           }
356           totalNECount+=NE1*NE2;           totalNECount+=NE1*NE2;
357       }       }
358       if (!periodic[1]) {       if (!periodic[1] && (local_NE1>0)) {
359          /* **  elements on boundary 010 (x2=0): */          /* **  elements on boundary 010 (x2=0): */
360          if (e_offset1 == 0) {          if (e_offset1 == 0) {
361             #pragma omp parallel for private(i0,i2,k,node0)             #pragma omp parallel for private(i0,i2,k,node0)

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

  ViewVC Help
Powered by ViewVC 1.1.26