Revision 3086 - (show annotations)
Thu Aug 5 05:07:58 2010 UTC (9 years, 5 months ago) by jfenwick
File MIME type: text/plain
File size: 11013 byte(s)
```Another pass at removing finley

```
 1 2 /******************************************************* 3 * 4 * Copyright (c) 2003-2010 by University of Queensland 5 * Earth Systems Science Computational Center (ESSCC) 6 * http://www.uq.edu.au/esscc 7 * 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 17 /* Dudley: SystemMatrix and SystemVector */ 18 19 /* adds the matrix array[Equa,Sol,NN,NN] onto the matrix in. */ 20 /* the rows/columns are given by */ 21 /* i_Equa+Equa*Nodes_Equa[Nodes[j_Equa]] (i_Equa=0:Equa; j_Equa=0:NN_Equa). */ 22 /* the routine has to be called from a parallel region */ 23 24 /* This routine assumes that in->Equa=in->Sol=1, i.e. */ 25 /* array is fully packed. */ 26 /* TODO: the case in->Equa!=1 */ 27 28 /**************************************************************/ 29 30 #include "Assemble.h" 31 #include "IndexList.h" 32 33 /**************************************************************/ 34 35 void Dudley_Assemble_addToSystemMatrix(Paso_SystemMatrix* in,dim_t NN_Equa,index_t* Nodes_Equa, dim_t num_Equa, 36 dim_t NN_Sol,index_t* Nodes_Sol, dim_t num_Sol, double* array) { 37 index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0); 38 dim_t k_Equa,j_Equa,j_Sol,k_Sol,i_Equa,i_Sol,l_col,l_row,ic,ir,k,i_row, i_col; 39 index_t *mainBlock_ptr, *mainBlock_index, *col_coupleBlock_ptr, *col_coupleBlock_index, *row_coupleBlock_ptr, *row_coupleBlock_index; 40 double *mainBlock_val, *row_coupleBlock_val, *col_coupleBlock_val; 41 dim_t row_block_size=in->row_block_size; 42 dim_t col_block_size=in->col_block_size; 43 dim_t block_size=in->block_size; 44 dim_t num_subblocks_Equa=num_Equa/row_block_size; 45 dim_t num_subblocks_Sol=num_Sol/col_block_size; 46 dim_t numMyCols=in->pattern->mainPattern->numInput; 47 dim_t numMyRows=in->pattern->mainPattern->numOutput; 48 49 if (in->type & MATRIX_FORMAT_CSC) { 50 /* MATRIX_FORMAT_CSC does not support MPI !!!!! */ 51 mainBlock_ptr=in->mainBlock->pattern->ptr; 52 mainBlock_index=in->mainBlock->pattern->index; 53 mainBlock_val=in->mainBlock->val; 54 col_coupleBlock_ptr=in->col_coupleBlock->pattern->ptr; 55 col_coupleBlock_index=in->col_coupleBlock->pattern->index; 56 col_coupleBlock_val=in->col_coupleBlock->val; 57 row_coupleBlock_ptr=in->row_coupleBlock->pattern->ptr; 58 row_coupleBlock_index=in->row_coupleBlock->pattern->index; 59 row_coupleBlock_val=in->row_coupleBlock->val; 60 61 for (k_Sol=0;k_Soltype & MATRIX_FORMAT_TRILINOS_CRS) { 128 /* this needs to be modified */ 129 #ifdef TRILINOS 130 for (k_Equa=0;k_EquamainBlock->pattern->output_node_distribution->numLocal) { 133 for (k_Sol=0;k_Soltrilinos_data, irow, icol, array[INDEX4(l_row,l_col,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)]); 141 } 142 } 143 } 144 } 145 } 146 #endif 147 } else { 148 mainBlock_ptr=in->mainBlock->pattern->ptr; 149 mainBlock_index=in->mainBlock->pattern->index; 150 mainBlock_val=in->mainBlock->val; 151 col_coupleBlock_ptr=in->col_coupleBlock->pattern->ptr; 152 col_coupleBlock_index=in->col_coupleBlock->pattern->index; 153 col_coupleBlock_val=in->col_coupleBlock->val; 154 row_coupleBlock_ptr=in->row_coupleBlock->pattern->ptr; 155 row_coupleBlock_index=in->row_coupleBlock->pattern->index; 156 row_coupleBlock_val=in->row_coupleBlock->val; 157 158 for (k_Equa=0;k_Equa

## Properties

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