/[escript]/trunk/finley/src/Mesh_hex20.cpp
ViewVC logotype

Diff of /trunk/finley/src/Mesh_hex20.cpp

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

revision 4491 by caltinay, Fri May 31 07:09:03 2013 UTC revision 4492 by caltinay, Tue Jul 2 01:44:11 2013 UTC
# Line 44  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 44  Finley_Mesh* Finley_RectangularMesh_Hex2
44    index_t node0, myRank, e_offset0, e_offset1, e_offset2, offset0=0, offset1=0, offset2=0, global_i0, global_i1, global_i2;    index_t node0, myRank, e_offset0, e_offset1, e_offset2, offset0=0, offset1=0, offset2=0, global_i0, global_i1, global_i2;
45    Finley_Mesh* out;    Finley_Mesh* out;
46    Esys_MPIInfo *mpi_info = NULL;    Esys_MPIInfo *mpi_info = NULL;
47    Finley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;    ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;
48    char name[50];    char name[50];
49    bool_t generateAllNodes= useFullElementOrder || useMacroElements;    bool_t generateAllNodes= useFullElementOrder || useMacroElements;
50    #ifdef Finley_TRACE    #ifdef Finley_TRACE
# Line 78  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 78  Finley_Mesh* Finley_RectangularMesh_Hex2
78    if (generateAllNodes) {    if (generateAllNodes) {
79       /* 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."); */
80       if (useMacroElements) {       if (useMacroElements) {
81            refElements= Finley_ReferenceElementSet_alloc(Finley_Hex27Macro,order,reduced_order);            refElements= ReferenceElementSet_alloc(Hex27Macro,order,reduced_order);
82       } else {       } else {
83            refElements=Finley_ReferenceElementSet_alloc(Finley_Hex27, order,reduced_order);            refElements=ReferenceElementSet_alloc(Hex27, order,reduced_order);
84       }       }
85       if (useElementsOnFace) {       if (useElementsOnFace) {
86           Finley_setError(SYSTEM_ERROR,"rich elements for Hex27 elements is not supported yet.");           Finley_setError(SYSTEM_ERROR,"rich elements for Hex27 elements is not supported yet.");
87       } else {       } else {
88           if (useMacroElements) {           if (useMacroElements) {
89               refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Rec9Macro, order, reduced_order);               refFaceElements=ReferenceElementSet_alloc(Rec9Macro, order, reduced_order);
90           } else {           } else {
91               refFaceElements=Finley_ReferenceElementSet_alloc(Finley_Rec9, order, reduced_order);               refFaceElements=ReferenceElementSet_alloc(Rec9, order, reduced_order);
92           }           }
93           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Rec9_Contact, order, reduced_order);           refContactElements=ReferenceElementSet_alloc(Rec9_Contact, order, reduced_order);
94       }       }
95    
96    } else  {    } else  {
97       refElements= Finley_ReferenceElementSet_alloc(Finley_Hex20,order, reduced_order);       refElements= ReferenceElementSet_alloc(Hex20,order, reduced_order);
98       if (useElementsOnFace) {       if (useElementsOnFace) {
99           refFaceElements = Finley_ReferenceElementSet_alloc(Finley_Hex20Face, order, reduced_order);           refFaceElements = ReferenceElementSet_alloc(Hex20Face, order, reduced_order);
100           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Hex20Face_Contact, order, reduced_order);           refContactElements=ReferenceElementSet_alloc(Hex20Face_Contact, order, reduced_order);
101    
102       } else {       } else {
103           refFaceElements = Finley_ReferenceElementSet_alloc(Finley_Rec8, order, reduced_order);           refFaceElements = ReferenceElementSet_alloc(Rec8, order, reduced_order);
104           refContactElements=Finley_ReferenceElementSet_alloc(Finley_Rec8_Contact, order, reduced_order);           refContactElements=ReferenceElementSet_alloc(Rec8_Contact, order, reduced_order);
105    
106       }       }
107    }    }
108    refPoints=Finley_ReferenceElementSet_alloc(Finley_Point1, order, reduced_order);    refPoints=ReferenceElementSet_alloc(Point1, order, reduced_order);
109    
110    if ( Finley_noError()) {    if ( Finley_noError()) {
111        
# Line 616  Finley_Mesh* Finley_RectangularMesh_Hex2 Line 616  Finley_Mesh* Finley_RectangularMesh_Hex2
616        Finley_Mesh_free(out);        Finley_Mesh_free(out);
617    }    }
618      /* free up memory */      /* free up memory */
619    Finley_ReferenceElementSet_dealloc(refPoints);    ReferenceElementSet_dealloc(refPoints);
620    Finley_ReferenceElementSet_dealloc(refContactElements);    ReferenceElementSet_dealloc(refContactElements);
621    Finley_ReferenceElementSet_dealloc(refFaceElements);    ReferenceElementSet_dealloc(refFaceElements);
622    Finley_ReferenceElementSet_dealloc(refElements);    ReferenceElementSet_dealloc(refElements);
623    Esys_MPIInfo_free( mpi_info );      Esys_MPIInfo_free( mpi_info );  
624    
625    return out;    return out;

Legend:
Removed from v.4491  
changed lines
  Added in v.4492

  ViewVC Help
Powered by ViewVC 1.1.26