/[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 964 by gross, Tue Feb 13 05:10:26 2007 UTC revision 1062 by gross, Mon Mar 26 06:17:53 2007 UTC
# Line 115  static void domain_calculateDimension( i Line 115  static void domain_calculateDimension( i
115  #endif  #endif
116    
117  #ifdef PASO_MPI  #ifdef PASO_MPI
118  Finley_Mesh* Finley_RectangularMesh_Hex8_singleCPU(dim_t* numElements,double* Length,bool_t* periodic, index_t order,bool_t useElementsOnFace,Paso_MPIInfo *mpi_info)  Finley_Mesh* Finley_RectangularMesh_Hex8_singleCPU(dim_t* numElements,double* Length,bool_t* periodic, index_t order, index_t reduced_order, bool_t useElementsOnFace,Paso_MPIInfo *mpi_info)
119  #else  #else
120  Finley_Mesh* Finley_RectangularMesh_Hex8(dim_t* numElements,double* Length,bool_t* periodic, index_t order,bool_t useElementsOnFace)  Finley_Mesh* Finley_RectangularMesh_Hex8(dim_t* numElements,double* Length,bool_t* periodic, index_t order, index_t reduced_order, bool_t useElementsOnFace)
121  #endif  #endif
122  {  {
123    dim_t N0,N1,N2,NE0,NE1,NE2,i0,i1,i2,k,totalNECount,faceNECount,NDOF0,NDOF1,NDOF2,NFaceElements,NUMNODES,M0,M1,M2;    dim_t N0,N1,N2,NE0,NE1,NE2,i0,i1,i2,k,totalNECount,faceNECount,NDOF0,NDOF1,NDOF2,NFaceElements,NUMNODES,M0,M1,M2;
# Line 190  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 190  Finley_Mesh* Finley_RectangularMesh_Hex8
190    sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2);    sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2);
191    
192  #ifndef PASO_MPI  #ifndef PASO_MPI
193    out=Finley_Mesh_alloc(name,3,order);    out=Finley_Mesh_alloc(name,3,order,reduced_order);
194  #else  #else
195    out=Finley_Mesh_alloc(name,3,order,mpi_info);    out=Finley_Mesh_alloc(name,3,order,reduced_order,mpi_info);
196  #endif  #endif
197    if (! Finley_noError()) return NULL;    if (! Finley_noError()) return NULL;
198    
199  #ifdef PASO_MPI  #ifdef PASO_MPI
200    out->Elements=Finley_ElementFile_alloc(Hex8,out->order,mpi_info);    out->Elements=Finley_ElementFile_alloc(Hex8,out->order,out->reduced_order,mpi_info);
201    if (useElementsOnFace) {    if (useElementsOnFace) {
202       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,out->reduced_order,mpi_info);
203       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order,out->reduced_order,mpi_info);
204    } else {    } else {
205       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order,out->reduced_order,mpi_info);
206       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order,out->reduced_order,mpi_info);
207    }    }
208    out->Points=Finley_ElementFile_alloc(Point1,out->order,mpi_info);    out->Points=Finley_ElementFile_alloc(Point1,out->order,out->reduced_order,mpi_info);
209  #else  #else
210    out->Elements=Finley_ElementFile_alloc(Hex8,out->order);    out->Elements=Finley_ElementFile_alloc(Hex8,out->order, out->reduced_order);
211    if (useElementsOnFace) {    if (useElementsOnFace) {
212       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order);       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,out->reduced_order);
213       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order);       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order, out->reduced_order);
214    } else {    } else {
215       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order);       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order, out->reduced_order);
216       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order);       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order, out->reduced_order);
217    }    }
218    out->Points=Finley_ElementFile_alloc(Point1,out->order);    out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order);
219  #endif  #endif
220    if (! Finley_noError()) {    if (! Finley_noError()) {
221        Finley_Mesh_dealloc(out);        Finley_Mesh_dealloc(out);
# Line 574  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 574  Finley_Mesh* Finley_RectangularMesh_Hex8
574  }  }
575    
576  #ifdef PASO_MPI  #ifdef PASO_MPI
577  Finley_Mesh* Finley_RectangularMesh_Hex8(dim_t* numElements,double* Length,bool_t* periodic, index_t order,bool_t useElementsOnFace)  Finley_Mesh* Finley_RectangularMesh_Hex8(dim_t* numElements,double* Length,bool_t* periodic, index_t order, index_t reduced_order, bool_t useElementsOnFace)
578  {  {
579    dim_t N0,N1,N2,N0t,NDOF0t,NE0,NE1,NE2,i0,i1,i2,kk,k,totalNECount,faceNECount,NDOF0,NDOF1,NDOF2,NFaceElements,NUMNODES;//,M0,M1,M2;    dim_t N0,N1,N2,N0t,NDOF0t,NE0,NE1,NE2,i0,i1,i2,kk,k,totalNECount,faceNECount,NDOF0,NDOF1,NDOF2,NFaceElements,NUMNODES;//,M0,M1,M2;
580    dim_t idCount, NE0_local, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal;    dim_t idCount, NE0_local, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal;
# Line 611  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 611  Finley_Mesh* Finley_RectangularMesh_Hex8
611    /* use the serial version to generate the mesh for the 1-CPU case */    /* use the serial version to generate the mesh for the 1-CPU case */
612    if( mpi_info->size==1 )    if( mpi_info->size==1 )
613    {    {
614      out =  Finley_RectangularMesh_Hex8_singleCPU( numElements, Length, periodic, order, useElementsOnFace, mpi_info );      out =  Finley_RectangularMesh_Hex8_singleCPU( numElements, Length, periodic, order, reduced_order, useElementsOnFace, mpi_info );
615          return out;          return out;
616    }        }    
617    
# Line 650  Finley_Mesh* Finley_RectangularMesh_Hex8 Line 650  Finley_Mesh* Finley_RectangularMesh_Hex8
650    /*  allocate mesh: */    /*  allocate mesh: */
651    sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2);    sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2);
652    
653    out=Finley_Mesh_alloc(name,3,order,mpi_info);    out=Finley_Mesh_alloc(name,3,order,reduced_order,mpi_info);
654    if (! Finley_noError()) return NULL;    if (! Finley_noError()) return NULL;
655    
656    out->Elements=Finley_ElementFile_alloc(Hex8,out->order,mpi_info);    out->Elements=Finley_ElementFile_alloc(Hex8,out->order,out->reduced_order, mpi_info);
657    if (useElementsOnFace) {    if (useElementsOnFace) {
658       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Hex8Face,out->order,out->reduced_order, mpi_info);
659       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Hex8Face_Contact,out->order,out->reduced_order, mpi_info);
660    } else {    } else {
661       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Rec4,out->order,out->reduced_order, mpi_info);
662       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Rec4_Contact,out->order,out->reduced_order, mpi_info);
663    }    }
664    out->Points=Finley_ElementFile_alloc(Point1,out->order,mpi_info);    out->Points=Finley_ElementFile_alloc(Point1,out->order,out->reduced_order, mpi_info);
665    
666    if (! Finley_noError()) {    if (! Finley_noError()) {
667        Finley_Mesh_dealloc(out);        Finley_Mesh_dealloc(out);

Legend:
Removed from v.964  
changed lines
  Added in v.1062

  ViewVC Help
Powered by ViewVC 1.1.26