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

Diff of /branches/domexper/dudley/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 1854 by ksteube, Tue Oct 7 01:38:55 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 152  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 151  Finley_Mesh* Finley_RectangularMesh_Hex2
151    offset0=e_offset0*N_PER_E;    offset0=e_offset0*N_PER_E;
152    offset1=e_offset1*N_PER_E;    offset1=e_offset1*N_PER_E;
153    offset2=e_offset2*N_PER_E;    offset2=e_offset2*N_PER_E;
154    local_N0=local_NE0*N_PER_E+1;    local_N0=local_NE0>0 ? local_NE0*N_PER_E+1 : 0;
155    local_N1=local_NE1*N_PER_E+1;    local_N1=local_NE1>0 ? local_NE1*N_PER_E+1 : 0;
156    local_N2=local_NE2*N_PER_E+1;    local_N2=local_NE0>0 ? local_NE2*N_PER_E+1 : 0;
157    
158    /* get the number of surface elements */    /* get the number of surface elements */
159    
160    NFaceElements=0;    NFaceElements=0;
161    if (!periodic[2]) {    if (!periodic[2] && (local_NE2>0) ) {
162      NDOF2=N2;      NDOF2=N2;
163      if (offset2==0) NFaceElements+=local_NE1*local_NE0;      if (offset2==0) NFaceElements+=local_NE1*local_NE0;
164      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 166  Finley_Mesh* Finley_RectangularMesh_Hex2
166        NDOF2=N2-1;        NDOF2=N2-1;
167    }    }
168    
169    if (!periodic[0]) {    if (!periodic[0] && (local_NE0>0) ) {
170       NDOF0=N0;       NDOF0=N0;
171       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;
172       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;
173    } else {    } else {
174        NDOF0=N0-1;        NDOF0=N0-1;
175    }    }
176    if (!periodic[1]) {    if (!periodic[1] && (local_NE1>0) ) {
177       NDOF1=N1;       NDOF1=N1;
178       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;
179       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;       if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;
180    } else {    } else {
181        NDOF1=N1-1;        NDOF1=N1-1;
182    }    }
   
183    /*  allocate tables: */    /*  allocate tables: */
184    
185    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 259  Finley_Mesh* Finley_RectangularMesh_Hex2
259       totalNECount=NE0*NE1*NE2;       totalNECount=NE0*NE1*NE2;
260       faceNECount=0;       faceNECount=0;
261       /*   these are the quadrilateral elements on boundary 1 (x3=0): */       /*   these are the quadrilateral elements on boundary 1 (x3=0): */
262       if (!periodic[2]) {       if (!periodic[2] && (local_NE2>0)) {
263         /* **  elements on boundary 100 (x3=0): */         /* **  elements on boundary 100 (x3=0): */
264         if (offset2==0) {         if (offset2==0) {
265            #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 369  Finley_Mesh* Finley_RectangularMesh_Hex2
369         }         }
370         totalNECount+=NE1*NE0;         totalNECount+=NE1*NE0;
371       }       }
372       if (!periodic[0]) {       if (!periodic[0] && (local_NE0>0)) {
373          /* **  elements on boundary 001 (x1=0): */          /* **  elements on boundary 001 (x1=0): */
374            
375          if (e_offset0 == 0) {          if (e_offset0 == 0) {
# Line 487  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 485  Finley_Mesh* Finley_RectangularMesh_Hex2
485           }           }
486           totalNECount+=NE1*NE2;           totalNECount+=NE1*NE2;
487       }       }
488       if (!periodic[1]) {       if (!periodic[1] && (local_NE1>0)) {
489          /* **  elements on boundary 010 (x2=0): */          /* **  elements on boundary 010 (x2=0): */
490          if (e_offset1 == 0) {          if (e_offset1 == 0) {
491             #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.1854

  ViewVC Help
Powered by ViewVC 1.1.26