/[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 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC revision 1811 by ksteube, Thu Sep 25 23:11:13 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 130  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 129  Finley_Mesh* Finley_RectangularMesh_Hex8
129    offset0=e_offset0*N_PER_E;    offset0=e_offset0*N_PER_E;
130    offset1=e_offset1*N_PER_E;    offset1=e_offset1*N_PER_E;
131    offset2=e_offset2*N_PER_E;    offset2=e_offset2*N_PER_E;
132    local_N0=local_NE0*N_PER_E+1;    local_N0=local_NE0>0 ? local_NE0*N_PER_E+1 : 0;
133    local_N1=local_NE1*N_PER_E+1;    local_N1=local_NE1>0 ? local_NE1*N_PER_E+1 : 0;
134    local_N2=local_NE2*N_PER_E+1;    local_N2=local_NE2>0 ? local_NE2*N_PER_E+1 : 0;
135    
136    /* get the number of surface elements */    /* get the number of surface elements */
137    
138    NFaceElements=0;    NFaceElements=0;
139    if (!periodic[2]) {    if (!periodic[2] && (local_NE2>0)) {
140      NDOF2=N2;      NDOF2=N2;
141      if (offset2==0) NFaceElements+=local_NE1*local_NE0;      if (offset2==0) NFaceElements+=local_NE1*local_NE0;
142      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 144  Finley_Mesh* Finley_RectangularMesh_Hex8
144        NDOF2=N2-1;        NDOF2=N2-1;
145    }    }
146    
147    if (!periodic[0]) {    if (!periodic[0] && (local_NE0>0)) {
148       NDOF0=N0;       NDOF0=N0;
149       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;       if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;
150       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;       if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;
151    } else {    } else {
152        NDOF0=N0-1;        NDOF0=N0-1;
153    }    }
154    if (!periodic[1]) {    if (!periodic[1] && (local_NE1>0)) {
155       NDOF1=N1;       NDOF1=N1;
156       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;       if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;
157       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 217  Finley_Mesh* Finley_RectangularMesh_Hex8
217       totalNECount=NE0*NE1*NE2;       totalNECount=NE0*NE1*NE2;
218       faceNECount=0;       faceNECount=0;
219       /*   these are the quadrilateral elements on boundary 1 (x3=0): */       /*   these are the quadrilateral elements on boundary 1 (x3=0): */
220       if (!periodic[2]) {       if (!periodic[2]  && (local_NE2>0)) {
221         /* **  elements on boundary 100 (x3=0): */         /* **  elements on boundary 100 (x3=0): */
222         if (e_offset2==0) {         if (e_offset2==0) {
223            #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 285  Finley_Mesh* Finley_RectangularMesh_Hex8
285         }         }
286         totalNECount+=NE1*NE0;         totalNECount+=NE1*NE0;
287       }       }
288       if (!periodic[0]) {       if (!periodic[0]  && (local_NE0>0)) {
289          /* **  elements on boundary 001 (x1=0): */          /* **  elements on boundary 001 (x1=0): */
290            
291          if (e_offset0 == 0) {          if (e_offset0 == 0) {
# Line 355  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 354  Finley_Mesh* Finley_RectangularMesh_Hex8
354           }           }
355           totalNECount+=NE1*NE2;           totalNECount+=NE1*NE2;
356       }       }
357       if (!periodic[1]) {       if (!periodic[1] && (local_NE1>0)) {
358          /* **  elements on boundary 010 (x2=0): */          /* **  elements on boundary 010 (x2=0): */
359          if (e_offset1 == 0) {          if (e_offset1 == 0) {
360             #pragma omp parallel for private(i0,i2,k,node0)             #pragma omp parallel for private(i0,i2,k,node0)

Legend:
Removed from v.1312  
changed lines
  Added in v.1811

  ViewVC Help
Powered by ViewVC 1.1.26