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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 633 - (show annotations)
Thu Mar 23 05:37:00 2006 UTC (13 years, 7 months ago) by dhawcroft
File MIME type: text/plain
File size: 2056 byte(s)


1 /* $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: SystemMatrix : */
17 /* sets the values of the system matrix to a value */
18
19 /**************************************************************/
20
21 /* Copyrights by ACcESS Australia 2003,2004,2005 */
22 /* Author: gross@access.edu.au */
23
24 /**************************************************************/
25
26 #include "Paso.h"
27 #include "SystemMatrix.h"
28
29 /**************************************************************/
30
31 void Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {
32
33 index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
34 dim_t i,j;
35 index_t iptr;
36 #pragma omp parallel for private(i,iptr,j) schedule(static)
37 for (i=0;i< in->pattern->n_ptr;++i) {
38 for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset;++iptr) {
39 for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;
40 }
41 }
42 in->normalizer_is_valid=FALSE;
43 }
44 /*
45 * $Log$
46 * Revision 1.2 2005/09/15 03:44:39 jgs
47 * Merge of development branch dev-02 back to main trunk on 2005-09-15
48 *
49 * Revision 1.1.2.1 2005/09/05 06:29:48 gross
50 * These files have been extracted from finley to define a stand alone libray for iterative
51 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
52 * has not been tested yet.
53 *
54 *
55 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26