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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 633 - (show annotations)
Thu Mar 23 05:37:00 2006 UTC (13 years, 4 months ago) by dhawcroft
File MIME type: text/plain
File size: 1978 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 /* copies a SystemMatrix values into an output array */
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 void Paso_SystemMatrix_copy(Paso_SystemMatrix* in,double* array) {
31 dim_t i,j;
32 index_t iptr;
33 index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
34 #pragma omp parallel for private(i,iptr,j) schedule(static)
35 for (i=0;i< in->pattern->n_ptr;++i) {
36 for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset; ++iptr) {
37 for (j=0;j<in->block_size;j++) array[iptr*(in->block_size)+j]=in->val[iptr*(in->block_size)+j];
38 }
39 }
40 }
41 /*
42 * $Log$
43 * Revision 1.2 2005/09/15 03:44:39 jgs
44 * Merge of development branch dev-02 back to main trunk on 2005-09-15
45 *
46 * Revision 1.1.2.1 2005/09/05 06:29:48 gross
47 * These files have been extracted from finley to define a stand alone libray for iterative
48 * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
49 * has not been tested yet.
50 *
51 *
52 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26