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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 415 - (hide annotations)
Wed Jan 4 05:37:33 2006 UTC (13 years, 9 months ago) by gross
File MIME type: text/plain
File size: 1411 byte(s)
a better way of representing the matrix format type is introduced. this is needed for the Paradiso and UMFPACK interface
1 jgs 150 /* $Id$ */
2    
3     /**************************************************************/
4    
5     /* Paso: SystemMatrix : */
6     /* sets the values of the system matrix to a value */
7    
8     /**************************************************************/
9    
10     /* Copyrights by ACcESS Australia 2003,2004,2005 */
11     /* Author: gross@access.edu.au */
12    
13     /**************************************************************/
14    
15     #include "Paso.h"
16     #include "SystemMatrix.h"
17    
18     /**************************************************************/
19    
20     void Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {
21 gross 415
22     index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
23 jgs 150 dim_t i,j;
24     index_t iptr;
25     #pragma omp parallel for private(i,iptr,j) schedule(static)
26     for (i=0;i< in->pattern->n_ptr;++i) {
27 gross 415 for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset;++iptr) {
28 jgs 150 for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;
29     }
30     }
31     in->normalizer_is_valid=FALSE;
32     }
33     /*
34     * $Log$
35     * Revision 1.2 2005/09/15 03:44:39 jgs
36     * Merge of development branch dev-02 back to main trunk on 2005-09-15
37     *
38     * Revision 1.1.2.1 2005/09/05 06:29:48 gross
39     * These files have been extracted from finley to define a stand alone libray for iterative
40     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
41     * has not been tested yet.
42     *
43     *
44     */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26