/[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 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_Rec8 Line 42  Finley_Mesh* Finley_RectangularMesh_Rec8
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    bool_t generateAllNodes= useFullElementOrder || useMacroElements;    bool_t generateAllNodes= useFullElementOrder || useMacroElements;
48    #ifdef Finley_TRACE    #ifdef Finley_TRACE
# Line 50  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 50  Finley_Mesh* Finley_RectangularMesh_Rec8
50    #endif    #endif
51    
52    /* get MPI information */    /* get MPI information */
53    mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );    mpi_info = Esys_MPIInfo_alloc( MPI_COMM_WORLD );
54    if (! Finley_noError()) {    if (! Finley_noError()) {
55          return NULL;          return NULL;
56    }    }
# Line 67  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 67  Finley_Mesh* Finley_RectangularMesh_Rec8
67    sprintf(name,"Rectangular %d x %d mesh",N0,N1);    sprintf(name,"Rectangular %d x %d mesh",N0,N1);
68    out=Finley_Mesh_alloc(name,DIM, mpi_info);    out=Finley_Mesh_alloc(name,DIM, mpi_info);
69    if (! Finley_noError()) {    if (! Finley_noError()) {
70        Paso_MPIInfo_free( mpi_info );        Esys_MPIInfo_free( mpi_info );
71        return NULL;        return NULL;
72    }    }
73    if (generateAllNodes) {    if (generateAllNodes) {
74       /* Finley_setError(SYSTEM_ERROR,"full element order for Hex elements is not supported yet."); */       /* Finley_setError(SYSTEM_ERROR,"full element order for Hex elements is not supported yet."); */
75       if (useMacroElements) {       if (useMacroElements) {
76            refElements= Finley_ReferenceElementSet_alloc(Rec9Macro,order,reduced_order);            refElements= Finley_ReferenceElementSet_alloc(Finley_Rec9Macro,order,reduced_order);
77       } else {       } else {
78            refElements=Finley_ReferenceElementSet_alloc(Rec9, order,reduced_order);            refElements=Finley_ReferenceElementSet_alloc(Finley_Rec9, order,reduced_order);
79       }       }
80       if (useElementsOnFace) {       if (useElementsOnFace) {
81           Finley_setError(SYSTEM_ERROR,"rich elements for Rec9 elements is not supported yet.");           Finley_setError(SYSTEM_ERROR,"rich elements for Finley_Rec9 elements is not supported yet.");
82       } else {       } else {
83           if (useMacroElements) {           if (useMacroElements) {
84               refFaceElements=Finley_ReferenceElementSet_alloc(Line3Macro, order, reduced_order);               refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Line3Macro, order, reduced_order);
85           } else {           } else {
86               refFaceElements=Finley_ReferenceElementSet_alloc(Line3, order, reduced_order);               refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Line3, order, reduced_order);
87           }           }
88           refContactElements=Finley_ReferenceElementSet_alloc(Line3_Contact, order, reduced_order);           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Line3_Contact, order, reduced_order);
89       }       }
90    
91    } else  {    } else  {
92       refElements= Finley_ReferenceElementSet_alloc(Rec8,order,reduced_order);       refElements= Finley_ReferenceElementSet_alloc(Finley_Rec8,order,reduced_order);
93       if (useElementsOnFace) {       if (useElementsOnFace) {
94           refFaceElements= Finley_ReferenceElementSet_alloc(Rec8Face ,order,reduced_order);           refFaceElements= Finley_ReferenceElementSet_alloc(Finley_Rec8Face ,order,reduced_order);
95           refContactElements=Finley_ReferenceElementSet_alloc(Rec8Face_Contact, order, reduced_order);           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Rec8Face_Contact, order, reduced_order);
96    
97       } else {       } else {
98           refFaceElements= Finley_ReferenceElementSet_alloc(Line3 ,order,reduced_order);           refFaceElements= Finley_ReferenceElementSet_alloc(Finley_Line3 ,order,reduced_order);
99           refContactElements=Finley_ReferenceElementSet_alloc(Line3_Contact, order, reduced_order);           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Line3_Contact, order, reduced_order);
100    
101       }       }
102    }    }
103    refPoints=Finley_ReferenceElementSet_alloc(Point1, order, reduced_order);    refPoints=Finley_ReferenceElementSet_alloc(Finley_Point1, order, reduced_order);
104    
105    
106    if ( Finley_noError()) {    if ( Finley_noError()) {
# Line 116  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 116  Finley_Mesh* Finley_RectangularMesh_Rec8
116            Nstride1=N0;            Nstride1=N0;
117            local_NE0=NE0;            local_NE0=NE0;
118            e_offset0=0;            e_offset0=0;
119            Paso_MPIInfo_Split(mpi_info,NE1,&local_NE1,&e_offset1);            Esys_MPIInfo_Split(mpi_info,NE1,&local_NE1,&e_offset1);
120        } else {        } else {
121            Nstride0=N1;            Nstride0=N1;
122            Nstride1=1;            Nstride1=1;
123            Paso_MPIInfo_Split(mpi_info,NE0,&local_NE0,&e_offset0);            Esys_MPIInfo_Split(mpi_info,NE0,&local_NE0,&e_offset0);
124            local_NE1=NE1;            local_NE1=NE1;
125            e_offset1=0;            e_offset1=0;
126        }        }
# Line 344  Finley_Mesh* Finley_RectangularMesh_Rec8 Line 344  Finley_Mesh* Finley_RectangularMesh_Rec8
344      Finley_ReferenceElementSet_dealloc(refContactElements);      Finley_ReferenceElementSet_dealloc(refContactElements);
345      Finley_ReferenceElementSet_dealloc(refFaceElements);      Finley_ReferenceElementSet_dealloc(refFaceElements);
346      Finley_ReferenceElementSet_dealloc(refElements);      Finley_ReferenceElementSet_dealloc(refElements);
347      Paso_MPIInfo_free( mpi_info );        Esys_MPIInfo_free( mpi_info );  
348    
349     return out;     return out;
350  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.26