Revision 616 - (show annotations)
Wed Mar 22 02:46:56 2006 UTC (13 years, 7 months ago) by elspeth
File MIME type: text/plain
File size: 5559 byte(s)
```Copyright added to more source files.

```
 1 /* 2 ************************************************************ 3 * Copyright 2006 by ACcESS MNRF * 4 * * 5 * http://www.access.edu.au * 6 * Primary Business: Queensland, Australia * 7 * Licensed under the Open Software License version 3.0 * 8 * http://www.opensource.org/licenses/osl-3.0.php * 9 * * 10 ************************************************************ 11 */ 12 /**************************************************************/ 13 14 /* Finley: SystemMatrix and SystemVector */ 15 16 /* adds the matrix array[Equa,Sol,NN,NN] onto the matrix in. */ 17 /* the rows/columns are given by */ 18 /* i_Equa+Equa*Nodes_Equa[Nodes[j_Equa]] (i_Equa=0:Equa; j_Equa=0:NN_Equa). */ 19 /* the routine has to be called from a parallel region */ 20 21 /* This routine assumes that in->Equa=in->Sol=1, i.e. */ 22 /* array is fully packed. */ 23 /* TODO: the case in->Equa!=1 */ 24 25 /**************************************************************/ 26 27 /* Author: gross@access.edu.au */ 28 /* Version: \$Id\$ */ 29 30 /**************************************************************/ 31 32 #include "Assemble.h" 33 34 /**************************************************************/ 35 36 void Finley_Assemble_addToSystemMatrix(Paso_SystemMatrix* in,dim_t NN_Equa,index_t* Nodes_Equa, dim_t num_Equa, 37 dim_t NN_Sol,index_t* Nodes_Sol, dim_t num_Sol, double* array) { 38 index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0); 39 dim_t k_Equa,j_Equa,j_Sol,k_Sol,i_Equa,i_Sol,l_col,l_row,ic,ir,index,k,iptr; 40 dim_t row_block_size=in->row_block_size; 41 dim_t col_block_size=in->col_block_size; 42 dim_t block_size=in->block_size; 43 dim_t num_subblocks_Equa=num_Equa/row_block_size; 44 dim_t num_subblocks_Sol=num_Sol/col_block_size; 45 46 if (in->type & MATRIX_FORMAT_CSC) { 47 for (k_Sol=0;k_Solpattern->ptr[iptr]-index_offset;kpattern->ptr[iptr+1]-index_offset;++k) { 56 if (in->pattern->index[k]==index) { 57 for (ic=0;icval[k*block_size+ir+row_block_size*ic]+= 62 array[INDEX4(i_Equa,i_Sol,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)]; 63 } 64 } 65 break; 66 } 67 } 68 } 69 } 70 } 71 } 72 } else { 73 for (k_Equa=0;k_Equapattern->ptr[iptr]-index_offset;kpattern->ptr[iptr+1]-index_offset;++k) { 82 if (in->pattern->index[k]==index) { 83 for (ic=0;icval[k*block_size+ir+row_block_size*ic]+= 88 array[INDEX4(i_Equa,i_Sol,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)]; 89 } 90 } 91 break; 92 } 93 } 94 } 95 } 96 } 97 } 98 } 99 } 100 /* 101 * \$Log\$ 102 * Revision 1.2 2005/09/15 03:44:21 jgs 103 * Merge of development branch dev-02 back to main trunk on 2005-09-15 104 * 105 * Revision 1.1.2.1 2005/09/07 09:47:29 gross 106 * missing file 107 * 108 * Revision 1.6 2005/07/08 04:07:58 jgs 109 * Merge of development branch back to main trunk on 2005-07-08 110 * 111 * Revision 1.1.1.1.2.3 2005/06/29 02:34:56 gross 112 * some changes towards 64 integers in finley 113 * 114 * Revision 1.1.1.1.2.2 2005/03/15 07:23:55 gross 115 * Finley's interface to the SCSL library can deal with systems of PDEs now. tests shows that the SCSL library cannot deal with problems with more then 200000 unknowns. problem has been reported to SGI. 116 * 117 * Revision 1.1.1.1.2.1 2004/11/12 06:58:19 gross 118 * 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 119 * 120 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs 121 * initial import of project esys2 122 * 123 * Revision 1.1 2004/07/02 04:21:13 gross 124 * Finley C code has been included 125 * 126 * 127 */

## Properties

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