Revision 97 - (show annotations)
Tue Dec 14 05:39:33 2004 UTC (15 years, 5 months ago) by jgs
File MIME type: text/plain
File size: 4369 byte(s)
```*** empty log message ***

```
 1 /* \$Id\$ */ 2 3 /**************************************************************/ 4 5 /* Finley: SystemMatrix and SystemVector */ 6 7 /* adds the matrix array[Equa,Sol,NN,NN] onto the matrix in. */ 8 /* the rows/columns are given by */ 9 /* i_Equa+Equa*Nodes_Equa[Nodes[j_Equa]] (i_Equa=0:Equa; j_Equa=0:NN_Equa). */ 10 /* the routine has to be called from a parallel region */ 11 12 /* This routine assumes that in->Equa=in->Sol=1, i.e. */ 13 /* array is fully packed. */ 14 /* TODO: the case in->Equa!=1 */ 15 16 /**************************************************************/ 17 18 /* Copyrights by ACcESS Australia 2003/04 */ 19 /* Author: gross@access.edu.au */ 20 21 /**************************************************************/ 22 23 #include "Finley.h" 24 #include "System.h" 25 26 /**************************************************************/ 27 28 void Finley_SystemMatrix_add(Finley_SystemMatrix* in,int NN_Equa,maybelong* Nodes_Equa, int num_Equa, 29 int NN_Sol,maybelong* Nodes_Sol, int num_Sol, double* array) { 30 int k_Equa,j_Equa,j_Sol,k_Sol,i_Equa,i_Sol,l_col,l_row,ic,ir,index,k,iptr; 31 int row_block_size=in->row_block_size; 32 int col_block_size=in->col_block_size; 33 int block_size=in->block_size; 34 int num_subblocks_Equa=num_Equa/row_block_size; 35 int num_subblocks_Sol=num_Sol/col_block_size; 36 37 if (in->type==CSR) { 38 for (k_Equa=0;k_Equapattern->ptr[iptr]-PTR_OFFSET;kpattern->ptr[iptr+1]-PTR_OFFSET;++k) { 47 if (in->pattern->index[k]==index) { 48 for (ic=0;icval[k*block_size+ir+row_block_size*ic]+= 53 array[INDEX4(i_Equa,i_Sol,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)]; 54 } 55 } 56 break; 57 } 58 } 59 } 60 } 61 } 62 } 63 } else { 64 for (k_Sol=0;k_Solpattern->ptr[iptr]-PTR_OFFSET;kpattern->ptr[iptr+1]-PTR_OFFSET;++k) { 73 if (in->pattern->index[k]==index) { 74 for (ic=0;icval[k*block_size+ir+row_block_size*ic]+= 79 array[INDEX4(i_Equa,i_Sol,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)]; 80 } 81 } 82 break; 83 } 84 } 85 } 86 } 87 } 88 } 89 } 90 } 91 /* 92 * \$Log\$ 93 * Revision 1.2 2004/12/14 05:39:30 jgs 94 * *** empty log message *** 95 * 96 * Revision 1.1.1.1.2.1 2004/11/12 06:58:19 gross 97 * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry 98 * 99 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs 100 * initial import of project esys2 101 * 102 * Revision 1.1 2004/07/02 04:21:13 gross 103 * Finley C code has been included 104 * 105 * 106 */

## Properties

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