/[escript]/branches/domexper/dudley/src/IndexList.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/IndexList.c

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

revision 3144 by jfenwick, Fri Sep 3 00:49:02 2010 UTC revision 3145 by jfenwick, Fri Sep 3 01:25:52 2010 UTC
# Line 34  void Dudley_IndexList_insertElements(Dud Line 34  void Dudley_IndexList_insertElements(Dud
34    /* index_list is an array of linked lists. Each entry is a row (DOF) and contains the indices to the non-zero columns */    /* index_list is an array of linked lists. Each entry is a row (DOF) and contains the indices to the non-zero columns */
35    index_t color;    index_t color;
36    Dudley_ReferenceElement*refElement;    Dudley_ReferenceElement*refElement;
37    dim_t e, kr, kc, NN_row, NN_col, icol, irow, NN, *row_node=NULL, *col_node=NULL;    dim_t e, kr, kc, NN_row, NN_col, icol, irow, NN;
38    if (elements!=NULL)    if (elements!=NULL)
39    {    {
40      NN=elements->numNodes;      NN=elements->numNodes;
41      refElement= Dudley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, FALSE);      refElement= Dudley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, FALSE);
42      if (reduce_col_order)      if (reduce_col_order)
43      {      {
     col_node=refElement->Type->linearNodes;  
44      NN_col=(refElement->LinearBasisFunctions->Type->numShapes);      NN_col=(refElement->LinearBasisFunctions->Type->numShapes);
45      }      }
46      else      else
47      {      {
     col_node=refElement->Type->subElementNodes;  
48      NN_col=(refElement->BasisFunctions->Type->numShapes);      NN_col=(refElement->BasisFunctions->Type->numShapes);
49      }      }
50      if (reduce_row_order)      if (reduce_row_order)
51      {      {
     row_node=refElement->Type->linearNodes;  
52      NN_row=(refElement->LinearBasisFunctions->Type->numShapes);      NN_row=(refElement->LinearBasisFunctions->Type->numShapes);
53      } else {      } else {
     row_node=refElement->Type->subElementNodes;  
54      NN_row=(refElement->BasisFunctions->Type->numShapes) ;      NN_row=(refElement->BasisFunctions->Type->numShapes) ;
55      }      }
56    
# Line 67  void Dudley_IndexList_insertElements(Dud Line 63  void Dudley_IndexList_insertElements(Dud
63          {          {
64              for (kr=0;kr<NN_row;kr++)              for (kr=0;kr<NN_row;kr++)
65              {              {
66                  irow=row_map[elements->Nodes[INDEX2(row_node[INDEX2(kr,0,NN_row)],e,NN)]];                  irow=row_map[elements->Nodes[INDEX2(kr,e,NN)]];
67                  for (kc=0;kc<NN_col;kc++)                  for (kc=0;kc<NN_col;kc++)
68                  {                  {
69                  icol=col_map[elements->Nodes[INDEX2(col_node[INDEX2(kc,0,NN_col)],e,NN)]];                  icol=col_map[elements->Nodes[INDEX2(kc,e,NN)]];
70                  Dudley_IndexList_insertIndex(&(index_list[irow]),icol);                  Dudley_IndexList_insertIndex(&(index_list[irow]),icol);
71                  }                  }
72              }              }

Legend:
Removed from v.3144  
changed lines
  Added in v.3145

  ViewVC Help
Powered by ViewVC 1.1.26