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

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

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

trunk/esys2/finley/src/finleyC/ElementFile_allocTable.c revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC trunk/finley/src/ElementFile_allocTable.c revision 471 by jgs, Fri Jan 27 01:33:02 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ******************************************************************************
3     *                                                                            *
4     *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *
5     *                                                                            *
6     * This software is the property of ACcESS. No part of this code              *
7     * may be copied in any form or by any means without the expressed written    *
8     * consent of ACcESS.  Copying, use or modification of this software          *
9     * by any unauthorised person is illegal unless that person has a software    *
10     * license agreement with ACcESS.                                             *
11     *                                                                            *
12     ******************************************************************************
13    */
14    
15  /**************************************************************/  /**************************************************************/
16    
17  /*   Finley: ElementFile */  /*   Finley: ElementFile */
# Line 7  Line 20 
20    
21  /**************************************************************/  /**************************************************************/
22    
23  /*   Copyrights by ACcESS Australia 2003 */  /*  Author: gross@access.edu.au */
24  /*   Author: gross@access.edu.au */  /*  Version: $Id$ */
 /*   Version: $Id$                                            */  
25    
26  /**************************************************************/  /**************************************************************/
27    
 #include "Finley.h"  
28  #include "ElementFile.h"  #include "ElementFile.h"
29    
30  /****************************************************************************/  /****************************************************************************/
31    
32  /*  allocates the element table within an element file to hold numElements: */  /*  allocates the element table within an element file to hold numElements: */
33    
34  void Finley_ElementFile_allocTable(Finley_ElementFile* in,int numElements) {  void Finley_ElementFile_allocTable(Finley_ElementFile* in,dim_t numElements) {
35    maybelong *Id2=NULL,*Nodes2=NULL,*Tag2=NULL,*Color2=NULL;    index_t *Id2=NULL,*Nodes2=NULL,*Tag2=NULL,*Color2=NULL;
36    maybelong numNodes,e,i;    dim_t numNodes,e,i;
37      Finley_resetError();
38        
39    /*  allocate memory: */    /*  allocate memory: */
40        
41    numNodes=(maybelong) in->ReferenceElement->Type->numNodes;    numNodes=(dim_t) in->ReferenceElement->Type->numNodes;
42    Id2=MEMALLOC(numElements,maybelong);    Id2=MEMALLOC(numElements,dim_t);
43    Nodes2=MEMALLOC(numElements*numNodes,maybelong);    Nodes2=MEMALLOC(numElements*numNodes,dim_t);
44    Tag2=MEMALLOC(numElements,maybelong);    Tag2=MEMALLOC(numElements,dim_t);
45    Color2=MEMALLOC(numElements,maybelong);    Color2=MEMALLOC(numElements,dim_t);
46        
47    /*  if fine, deallocate the old table and replace by new: */    /*  if fine, deallocate the old table and replace by new: */
48        
# Line 56  void Finley_ElementFile_allocTable(Finle Line 68  void Finley_ElementFile_allocTable(Finle
68         in->Tag[e]=-1;         in->Tag[e]=-1;
69         in->Color[e]=-1;         in->Color[e]=-1;
70      }      }
71      in->numColors=0;      in->maxColor=-1;
72        in->minColor=0;
73    }    }
74    return;    return;
75  }  }
# Line 69  void Finley_ElementFile_deallocTable(Fin Line 82  void Finley_ElementFile_deallocTable(Fin
82    MEMFREE(in->Tag);    MEMFREE(in->Tag);
83    MEMFREE(in->Color);    MEMFREE(in->Color);
84    in->numElements=0;    in->numElements=0;
85    in->numColors=0;    in->maxColor=-1;
86      in->minColor=0;
87  }  }
88    
89  /*  /*
90  * $Log$  * $Log$
91  * Revision 1.2  2004/12/14 05:39:30  jgs  * Revision 1.6  2005/09/15 03:44:22  jgs
92    * Merge of development branch dev-02 back to main trunk on 2005-09-15
93    *
94    * Revision 1.5.2.1  2005/09/07 06:26:18  gross
95    * the solver from finley are put into the standalone package paso now
96    *
97    * Revision 1.5  2005/07/08 04:07:49  jgs
98    * Merge of development branch back to main trunk on 2005-07-08
99    *
100    * Revision 1.4  2004/12/15 07:08:32  jgs
101  * *** empty log message ***  * *** empty log message ***
102    * Revision 1.1.1.1.2.2  2005/06/29 02:34:49  gross
103    * some changes towards 64 integers in finley
104  *  *
105  * Revision 1.1.1.1.2.1  2004/11/24 01:37:13  gross  * Revision 1.1.1.1.2.1  2004/11/24 01:37:13  gross
106  * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now  * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now
107  *  *
 * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
 * initial import of project esys2  
 *  
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
108  *  *
109  *  *
110  */  */

Legend:
Removed from v.97  
changed lines
  Added in v.471

  ViewVC Help
Powered by ViewVC 1.1.26