/[escript]/branches/arrayview_from_1695_trunk/finley/src/Mesh_hex20.c
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/finley/src/Mesh_hex20.c

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

revision 1780 by jfenwick, Mon Aug 11 03:33:40 2008 UTC revision 1781 by jfenwick, Thu Sep 11 05:03:14 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    /*  allocate tables: */    /*  allocate tables: */
185    
186    Finley_NodeFile_allocTable(out->Nodes,local_N0*local_N1*local_N2);    Finley_NodeFile_allocTable(out->Nodes,local_N0*local_N1*local_N2);
# Line 261  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 260  Finley_Mesh* Finley_RectangularMesh_Hex2
260       totalNECount=NE0*NE1*NE2;       totalNECount=NE0*NE1*NE2;
261       faceNECount=0;       faceNECount=0;
262       /*   these are the quadrilateral elements on boundary 1 (x3=0): */       /*   these are the quadrilateral elements on boundary 1 (x3=0): */
263       if (!periodic[2]) {       if (!periodic[2] && (local_NE2>0)) {
264         /* **  elements on boundary 100 (x3=0): */         /* **  elements on boundary 100 (x3=0): */
265         if (offset2==0) {         if (offset2==0) {
266            #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 370  Finley_Mesh* Finley_RectangularMesh_Hex2
370         }         }
371         totalNECount+=NE1*NE0;         totalNECount+=NE1*NE0;
372       }       }
373       if (!periodic[0]) {       if (!periodic[0] && (local_NE0>0)) {
374          /* **  elements on boundary 001 (x1=0): */          /* **  elements on boundary 001 (x1=0): */
375            
376          if (e_offset0 == 0) {          if (e_offset0 == 0) {
# Line 487  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 486  Finley_Mesh* Finley_RectangularMesh_Hex2
486           }           }
487           totalNECount+=NE1*NE2;           totalNECount+=NE1*NE2;
488       }       }
489       if (!periodic[1]) {       if (!periodic[1] && (local_NE1>0)) {
490          /* **  elements on boundary 010 (x2=0): */          /* **  elements on boundary 010 (x2=0): */
491          if (e_offset1 == 0) {          if (e_offset1 == 0) {
492             #pragma omp parallel for private(i0,i2,k,node0)             #pragma omp parallel for private(i0,i2,k,node0)

Legend:
Removed from v.1780  
changed lines
  Added in v.1781

  ViewVC Help
Powered by ViewVC 1.1.26