/[escript]/trunk-mpi-branch/paso/src/SystemMatrix.c
ViewVC logotype

Diff of /trunk-mpi-branch/paso/src/SystemMatrix.c

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

revision 1095 by gross, Thu Apr 12 10:01:47 2007 UTC revision 1096 by ksteube, Mon Apr 16 22:59:33 2007 UTC
# Line 49  Paso_SystemMatrix* Paso_SystemMatrix_all Line 49  Paso_SystemMatrix* Paso_SystemMatrix_all
49       out->solver_package=PASO_PASO;         out->solver_package=PASO_PASO;  
50       out->solver=NULL;         out->solver=NULL;  
51       out->val=NULL;         out->val=NULL;  
      out->trilinos_data=NULL;  
52       out->reference_counter=1;       out->reference_counter=1;
53       out->type=type;       out->type=type;
54       /* ====== compressed sparse columns === */       /* ====== compressed sparse columns === */
# Line 121  Paso_SystemMatrix* Paso_SystemMatrix_all Line 120  Paso_SystemMatrix* Paso_SystemMatrix_all
120       out->maxNumCols = out->col_distribution->maxNumComponents;       out->maxNumCols = out->col_distribution->maxNumComponents;
121       out->mpi_info = Paso_MPIInfo_getReference(out->pattern->mpi_info);       out->mpi_info = Paso_MPIInfo_getReference(out->pattern->mpi_info);
122       /* allocate memory for matrix entries */       /* allocate memory for matrix entries */
123       if (type & MATRIX_FORMAT_TRILINOS_CRS) {       if (type & MATRIX_FORMAT_CSC) {
124           Paso_TRILINOS_alloc(out->trilinos_data, out->pattern,out->row_block_size,out->col_block_size);          n_norm = out->maxNumCols * out->col_block_size;
125       } else {       } else {
126           if (type & MATRIX_FORMAT_CSC) {          n_norm = out->maxNumRows * out->row_block_size;
127              n_norm = out->maxNumCols * out->col_block_size;       }
128           } else {       out->val=MEMALLOC(out->myLen,double);
129              n_norm = out->maxNumRows * out->row_block_size;       out->normalizer=MEMALLOC(n_norm,double);
130           }       out->normalizer_is_valid=FALSE;
131           out->val=MEMALLOC(out->myLen,double);       if (! Paso_checkPtr(out->val)) Paso_SystemMatrix_setValues(out,DBLE(0));
132           out->normalizer=MEMALLOC(n_norm,double);       if (! Paso_checkPtr(out->normalizer)) {
133           out->normalizer_is_valid=FALSE;           #pragma omp parallel for private(i) schedule(static)
134           if (! Paso_checkPtr(out->val)) Paso_SystemMatrix_setValues(out,DBLE(0));           for (i=0;i<n_norm;++i) out->normalizer[i]=0.;
          if (! Paso_checkPtr(out->normalizer)) {  
              #pragma omp parallel for private(i) schedule(static)  
              for (i=0;i<n_norm;++i) out->normalizer[i]=0.;  
          }  
135       }       }
136    }    }
137    /* all done: */    /* all done: */
# Line 171  void Paso_SystemMatrix_dealloc(Paso_Syst Line 166  void Paso_SystemMatrix_dealloc(Paso_Syst
166          Paso_MPIInfo_dealloc(in->mpi_info);          Paso_MPIInfo_dealloc(in->mpi_info);
167          MEMFREE(in->val);          MEMFREE(in->val);
168          MEMFREE(in->normalizer);          MEMFREE(in->normalizer);
         Paso_TRILINOS_free(in->trilinos_data);  
169          Paso_solve_free(in);          Paso_solve_free(in);
170          MEMFREE(in);          MEMFREE(in);
171          #ifdef Paso_TRACE          #ifdef Paso_TRACE

Legend:
Removed from v.1095  
changed lines
  Added in v.1096

  ViewVC Help
Powered by ViewVC 1.1.26