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

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

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

revision 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 42  Finley_Mesh* Finley_RectangularMesh_Rec4 Line 42  Finley_Mesh* Finley_RectangularMesh_Rec4
42    Finley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;    Finley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;
43    index_t node0, myRank;    index_t node0, myRank;
44    Finley_Mesh* out;    Finley_Mesh* out;
45    Paso_MPIInfo *mpi_info = NULL;    Esys_MPIInfo *mpi_info = NULL;
46    char name[50];    char name[50];
47    #ifdef Finley_TRACE    #ifdef Finley_TRACE
48    double time0=Finley_timer();    double time0=Finley_timer();
49    #endif    #endif
50    
51    /* get MPI information */    /* get MPI information */
52    mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );    mpi_info = Esys_MPIInfo_alloc( MPI_COMM_WORLD );
53    if (! Finley_noError()) {    if (! Finley_noError()) {
54          return NULL;          return NULL;
55    }    }
# Line 66  Finley_Mesh* Finley_RectangularMesh_Rec4 Line 66  Finley_Mesh* Finley_RectangularMesh_Rec4
66    sprintf(name,"Rectangular %d x %d mesh",N0,N1);    sprintf(name,"Rectangular %d x %d mesh",N0,N1);
67    out=Finley_Mesh_alloc(name,DIM, mpi_info);    out=Finley_Mesh_alloc(name,DIM, mpi_info);
68    if (! Finley_noError()) {    if (! Finley_noError()) {
69        Paso_MPIInfo_free( mpi_info );        Esys_MPIInfo_free( mpi_info );
70        return NULL;        return NULL;
71    }    }
72    refElements= Finley_ReferenceElementSet_alloc(Rec4,order,reduced_order);    refElements= Finley_ReferenceElementSet_alloc(Finley_Rec4,order,reduced_order);
73    if (useElementsOnFace) {    if (useElementsOnFace) {
74          refFaceElements=Finley_ReferenceElementSet_alloc(Rec4Face, order, reduced_order);          refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Rec4Face, order, reduced_order);
75          refContactElements=Finley_ReferenceElementSet_alloc(Rec4Face_Contact, order, reduced_order);          refContactElements=Finley_ReferenceElementSet_alloc(Finley_Rec4Face_Contact, order, reduced_order);
76    } else {    } else {
77          refFaceElements=Finley_ReferenceElementSet_alloc(Line2, order, reduced_order);          refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Line2, order, reduced_order);
78          refContactElements=Finley_ReferenceElementSet_alloc(Line2_Contact, order, reduced_order);          refContactElements=Finley_ReferenceElementSet_alloc(Finley_Line2_Contact, order, reduced_order);
79    }    }
80    refPoints=Finley_ReferenceElementSet_alloc(Point1, order, reduced_order);    refPoints=Finley_ReferenceElementSet_alloc(Finley_Point1, order, reduced_order);
81        
82    if ( Finley_noError()) {    if ( Finley_noError()) {
83        
# Line 92  Finley_Mesh* Finley_RectangularMesh_Rec4 Line 92  Finley_Mesh* Finley_RectangularMesh_Rec4
92          Nstride1=N0;          Nstride1=N0;
93          local_NE0=NE0;          local_NE0=NE0;
94           e_offset0=0;           e_offset0=0;
95           Paso_MPIInfo_Split(mpi_info,NE1,&local_NE1,&e_offset1);           Esys_MPIInfo_Split(mpi_info,NE1,&local_NE1,&e_offset1);
96      } else {      } else {
97        Nstride0=N1;        Nstride0=N1;
98          Nstride1=1;          Nstride1=1;
99          Paso_MPIInfo_Split(mpi_info,NE0,&local_NE0,&e_offset0);          Esys_MPIInfo_Split(mpi_info,NE0,&local_NE0,&e_offset0);
100          local_NE1=NE1;          local_NE1=NE1;
101           e_offset1=0;           e_offset1=0;
102      }      }
# Line 291  Finley_Mesh* Finley_RectangularMesh_Rec4 Line 291  Finley_Mesh* Finley_RectangularMesh_Rec4
291    Finley_ReferenceElementSet_dealloc(refContactElements);    Finley_ReferenceElementSet_dealloc(refContactElements);
292    Finley_ReferenceElementSet_dealloc(refFaceElements);    Finley_ReferenceElementSet_dealloc(refFaceElements);
293    Finley_ReferenceElementSet_dealloc(refElements);    Finley_ReferenceElementSet_dealloc(refElements);
294    Paso_MPIInfo_free( mpi_info );      Esys_MPIInfo_free( mpi_info );  
295    
296    return out;    return out;
297  }  }

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26