/[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

revision 122 by jgs, Wed Dec 15 07:08:39 2004 UTC revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC
# Line 20  Line 20 
20    
21  /*  allocates the element table within an element file to hold numElements: */  /*  allocates the element table within an element file to hold numElements: */
22    
23  void Finley_ElementFile_allocTable(Finley_ElementFile* in,int numElements) {  void Finley_ElementFile_allocTable(Finley_ElementFile* in,dim_t numElements) {
24    maybelong *Id2=NULL,*Nodes2=NULL,*Tag2=NULL,*Color2=NULL;    index_t *Id2=NULL,*Nodes2=NULL,*Tag2=NULL,*Color2=NULL;
25    maybelong numNodes,e,i;    dim_t numNodes,e,i;
26        
27    /*  allocate memory: */    /*  allocate memory: */
28        
29    numNodes=(maybelong) in->ReferenceElement->Type->numNodes;    numNodes=(dim_t) in->ReferenceElement->Type->numNodes;
30    Id2=MEMALLOC(numElements,maybelong);    Id2=MEMALLOC(numElements,dim_t);
31    Nodes2=MEMALLOC(numElements*numNodes,maybelong);    Nodes2=MEMALLOC(numElements*numNodes,dim_t);
32    Tag2=MEMALLOC(numElements,maybelong);    Tag2=MEMALLOC(numElements,dim_t);
33    Color2=MEMALLOC(numElements,maybelong);    Color2=MEMALLOC(numElements,dim_t);
34        
35    /*  if fine, deallocate the old table and replace by new: */    /*  if fine, deallocate the old table and replace by new: */
36        
# Line 56  void Finley_ElementFile_allocTable(Finle Line 56  void Finley_ElementFile_allocTable(Finle
56         in->Tag[e]=-1;         in->Tag[e]=-1;
57         in->Color[e]=-1;         in->Color[e]=-1;
58      }      }
59      in->numColors=0;      in->maxColor=-1;
60        in->minColor=0;
61    }    }
62    return;    return;
63  }  }
# Line 69  void Finley_ElementFile_deallocTable(Fin Line 70  void Finley_ElementFile_deallocTable(Fin
70    MEMFREE(in->Tag);    MEMFREE(in->Tag);
71    MEMFREE(in->Color);    MEMFREE(in->Color);
72    in->numElements=0;    in->numElements=0;
73    in->numColors=0;    in->maxColor=-1;
74      in->minColor=0;
75  }  }
76    
77  /*  /*
78  * $Log$  * $Log$
79    * Revision 1.5  2005/07/08 04:07:49  jgs
80    * Merge of development branch back to main trunk on 2005-07-08
81    *
82  * Revision 1.4  2004/12/15 07:08:32  jgs  * Revision 1.4  2004/12/15 07:08:32  jgs
83  * *** empty log message ***  * *** empty log message ***
84    * Revision 1.1.1.1.2.2  2005/06/29 02:34:49  gross
85    * some changes towards 64 integers in finley
86    *
87    * Revision 1.1.1.1.2.1  2004/11/24 01:37:13  gross
88    * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now
89  *  *
90  *  *
91  *  *

Legend:
Removed from v.122  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.26