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

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

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

trunk/esys2/finley/src/finleyC/Mesh_joinFaces.c revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/finley/src/Mesh_joinFaces.c revision 730 by bcumming, Mon May 15 04:03:49 2006 UTC
# Line 1  Line 1 
1  /*  /*
2   ******************************************************************************   ************************************************************
3   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
4   *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *   *                                                          *
5   *                                                                            *   *              http://www.access.edu.au                    *
6   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
7   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
8   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
9   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
10   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
11  */  */
12    
13  /**************************************************************/  /**************************************************************/
# Line 38  void Finley_Mesh_joinFaces(Finley_Mesh* Line 36  void Finley_Mesh_joinFaces(Finley_Mesh*
36     if (self->FaceElements==NULL) return;     if (self->FaceElements==NULL) return;
37    
38     if (self->FaceElements->ReferenceElement->Type->numNodesOnFace<=0) {     if (self->FaceElements->ReferenceElement->Type->numNodesOnFace<=0) {
39       sprintf(error_msg,"__FILE__:joining faces cannot be applied to face elements of type %s",self->FaceElements->ReferenceElement->Type->Name);       sprintf(error_msg,"Finley_Mesh_joinFaces:joining faces cannot be applied to face elements of type %s",self->FaceElements->ReferenceElement->Type->Name);
40       Finley_setError(TYPE_ERROR,error_msg);       Finley_setError(TYPE_ERROR,error_msg);
41       return;       return;
42     }     }
43     if (self->ContactElements==NULL) {     if (self->ContactElements==NULL) {
44       Finley_setError(TYPE_ERROR,"__FILE__: no contact element file present.");       Finley_setError(TYPE_ERROR,"Finley_Mesh_joinFaces: no contact element file present.");
45       return;       return;
46     }     }
47    
# Line 51  void Finley_Mesh_joinFaces(Finley_Mesh* Line 49  void Finley_Mesh_joinFaces(Finley_Mesh*
49     int NN_Contact=self->ContactElements->ReferenceElement->Type->numNodes;     int NN_Contact=self->ContactElements->ReferenceElement->Type->numNodes;
50    
51     if (2*NN!=NN_Contact) {     if (2*NN!=NN_Contact) {
52       sprintf(error_msg,"__FILE__:contact element file for %s cannot hold elements created from face elements %s",       sprintf(error_msg,"Finley_Mesh_joinFaces:contact element file for %s cannot hold elements created from face elements %s",
53             self->ContactElements->ReferenceElement->Type->Name,self->FaceElements->ReferenceElement->Type->Name);             self->ContactElements->ReferenceElement->Type->Name,self->FaceElements->ReferenceElement->Type->Name);
54       Finley_setError(TYPE_ERROR,error_msg);       Finley_setError(TYPE_ERROR,error_msg);
55       return;       return;
# Line 83  void Finley_Mesh_joinFaces(Finley_Mesh* Line 81  void Finley_Mesh_joinFaces(Finley_Mesh*
81               }               }
82           }           }
83           /*  allocate new face element and Contact element files */           /*  allocate new face element and Contact element files */
84    #ifndef PASO_MPI
85           newContactElementsFile=Finley_ElementFile_alloc(self->ContactElements->ReferenceElement->Type->TypeId,self->ContactElements->order);           newContactElementsFile=Finley_ElementFile_alloc(self->ContactElements->ReferenceElement->Type->TypeId,self->ContactElements->order);
86           newFaceElementsFile=Finley_ElementFile_alloc(self->FaceElements->ReferenceElement->Type->TypeId,self->FaceElements->order);           newFaceElementsFile=Finley_ElementFile_alloc(self->FaceElements->ReferenceElement->Type->TypeId,self->FaceElements->order);
87    #else
88      /* TODO */
89      PASO_MPI_TODO;
90    #endif
91           if (Finley_noError()) {           if (Finley_noError()) {
92                 Finley_ElementFile_allocTable(newContactElementsFile,numPairs+self->ContactElements->numElements);                 Finley_ElementFile_allocTable(newContactElementsFile,numPairs+self->ContactElements->numElements);
93                 Finley_ElementFile_allocTable(newFaceElementsFile,new_numFaceElements);                 Finley_ElementFile_allocTable(newFaceElementsFile,new_numFaceElements);
# Line 121  void Finley_Mesh_joinFaces(Finley_Mesh* Line 124  void Finley_Mesh_joinFaces(Finley_Mesh*
124              self->ContactElements=newContactElementsFile;              self->ContactElements=newContactElementsFile;
125              Finley_ElementFile_prepare(&(self->ContactElements),self->Nodes->numNodes,self->Nodes->degreeOfFreedom);              Finley_ElementFile_prepare(&(self->ContactElements),self->Nodes->numNodes,self->Nodes->degreeOfFreedom);
126    
127              Finley_Mesh_prepareNodes(self);              Finley_Mesh_prepare(self);
128    
129           } else {           } else {
130              Finley_ElementFile_dealloc(newFaceElementsFile);              Finley_ElementFile_dealloc(newFaceElementsFile);
# Line 134  void Finley_Mesh_joinFaces(Finley_Mesh* Line 137  void Finley_Mesh_joinFaces(Finley_Mesh*
137     TMPMEMFREE(matching_nodes_in_elem1);     TMPMEMFREE(matching_nodes_in_elem1);
138     TMPMEMFREE(elem_mask);     TMPMEMFREE(elem_mask);
139  }  }
   
 /*  
 * $Log$  
 * Revision 1.6  2005/09/15 03:44:22  jgs  
 * Merge of development branch dev-02 back to main trunk on 2005-09-15  
 *  
 * Revision 1.5.2.1  2005/09/07 06:26:19  gross  
 * the solver from finley are put into the standalone package paso now  
 *  
 * Revision 1.5  2005/07/08 04:07:52  jgs  
 * Merge of development branch back to main trunk on 2005-07-08  
 *  
 * Revision 1.4  2004/12/15 07:08:33  jgs  
 * *** empty log message ***  
 * Revision 1.1.1.1.2.2  2005/06/29 02:34:52  gross  
 * some changes towards 64 integers in finley  
 *  
 * Revision 1.1.1.1.2.1  2004/11/24 01:37:14  gross  
 * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now  
 *  
 *  
 *  
 */  
   

Legend:
Removed from v.150  
changed lines
  Added in v.730

  ViewVC Help
Powered by ViewVC 1.1.26