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

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

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

revision 1628 by phornby, Fri Jul 11 13:12:46 2008 UTC revision 1841 by gross, Fri Oct 3 03:57:52 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 74  Paso_Solver_ILU* Paso_Solver_getILU(Paso Line 73  Paso_Solver_ILU* Paso_Solver_getILU(Paso
73         /* find main diagonal and copy matrix values */         /* find main diagonal and copy matrix values */
74         #pragma omp parallel for schedule(static) private(i,iptr,iptr_main,k)         #pragma omp parallel for schedule(static) private(i,iptr,iptr_main,k)
75         for (i = 0; i < n; ++i) {         for (i = 0; i < n; ++i) {
            for (iptr=A->pattern->ptr[i];iptr<A->pattern->ptr[i+1]; ++iptr) {  
76                 iptr_main=A->pattern->ptr[0]-1;                 iptr_main=A->pattern->ptr[0]-1;
77                  for (iptr=A->pattern->ptr[i];iptr<A->pattern->ptr[i+1]; iptr++) {                 for (iptr=A->pattern->ptr[i];iptr<A->pattern->ptr[i+1]; iptr++) {
78                     if (A->pattern->index[iptr]==i) iptr_main=iptr;                     if (A->pattern->index[iptr]==i) iptr_main=iptr;
79                     for (k=0;k<n_block*n_block;++k) out->factors[n_block*n_block*iptr+k]=A->val[n_block*n_block*iptr+k];                     for (k=0;k<n_block*n_block;++k) out->factors[n_block*n_block*iptr+k]=A->val[n_block*n_block*iptr+k];
80                 }                 }
81                 out->main_iptr[i]=iptr_main;                 out->main_iptr[i]=iptr_main;
82                 if (iptr_main==A->pattern->ptr[0]-1)                 if (iptr_main==A->pattern->ptr[0]-1)  {
83                    Paso_setError(VALUE_ERROR, "Paso_Solver_getILU: no main diagonal");                    Paso_setError(VALUE_ERROR, "Paso_Solver_getILU: no main diagonal");
84             }                 }
85         }         }
86         /* start factorization */         /* start factorization */
87        

Legend:
Removed from v.1628  
changed lines
  Added in v.1841

  ViewVC Help
Powered by ViewVC 1.1.26