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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 415 - (hide annotations)
Wed Jan 4 05:37:33 2006 UTC (14 years, 1 month ago) by gross
File MIME type: text/plain
File size: 1333 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     /* copies a SystemMatrix values into an output array */
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     void Paso_SystemMatrix_copy(Paso_SystemMatrix* in,double* array) {
20     dim_t i,j;
21     index_t iptr;
22 gross 415 index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
23 jgs 150 #pragma omp parallel for private(i,iptr,j) schedule(static)
24     for (i=0;i< in->pattern->n_ptr;++i) {
25 gross 415 for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset; ++iptr) {
26 jgs 150 for (j=0;j<in->block_size;j++) array[iptr*(in->block_size)+j]=in->val[iptr*(in->block_size)+j];
27     }
28     }
29     }
30     /*
31     * $Log$
32     * Revision 1.2 2005/09/15 03:44:39 jgs
33     * Merge of development branch dev-02 back to main trunk on 2005-09-15
34     *
35     * Revision 1.1.2.1 2005/09/05 06:29:48 gross
36     * These files have been extracted from finley to define a stand alone libray for iterative
37     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
38     * has not been tested yet.
39     *
40     *
41     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26