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

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

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

revision 971 by ksteube, Wed Feb 14 04:40:49 2007 UTC revision 1062 by gross, Mon Mar 26 06:17:53 2007 UTC
# Line 127  static void domain_calculateDimension( i Line 127  static void domain_calculateDimension( i
127  /**************************************************************/  /**************************************************************/
128    
129  #ifdef PASO_MPI  #ifdef PASO_MPI
130  Finley_Mesh* Finley_RectangularMesh_Rec8_singleCPU(int* numElements,double* Length,int* periodic,int order,int useElementsOnFace, Paso_MPIInfo *mpi_info)  Finley_Mesh* Finley_RectangularMesh_Rec8_singleCPU(int* numElements,double* Length,int* periodic,int order, index_t reduced_order, int useElementsOnFace, Paso_MPIInfo *mpi_info)
131  #else  #else
132  Finley_Mesh* Finley_RectangularMesh_Rec8(int* numElements,double* Length,int* periodic,int order,int useElementsOnFace)  Finley_Mesh* Finley_RectangularMesh_Rec8(int* numElements,double* Length,int* periodic,int order, index_t reduced_order, int useElementsOnFace)
133  #endif  #endif
134  {  {
135    dim_t N0,N1,NE0,NE1,i0,i1,totalNECount,faceNECount,NDOF0,NDOF1,NFaceElements,NUMNODES,M0,M1;    dim_t N0,N1,NE0,NE1,i0,i1,totalNECount,faceNECount,NDOF0,NDOF1,NFaceElements,NUMNODES,M0,M1;
# Line 173  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 173  Finley_Mesh* Finley_RectangularMesh_Rec8
173        
174    sprintf(name,"Rectangular %d x %d mesh",N0,N1);    sprintf(name,"Rectangular %d x %d mesh",N0,N1);
175  #ifdef PASO_MPI  #ifdef PASO_MPI
176    out=Finley_Mesh_alloc(name,2,order,mpi_info);    out=Finley_Mesh_alloc(name,2,order, reduced_order,mpi_info);
177  #else  #else
178    out=Finley_Mesh_alloc(name,2,order);    out=Finley_Mesh_alloc(name,2,order, reduced_order);
179  #endif  #endif
180    if (! Finley_noError()) return NULL;    if (! Finley_noError()) return NULL;
181    
182  #ifdef PASO_MPI  #ifdef PASO_MPI
183    out->Elements=Finley_ElementFile_alloc(Rec8,out->order,mpi_info);    out->Elements=Finley_ElementFile_alloc(Rec8,out->order, out->reduced_order,mpi_info);
184    if (useElementsOnFace) {    if (useElementsOnFace) {
185       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order, out->reduced_order,mpi_info);
186       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order, out->reduced_order,mpi_info);
187    } else {    } else {
188       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order, out->reduced_order,mpi_info);
189       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order, out->reduced_order,mpi_info);
190    }    }
191    out->Points=Finley_ElementFile_alloc(Point1,out->order,mpi_info);    out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order,mpi_info);
192  #else  #else
193    out->Elements=Finley_ElementFile_alloc(Rec8,out->order);    out->Elements=Finley_ElementFile_alloc(Rec8,out->order, out->reduced_order);
194    if (useElementsOnFace) {    if (useElementsOnFace) {
195       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order);       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order, out->reduced_order);
196       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order);       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order, out->reduced_order);
197    } else {    } else {
198       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order);       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order, out->reduced_order);
199       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order);       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order, out->reduced_order);
200    }    }
201    out->Points=Finley_ElementFile_alloc(Point1,out->order);    out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order);
202  #endif  #endif
203    
204    if (! Finley_noError()) {    if (! Finley_noError()) {
# Line 458  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 458  Finley_Mesh* Finley_RectangularMesh_Rec8
458  }  }
459    
460  #ifdef PASO_MPI  #ifdef PASO_MPI
461  Finley_Mesh* Finley_RectangularMesh_Rec8(int* numElements,double* Length,int* periodic,int order,int useElementsOnFace) {  Finley_Mesh* Finley_RectangularMesh_Rec8(int* numElements,double* Length,int* periodic,int order, index_t reduced_order ,int useElementsOnFace) {
462    dim_t N0,N1,NE0,NE1,i0,i1,totalNECount,faceNECount,NDOF0,NDOF1,NFaceElements,NUMNODES, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal, DOFBoundary[2];    dim_t N0,N1,NE0,NE1,i0,i1,totalNECount,faceNECount,NDOF0,NDOF1,NFaceElements,NUMNODES, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal, DOFBoundary[2];
463      dim_t N0t, NDOF0t;      dim_t N0t, NDOF0t;
464    index_t *numForward=NULL, *numBackward=NULL;    index_t *numForward=NULL, *numBackward=NULL;
# Line 497  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 497  Finley_Mesh* Finley_RectangularMesh_Rec8
497    
498      // use the serial method for the single CPU case      // use the serial method for the single CPU case
499      if( mpi_info->size==1 ){      if( mpi_info->size==1 ){
500          out = Finley_RectangularMesh_Rec8_singleCPU( numElements,Length,periodic,order,useElementsOnFace, mpi_info);          out = Finley_RectangularMesh_Rec8_singleCPU( numElements,Length,periodic,order, reduced_order,useElementsOnFace, mpi_info);
501          return out;          return out;
502      }      }
503            
# Line 535  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 535  Finley_Mesh* Finley_RectangularMesh_Rec8
535    /*  allocate mesh: */    /*  allocate mesh: */
536        
537    sprintf(name,"Rectangular %d x %d mesh",N0,N1);    sprintf(name,"Rectangular %d x %d mesh",N0,N1);
538    out=Finley_Mesh_alloc(name,2,order,mpi_info);    out=Finley_Mesh_alloc(name,2,order,reduced_order,mpi_info);
539    
540    if (! Finley_noError()) return NULL;    if (! Finley_noError()) return NULL;
541    
542    out->Elements=Finley_ElementFile_alloc(Rec8,out->order,mpi_info);    out->Elements=Finley_ElementFile_alloc(Rec8,out->order, out->reduced_order,mpi_info);
543    if (useElementsOnFace) {    if (useElementsOnFace) {
544       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Rec8Face,out->order, out->reduced_order,mpi_info);
545       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Rec8Face_Contact,out->order, out->reduced_order,mpi_info);
546    } else {    } else {
547       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order,mpi_info);       out->FaceElements=Finley_ElementFile_alloc(Line3,out->order, out->reduced_order,mpi_info);
548       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order,mpi_info);       out->ContactElements=Finley_ElementFile_alloc(Line3_Contact,out->order, out->reduced_order,mpi_info);
549    }    }
550    out->Points=Finley_ElementFile_alloc(Point1,out->order,mpi_info);    out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order,mpi_info);
551    
552    if (! Finley_noError()) {    if (! Finley_noError()) {
553         Finley_Mesh_dealloc(out);         Finley_Mesh_dealloc(out);

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

  ViewVC Help
Powered by ViewVC 1.1.26