/[escript]/trunk/esys2/finley/src/finleyC/System_add.c
ViewVC logotype

Diff of /trunk/esys2/finley/src/finleyC/System_add.c

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

revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC
# Line 25  Line 25 
25    
26  /**************************************************************/  /**************************************************************/
27    
28  void  Finley_SystemMatrix_add(Finley_SystemMatrix* in,int NN_Equa,maybelong* Nodes_Equa, int num_Equa,  void  Finley_SystemMatrix_add(Finley_SystemMatrix* in,dim_t NN_Equa,index_t* Nodes_Equa, dim_t num_Equa,
29                                                        int NN_Sol,maybelong* Nodes_Sol, int num_Sol, double* array) {                                                        dim_t NN_Sol,index_t* Nodes_Sol, dim_t 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;    dim_t 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;    dim_t row_block_size=in->row_block_size;
32    int col_block_size=in->col_block_size;    dim_t col_block_size=in->col_block_size;
33    int block_size=in->block_size;    dim_t block_size=in->block_size;
34    int num_subblocks_Equa=num_Equa/row_block_size;    dim_t num_subblocks_Equa=num_Equa/row_block_size;
35    int num_subblocks_Sol=num_Sol/col_block_size;    dim_t num_subblocks_Sol=num_Sol/col_block_size;
36    
37    if (in->type==CSR) {    if (in->type==CSR) {
38            for (k_Equa=0;k_Equa<NN_Equa;++k_Equa) {            for (k_Equa=0;k_Equa<NN_Equa;++k_Equa) {
# Line 72  void  Finley_SystemMatrix_add(Finley_Sys Line 72  void  Finley_SystemMatrix_add(Finley_Sys
72                  for (k=in->pattern->ptr[iptr]-PTR_OFFSET;k<in->pattern->ptr[iptr+1]-PTR_OFFSET;++k) {                  for (k=in->pattern->ptr[iptr]-PTR_OFFSET;k<in->pattern->ptr[iptr+1]-PTR_OFFSET;++k) {
73                      if (in->pattern->index[k]==index) {                      if (in->pattern->index[k]==index) {
74                            for (ic=0;ic<col_block_size;++ic) {                            for (ic=0;ic<col_block_size;++ic) {
75                                  i_Sol=ic+num_subblocks_Sol*l_col;                                  i_Sol=ic+col_block_size*l_col;
76                                  for (ir=0;ir<row_block_size;++ir) {                                  for (ir=0;ir<row_block_size;++ir) {
77                                     i_Equa=ir+num_subblocks_Equa*l_row;                                     i_Equa=ir+row_block_size*l_row;
78                             in->val[k*block_size+ir+row_block_size*ic]+=                             in->val[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)];                                             array[INDEX4(i_Equa,i_Sol,k_Equa,k_Sol,num_Equa,num_Sol,NN_Equa)];
80                                  }                                  }
# Line 90  void  Finley_SystemMatrix_add(Finley_Sys Line 90  void  Finley_SystemMatrix_add(Finley_Sys
90  }  }
91  /*  /*
92   * $Log$   * $Log$
93   * Revision 1.4  2004/12/15 07:08:33  jgs   * Revision 1.6  2005/07/08 04:07:58  jgs
94   * *** empty log message ***   * Merge of development branch back to main trunk on 2005-07-08
95     *
96     * Revision 1.1.1.1.2.3  2005/06/29 02:34:56  gross
97     * some changes towards 64 integers in finley
98     *
99     * Revision 1.1.1.1.2.2  2005/03/15 07:23:55  gross
100     * 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.
101     *
102     * Revision 1.1.1.1.2.1  2004/11/12 06:58:19  gross
103     * 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
104     *
105     * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
106     * initial import of project esys2
107   *   *
108     * Revision 1.1  2004/07/02 04:21:13  gross
109     * Finley C code has been included
110   *   *
111   *   *
112   */   */

Legend:
Removed from v.102  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.26