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

Diff of /trunk/finley/src/IndexList.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 22  Line 22 
22     triangle of the matrix is stored. */     triangle of the matrix is stored. */
23    
24  void Finley_IndexList_insertElements(Finley_IndexList* index_list, Finley_ElementFile* elements,  void Finley_IndexList_insertElements(Finley_IndexList* index_list, Finley_ElementFile* elements,
25                                         int reduce_row_order, maybelong* row_Label,                                         bool_t reduce_row_order, index_t* row_Label,
26                                         int reduce_col_order, maybelong* col_Label) {                                         bool_t reduce_col_order, index_t* col_Label) {
27    maybelong e,kr,kc,NN_row,NN_col,i,icol,irow,color;    index_t color;
28      dim_t e,kr,kc,NN_row,NN_col,i,icol,irow;
29    
30    if (elements!=NULL) {    if (elements!=NULL) {
31      maybelong NN=elements->ReferenceElement->Type->numNodes;      dim_t NN=elements->ReferenceElement->Type->numNodes;
32      maybelong id[NN],*row_node,*col_node;      index_t id[NN],*row_node,*col_node;
33      for (i=0;i<NN;i++) id[i]=i;      for (i=0;i<NN;i++) id[i]=i;
34      if (reduce_col_order) {      if (reduce_col_order) {
35         col_node=elements->ReferenceElement->Type->linearNodes;         col_node=elements->ReferenceElement->Type->linearNodes;
# Line 44  void Finley_IndexList_insertElements(Fin Line 45  void Finley_IndexList_insertElements(Fin
45         row_node=id;         row_node=id;
46         NN_row=elements->ReferenceElement->Type->numNodes;         NN_row=elements->ReferenceElement->Type->numNodes;
47      }      }
48      for (color=0;color<elements->numColors;color++) {      for (color=elements->minColor;color<=elements->maxColor;color++) {
49          #pragma omp for private(e,irow,kr,kc,icol) schedule(static)          #pragma omp for private(e,irow,kr,kc,icol) schedule(static)
50          for (e=0;e<elements->numElements;e++) {          for (e=0;e<elements->numElements;e++) {
51              if (elements->Color[e]==color) {              if (elements->Color[e]==color) {
# Line 64  void Finley_IndexList_insertElements(Fin Line 65  void Finley_IndexList_insertElements(Fin
65    
66  /* inserts row index row into the Finley_IndexList in if it does not exist */  /* inserts row index row into the Finley_IndexList in if it does not exist */
67    
68  void Finley_IndexList_insertIndex(Finley_IndexList* in, maybelong index) {  void Finley_IndexList_insertIndex(Finley_IndexList* in, index_t index) {
69    int i;    dim_t i;
70    /* is index in in? */    /* is index in in? */
71    for (i=0;i<in->n;i++) {    for (i=0;i<in->n;i++) {
72      if (in->index[i]==index)  return;      if (in->index[i]==index)  return;
# Line 89  void Finley_IndexList_insertIndex(Finley Line 90  void Finley_IndexList_insertIndex(Finley
90    
91  /* counts the number of row indices in the Finley_IndexList in */  /* counts the number of row indices in the Finley_IndexList in */
92    
93  int Finley_IndexList_count(Finley_IndexList* in) {  dim_t Finley_IndexList_count(Finley_IndexList* in) {
94    if (in==NULL) {    if (in==NULL) {
95       return 0;       return 0;
96    } else {    } else {
# Line 99  int Finley_IndexList_count(Finley_IndexL Line 100  int Finley_IndexList_count(Finley_IndexL
100    
101  /* count the number of row indices in the Finley_IndexList in */  /* count the number of row indices in the Finley_IndexList in */
102    
103  void Finley_IndexList_toArray(Finley_IndexList* in, maybelong* array) {  void Finley_IndexList_toArray(Finley_IndexList* in, index_t* array) {
104    int i;    dim_t i;
105    if (in!=NULL) {    if (in!=NULL) {
106      for (i=0;i<in->n;i++) array[i]=in->index[i]+INDEX_OFFSET;      for (i=0;i<in->n;i++) array[i]=in->index[i]+INDEX_OFFSET;
107      Finley_IndexList_toArray(in->extension,&(array[in->n]));      Finley_IndexList_toArray(in->extension,&(array[in->n]));
# Line 118  void Finley_IndexList_free(Finley_IndexL Line 119  void Finley_IndexList_free(Finley_IndexL
119    
120  /*  /*
121   * $Log$   * $Log$
122     * Revision 1.5  2005/07/08 04:07:51  jgs
123     * Merge of development branch back to main trunk on 2005-07-08
124     *
125   * Revision 1.4  2004/12/15 07:08:32  jgs   * Revision 1.4  2004/12/15 07:08:32  jgs
126   * *** empty log message ***   * *** empty log message ***
127     * Revision 1.1.1.1.2.3  2005/06/29 02:34:50  gross
128     * some changes towards 64 integers in finley
129     *
130     * Revision 1.1.1.1.2.2  2004/11/24 01:37:13  gross
131     * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now
132   *   *
133   *   *
134   *   *

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

  ViewVC Help
Powered by ViewVC 1.1.26