/[escript]/trunk/escript/src/AbstractTransportProblem.cpp
ViewVC logotype

Diff of /trunk/escript/src/AbstractTransportProblem.cpp

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

revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC revision 153 by jgs, Tue Oct 25 01:51:20 2005 UTC
# Line 49  int AbstractSystemMatrix::isEmpty() cons Line 49  int AbstractSystemMatrix::isEmpty() cons
49     return m_empty;     return m_empty;
50  }  }
51    
52  Data operator*(const AbstractSystemMatrix& left, const Data& right)  Data operator*(const AbstractSystemMatrix& left,const Data& right)
53  {  {
54        return left.vectorMultiply(right);        Data tmp=(Data) right;
55          return left.vectorMultiply(tmp);
56  }  }
57    
58  Data AbstractSystemMatrix::vectorMultiply(const Data& right) const  Data AbstractSystemMatrix::vectorMultiply(Data& right) const
59  {  {
60       if (isEmpty())       if (isEmpty())
61            throw SystemMatrixException("Error - Matrix is empty.");            throw SystemMatrixException("Error - Matrix is empty.");
# Line 64  Data AbstractSystemMatrix::vectorMultipl Line 65  Data AbstractSystemMatrix::vectorMultipl
65       if (getRowBlockSize()>1) shape.push_back(getRowBlockSize());       if (getRowBlockSize()>1) shape.push_back(getRowBlockSize());
66    
67       Data out=Data(0.,shape,getRowFunctionSpace(),true);       Data out=Data(0.,shape,getRowFunctionSpace(),true);
68       ypAx(out,Data(right,getColumnFunctionSpace()));       Data in=Data(right,getColumnFunctionSpace());
69         ypAx(out,in);
70       return out;       return out;
71  }  }
72    
73  void AbstractSystemMatrix::ypAx(Data& y,const Data& x) const  void AbstractSystemMatrix::ypAx(Data& y,Data& x) const
74  {  {
75      throw SystemMatrixException("Error - ypAx not available");      throw SystemMatrixException("Error - ypAx not available");
76  }  }
77    
78  Data AbstractSystemMatrix::solve(const Data& in,const boost::python::dict& options) const  Data AbstractSystemMatrix::solve(Data& in,const boost::python::dict& options) const
79  {  {
80       if (isEmpty())       if (isEmpty())
81            throw SystemMatrixException("Error - Matrix is empty.");            throw SystemMatrixException("Error - Matrix is empty.");
# Line 87  Data AbstractSystemMatrix::solve(const D Line 89  Data AbstractSystemMatrix::solve(const D
89       setToSolution(out,in,options);       setToSolution(out,in,options);
90       return out;       return out;
91  }  }
92  void AbstractSystemMatrix::setToSolution(Data& out,const Data& in,const boost::python::dict& options) const  void AbstractSystemMatrix::setToSolution(Data& out,Data& in,const boost::python::dict& options) const
93  {  {
94      throw SystemMatrixException("Error - setToSolution not available");      throw SystemMatrixException("Error - setToSolution not available");
95  }  }

Legend:
Removed from v.149  
changed lines
  Added in v.153

  ViewVC Help
Powered by ViewVC 1.1.26