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

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

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

revision 3303 by gross, Mon Oct 25 04:33:31 2010 UTC revision 3312 by gross, Tue Oct 26 07:54:58 2010 UTC
# Line 41  Paso_SystemMatrix* Paso_SystemMatrix_all Line 41  Paso_SystemMatrix* Paso_SystemMatrix_all
41    Paso_SystemMatrixType pattern_format_out;    Paso_SystemMatrixType pattern_format_out;
42    bool_t unroll=FALSE;    bool_t unroll=FALSE;
43    
44    pattern_format_out= (type & MATRIX_FORMAT_OFFSET1)? PATTERN_FORMAT_OFFSET1:  PATTERN_FORMAT_DEFAULT;    pattern_format_out= (type & MATRIX_FORMAT_OFFSET1)? MATRIX_FORMAT_OFFSET1:  MATRIX_FORMAT_DEFAULT;
45    Esys_resetError();    Esys_resetError();
46    if (patternIsUnrolled) {    if (patternIsUnrolled) {
47       if ( ! XNOR(type & MATRIX_FORMAT_OFFSET1, pattern->type & PATTERN_FORMAT_OFFSET1) ) {       if ( ! XNOR(type & MATRIX_FORMAT_OFFSET1, pattern->type & MATRIX_FORMAT_OFFSET1) ) {
48           Esys_setError(TYPE_ERROR,"Paso_SystemMatrix_alloc: requested offset and pattern offset does not match.");           Esys_setError(TYPE_ERROR,"Paso_SystemMatrix_alloc: requested offset and pattern offset does not match.");
49           return NULL;           return NULL;
50       }       }
# Line 58  Paso_SystemMatrix* Paso_SystemMatrix_all Line 58  Paso_SystemMatrix* Paso_SystemMatrix_all
58          /* or if lock size one requested and the block size is not 1 */          /* or if lock size one requested and the block size is not 1 */
59      ||  ((type & MATRIX_FORMAT_BLK1) &&  (col_block_size>1) )      ||  ((type & MATRIX_FORMAT_BLK1) &&  (col_block_size>1) )
60          /* or the offsets are wrong */          /* or the offsets are wrong */
61      ||  ((type & MATRIX_FORMAT_OFFSET1) != ( pattern->type & PATTERN_FORMAT_OFFSET1));      ||  ((type & MATRIX_FORMAT_OFFSET1) != ( pattern->type & MATRIX_FORMAT_OFFSET1));
62        
63    out=MEMALLOC(1,Paso_SystemMatrix);    out=MEMALLOC(1,Paso_SystemMatrix);
64    if (! Esys_checkPtr(out)) {      if (! Esys_checkPtr(out)) {  
# Line 83  Paso_SystemMatrix* Paso_SystemMatrix_all Line 83  Paso_SystemMatrix* Paso_SystemMatrix_all
83    
84    
85       if (type & MATRIX_FORMAT_CSC) {       if (type & MATRIX_FORMAT_CSC) {
86    printf("MATRIX_FORMAT_CSC\n");
87           if (unroll) {           if (unroll) {
88                 if (patternIsUnrolled) {                 if (patternIsUnrolled) {
89                    out->pattern=Paso_SystemMatrixPattern_getReference(pattern);                    out->pattern=Paso_SystemMatrixPattern_getReference(pattern);
# Line 328  void Paso_SystemMatrix_freePreconditione Line 329  void Paso_SystemMatrix_freePreconditione
329        Paso_Preconditioner_free(prec);        Paso_Preconditioner_free(prec);
330        A->solver_p=NULL;        A->solver_p=NULL;
331     }     }
 }  
332    }

Legend:
Removed from v.3303  
changed lines
  Added in v.3312

  ViewVC Help
Powered by ViewVC 1.1.26