/[escript]/trunk/ripley/src/RipleySystemMatrix.cpp
ViewVC logotype

Diff of /trunk/ripley/src/RipleySystemMatrix.cpp

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

branches/diaplayground/ripley/src/RipleySystemMatrix.cpp revision 5147 by caltinay, Fri Sep 12 00:33:02 2014 UTC trunk/ripley/src/RipleySystemMatrix.cpp revision 5148 by caltinay, Mon Sep 15 01:25:23 2014 UTC
# Line 142  void SystemMatrix::ypAx(escript::Data& y Line 142  void SystemMatrix::ypAx(escript::Data& y
142      y.requireWrite();      y.requireWrite();
143      const double* x_dp = x.getSampleDataRO(0);      const double* x_dp = x.getSampleDataRO(0);
144      double* y_dp = y.getSampleDataRW(0);      double* y_dp = y.getSampleDataRW(0);
145      double T0 = gettime();      //double T0 = gettime();
146      HostVectorType xx(x_dp, x_dp+mat.num_rows);      HostVectorType xx(x_dp, x_dp+mat.num_rows);
147      HostVectorType yy(mat.num_rows, 0.);      HostVectorType yy(mat.num_rows, 0.);
148      cusp::multiply(mat, xx, yy);      cusp::multiply(mat, xx, yy);
# Line 156  template<class LinearOperator, Line 156  template<class LinearOperator,
156  void SystemMatrix::runSolver(LinearOperator& A, Vector& x, Vector& b,  void SystemMatrix::runSolver(LinearOperator& A, Vector& x, Vector& b,
157                               Preconditioner& M, escript::SolverBuddy& sb) const                               Preconditioner& M, escript::SolverBuddy& sb) const
158  {  {
     typedef typename LinearOperator::memory_space MemorySpace;  
159      //cusp::verbose_monitor<double> monitor(b, sb.getIterMax(), sb.getTolerance(), sb.getAbsoluteTolerance());      //cusp::verbose_monitor<double> monitor(b, sb.getIterMax(), sb.getTolerance(), sb.getAbsoluteTolerance());
160      cusp::default_monitor<double> monitor(b, sb.getIterMax(), sb.getTolerance(), sb.getAbsoluteTolerance());      cusp::default_monitor<double> monitor(b, sb.getIterMax(), sb.getTolerance(), sb.getAbsoluteTolerance());
161      int solver = sb.getSolverMethod();      int solver = sb.getSolverMethod();
# Line 335  void SystemMatrix::nullifyRowsAndCols(es Line 334  void SystemMatrix::nullifyRowsAndCols(es
334                                        escript::Data& col_q,                                        escript::Data& col_q,
335                                        double mdv)                                        double mdv)
336  {  {
337      double T0 = gettime();      //double T0 = gettime();
338      if (col_q.getDataPointSize() != getColumnBlockSize()) {      if (col_q.getDataPointSize() != getColumnBlockSize()) {
339          throw RipleyException("nullifyRowsAndCols: column block size does not match the number of components of column mask.");          throw RipleyException("nullifyRowsAndCols: column block size does not match the number of components of column mask.");
340      } else if (row_q.getDataPointSize() != getRowBlockSize()) {      } else if (row_q.getDataPointSize() != getRowBlockSize()) {

Legend:
Removed from v.5147  
changed lines
  Added in v.5148

  ViewVC Help
Powered by ViewVC 1.1.26