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

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

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

revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 29  Line 29 
29  /*static double  Finley_Mesh_lockingGridSize=0;*/  /*static double  Finley_Mesh_lockingGridSize=0;*/
30    
31  Finley_Mesh* Finley_Mesh_merge(dim_t numMsh, Finley_Mesh** msh) {  Finley_Mesh* Finley_Mesh_merge(dim_t numMsh, Finley_Mesh** msh) {
32    Paso_MPIInfo *mpi_info=NULL;    Esys_MPIInfo *mpi_info=NULL;
33    Finley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;    Finley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;
34    Finley_Mesh* out=NULL;    Finley_Mesh* out=NULL;
35    dim_t numNodes=0;    dim_t numNodes=0;
# Line 40  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 40  Finley_Mesh* Finley_Mesh_merge(dim_t num
40    dim_t i;    dim_t i;
41    index_t order, reduced_order;    index_t order, reduced_order;
42    dim_t numDim;    dim_t numDim;
43    ElementTypeId elementTypeId=NoRef ;    Finley_ElementTypeId elementTypeId=Finley_NoRef;
44    ElementTypeId faceElementTypeId=NoRef ;    Finley_ElementTypeId faceElementTypeId=Finley_NoRef;
45    ElementTypeId pointTypeId=NoRef ;    Finley_ElementTypeId pointTypeId=Finley_NoRef;
46    ElementTypeId contactTypeId=NoRef ;    Finley_ElementTypeId contactTypeId=Finley_NoRef;
47    index_t maxNodeID=0;    index_t maxNodeID=0;
48    index_t maxDOF=0;    index_t maxDOF=0;
49    index_t maxElementID=0;    index_t maxElementID=0;
# Line 77  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 77  Finley_Mesh* Finley_Mesh_merge(dim_t num
77    
78         if (msh[i]->Elements!=NULL) {         if (msh[i]->Elements!=NULL) {
79            numElements+=msh[i]->Elements->numElements;            numElements+=msh[i]->Elements->numElements;
80            if (elementTypeId==NoRef ) {            if (elementTypeId==Finley_NoRef) {
81               elementTypeId=msh[i]->Elements->referenceElementSet->referenceElement->Type->TypeId;               elementTypeId=msh[i]->Elements->referenceElementSet->referenceElement->Type->TypeId;
82            } else {            } else {
83               if (elementTypeId!=msh[i]->Elements->referenceElementSet->referenceElement->Type->TypeId ) {               if (elementTypeId!=msh[i]->Elements->referenceElementSet->referenceElement->Type->TypeId ) {
# Line 88  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 88  Finley_Mesh* Finley_Mesh_merge(dim_t num
88    
89         if (msh[i]->FaceElements!=NULL) {         if (msh[i]->FaceElements!=NULL) {
90            numFaceElements+=msh[i]->FaceElements->numElements;            numFaceElements+=msh[i]->FaceElements->numElements;
91            if (faceElementTypeId==NoRef ) {            if (faceElementTypeId==Finley_NoRef) {
92               faceElementTypeId=msh[i]->FaceElements->referenceElementSet->referenceElement->Type->TypeId;               faceElementTypeId=msh[i]->FaceElements->referenceElementSet->referenceElement->Type->TypeId;
93            } else {            } else {
94               if (faceElementTypeId!=msh[i]->FaceElements->referenceElementSet->referenceElement->Type->TypeId ) {               if (faceElementTypeId!=msh[i]->FaceElements->referenceElementSet->referenceElement->Type->TypeId ) {
# Line 99  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 99  Finley_Mesh* Finley_Mesh_merge(dim_t num
99    
100         if (msh[i]->ContactElements!=NULL) {         if (msh[i]->ContactElements!=NULL) {
101            numContactElements+=msh[i]->ContactElements->numElements;            numContactElements+=msh[i]->ContactElements->numElements;
102            if (contactTypeId==NoRef ) {            if (contactTypeId==Finley_NoRef) {
103               contactTypeId=msh[i]->ContactElements->referenceElementSet->referenceElement->Type->TypeId;               contactTypeId=msh[i]->ContactElements->referenceElementSet->referenceElement->Type->TypeId;
104            } else {            } else {
105               if (contactTypeId!=msh[i]->ContactElements->referenceElementSet->referenceElement->Type->TypeId ) {               if (contactTypeId!=msh[i]->ContactElements->referenceElementSet->referenceElement->Type->TypeId ) {
# Line 110  Finley_Mesh* Finley_Mesh_merge(dim_t num Line 110  Finley_Mesh* Finley_Mesh_merge(dim_t num
110    
111         if (msh[i]->Points!=NULL) {         if (msh[i]->Points!=NULL) {
112            numPoints+=msh[i]->Points->numElements;            numPoints+=msh[i]->Points->numElements;
113            if (pointTypeId==NoRef ) {            if (pointTypeId==Finley_NoRef) {
114               pointTypeId=msh[i]->Points->referenceElementSet->referenceElement->Type->TypeId;               pointTypeId=msh[i]->Points->referenceElementSet->referenceElement->Type->TypeId;
115            } else {            } else {
116               if (pointTypeId!=msh[i]->Points->referenceElementSet->referenceElement->Type->TypeId ) {               if (pointTypeId!=msh[i]->Points->referenceElementSet->referenceElement->Type->TypeId ) {

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

  ViewVC Help
Powered by ViewVC 1.1.26