~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to paso/src/Smoother.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  
59
59
  /* allocations: */  
60
60
  Paso_Preconditioner_Smoother* out=MEMALLOC(1,Paso_Preconditioner_Smoother);
61
 
  if (! Paso_checkPtr(out)) {
 
61
  if (! Esys_checkPtr(out)) {
62
62
     out->localSmoother=Paso_Preconditioner_LocalSmoother_alloc(A_p->mainBlock,jacobi,verbose);
63
63
     out->is_local=is_local;
64
64
  }
65
 
  if (Paso_MPIInfo_noError(A_p->mpi_info)) {
 
65
  if (Esys_MPIInfo_noError(A_p->mpi_info)) {
66
66
     return out;
67
67
  } else {
68
68
     Paso_Preconditioner_Smoother_free(out);
69
69
     return NULL;
70
70
  }
71
71
}
72
 
Paso_Preconditioner_LocalSmoother* Paso_Preconditioner_LocalSmoother_alloc(Paso_SparseMatrix * A_p, const bool_t jacobi, const bool_t verbose)
 
72
Paso_Preconditioner_LocalSmoother* Paso_Preconditioner_LocalSmoother_alloc(Paso_SparseMatrix * A_p, const bool_t jacobi, bool_t verbose)
73
73
{
74
74
   
75
75
   dim_t n=A_p->numRows;
76
76
   dim_t n_block=A_p->row_block_size;
77
77
   dim_t block_size=A_p->block_size;
78
78
   
79
 
   double time0=Paso_timer();
 
79
   double time0=Esys_timer();
80
80
   /* allocations: */  
81
81
   Paso_Preconditioner_LocalSmoother* out=MEMALLOC(1,Paso_Preconditioner_LocalSmoother);
82
 
   if (! Paso_checkPtr(out)) {
 
82
   if (! Esys_checkPtr(out)) {
83
83
      
84
84
      out->diag=MEMALLOC( ((size_t) n) * ((size_t) block_size),double);
85
85
      out->pivot=MEMALLOC( ((size_t) n) * ((size_t)  n_block), index_t);
86
86
      out->buffer=MEMALLOC( ((size_t) n) * ((size_t)  n_block), double);
87
87
      out->Jacobi=jacobi;
88
88
      
89
 
      if ( ! ( Paso_checkPtr(out->diag) || Paso_checkPtr(out->pivot) ) ) {
 
89
      if ( ! ( Esys_checkPtr(out->diag) || Esys_checkPtr(out->pivot) ) ) {
90
90
         Paso_SparseMatrix_invMain(A_p, out->diag, out->pivot );
91
91
      }
92
92
      
93
93
   }
94
 
   time0=Paso_timer()-time0;
 
94
   time0=Esys_timer()-time0;
95
95
   
96
 
   if (Paso_noError()) {
 
96
   if (Esys_noError()) {
97
97
      if (verbose) {
98
98
         if (jacobi) {
99
99
           printf("timing: Jacobi preparation: elemination : %e\n",time0);
424
424
      }
425
425
   }
426
426
   return;
427
 
}
 
427
}
 
 
b'\\ No newline at end of file'