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

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

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

revision 633 by dhawcroft, Thu Mar 23 05:37:00 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3    
4  /*  /*******************************************************
5  ********************************************************************************   *
6  *               Copyright   2006 by ACcESS MNRF                                *   *           Copyright 2003-2007 by ACceSS MNRF
7  *                                                                              *   *       Copyright 2007 by University of Queensland
8  *                 http://www.access.edu.au                                     *   *
9  *           Primary Business: Queensland, Australia                            *   *                http://esscc.uq.edu.au
10  *     Licensed under the Open Software License version 3.0             *   *        Primary Business: Queensland, Australia
11  *        http://www.opensource.org/licenses/osl-3.0.php                        *   *  Licensed under the Open Software License version 3.0
12  ********************************************************************************   *     http://www.opensource.org/licenses/osl-3.0.php
13  */   *
14     *******************************************************/
15    
16  /**************************************************************/  /**************************************************************/
17    
# Line 18  Line 20 
20    
21  /**************************************************************/  /**************************************************************/
22    
23  /* Copyrights by ACcESS Australia 2003,2004,2005 */  /* Copyrights by ACcESS Australia 2003,2004,2005, 2006, 2007 */
24  /* Author: gross@access.edu.au */  /* Author: gross@access.edu.au */
25    
26  /**************************************************************/  /**************************************************************/
# Line 30  Line 32 
32    
33  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {
34    
35    index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);    if (in!=NULL) {
36    dim_t i,j;        Paso_SparseMatrix_setValues(in->mainBlock, value);
37    index_t iptr;        Paso_SparseMatrix_setValues(in->coupleBlock, value);
38    #pragma omp parallel for private(i,iptr,j) schedule(static)        in->normalizer_is_valid=FALSE;
   for (i=0;i< in->pattern->n_ptr;++i) {  
      for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset;++iptr) {  
          for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;  
      }  
39    }    }
   in->normalizer_is_valid=FALSE;  
40  }  }
 /*  
  * $Log$  
  * Revision 1.2  2005/09/15 03:44:39  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.1.2.1  2005/09/05 06:29:48  gross  
  * These files have been extracted from finley to define a stand alone libray for iterative  
  * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but  
  * has not been tested yet.  
  *  
  *  
  */  

Legend:
Removed from v.633  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26