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

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

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

revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 631 by dhawcroft, Thu Mar 23 04:27:32 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /* $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 :                           */  /* Paso: SystemMatrix :                           */
# Line 19  Line 30 
30  void Paso_SystemMatrix_copy(Paso_SystemMatrix* in,double* array) {  void Paso_SystemMatrix_copy(Paso_SystemMatrix* in,double* array) {
31    dim_t i,j;    dim_t i,j;
32    index_t iptr;    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)    #pragma omp parallel for private(i,iptr,j) schedule(static)
35    for (i=0;i< in->pattern->n_ptr;++i) {    for (i=0;i< in->pattern->n_ptr;++i) {
36       for (iptr=(in->pattern->ptr[i])-PTR_OFFSET;iptr<(in->pattern->ptr[i+1])-PTR_OFFSET; ++iptr) {       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];           for (j=0;j<in->block_size;j++) array[iptr*(in->block_size)+j]=in->val[iptr*(in->block_size)+j];
38       }       }
39    }    }

Legend:
Removed from v.155  
changed lines
  Added in v.631

  ViewVC Help
Powered by ViewVC 1.1.26