/[escript]/trunk/paso/src/SystemMatrixPattern.c
ViewVC logotype

Diff of /trunk/paso/src/SystemMatrixPattern.c

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

revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC revision 631 by dhawcroft, Thu Mar 23 04:27:32 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /* $Id$ */
2    
3    /*
4    ********************************************************************************
5    *               Copyright 2006 by ACcESS MNRF                                *
6    *                                                                              *
7    *                 http://www.access.edu.au                                     *
8    *           Primary Business: Queensland, Australia                            *
9    *     Licensed under the Open Software License version 3.0             *
10    *        http://www.opensource.org/licenses/osl-3.0.php                        *
11    ********************************************************************************
12    */
13    
14  /**************************************************************/  /**************************************************************/
15    
16  /* Paso: SystemMatrixPatternPattern */  /* Paso: SystemMatrixPatternPattern */
# Line 39  Paso_SystemMatrixPattern* Paso_SystemMat Line 50  Paso_SystemMatrixPattern* Paso_SystemMat
50               if (ptr[i]<ptr[i+1]) {               if (ptr[i]<ptr[i+1]) {
51                 qsort(&(index[ptr[i]-1]),(size_t)(ptr[i+1]-ptr[i]),sizeof(index_t),Paso_comparIndex);                 qsort(&(index[ptr[i]-1]),(size_t)(ptr[i+1]-ptr[i]),sizeof(index_t),Paso_comparIndex);
52                 loc_min_index=MIN(loc_min_index,index[ptr[i]-1]);                 loc_min_index=MIN(loc_min_index,index[ptr[i]-1]);
53                 loc_max_index=MAX(loc_max_index,index[ptr[i+1]]);                 loc_max_index=MAX(loc_max_index,index[ptr[i+1]-2]);
54               }               }
55           }           }
56        } else {        } else {
# Line 66  Paso_SystemMatrixPattern* Paso_SystemMat Line 77  Paso_SystemMatrixPattern* Paso_SystemMat
77    out=MEMALLOC(1,Paso_SystemMatrixPattern);    out=MEMALLOC(1,Paso_SystemMatrixPattern);
78    if (Paso_checkPtr(out)) return NULL;    if (Paso_checkPtr(out)) return NULL;
79    out->n_ptr=n_ptr;    out->n_ptr=n_ptr;
80    out->n_index=max_index+1-index_offset;    out->n_index=max_index-index_offset+1;
81    out->ptr=ptr;    out->ptr=ptr;
82    out->index=index;    out->index=index;
83    out->len=out->ptr[out->n_ptr];    out->len=out->ptr[out->n_ptr]-index_offset;
84    out->reference_counter=1;    out->reference_counter=1;
85    out->type=type;    out->type=type;
86    #ifdef Paso_TRACE    #ifdef Paso_TRACE

Legend:
Removed from v.415  
changed lines
  Added in v.631

  ViewVC Help
Powered by ViewVC 1.1.26