/[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 1976 by jfenwick, Mon Oct 13 00:18:55 2008 UTC revision 1977 by jfenwick, Thu Nov 6 03:54:35 2008 UTC
# Line 72  void AbstractTransportProblem::setInitia Line 72  void AbstractTransportProblem::setInitia
72       if (u.isEmpty())       if (u.isEmpty())
73            throw TransportProblemException("Error - empty initial value.");            throw TransportProblemException("Error - empty initial value.");
74    
75       if ((getBlockSize()==1) && (u.getDataPointRank()>0) || (u.getDataPointRank()>1))       if (((getBlockSize()==1) && (u.getDataPointRank()>0)) || (u.getDataPointRank()>1))
76            throw TransportProblemException("Error - illegal rank of initial value.");            throw TransportProblemException("Error - illegal rank of initial value.");
77    
78       if (u.getDataPointSize()!=getBlockSize())       if (u.getDataPointSize()!=getBlockSize())
# Line 89  void AbstractTransportProblem::insertCon Line 89  void AbstractTransportProblem::insertCon
89       if (q.isEmpty()) {       if (q.isEmpty()) {
90            return;            return;
91       }       }
92       if ((getBlockSize()==1) && (q.getDataPointRank()>0) || (q.getDataPointRank()>1))       if (((getBlockSize()==1) && (q.getDataPointRank()>0)) || (q.getDataPointRank()>1))
93            throw TransportProblemException("Error - illegal rank of constraint location.");            throw TransportProblemException("Error - illegal rank of constraint location.");
94       if (q.getDataPointSize()!=getBlockSize())       if (q.getDataPointSize()!=getBlockSize())
95            throw TransportProblemException("Error - block size of transport problem and constraint location don't match.");            throw TransportProblemException("Error - block size of transport problem and constraint location don't match.");
# Line 99  void AbstractTransportProblem::insertCon Line 99  void AbstractTransportProblem::insertCon
99            Data r2=Data(0.,q.getDataPointShape(),getFunctionSpace());            Data r2=Data(0.,q.getDataPointShape(),getFunctionSpace());
100            copyConstraint(source,q2,r2);            copyConstraint(source,q2,r2);
101       } else {       } else {
102          if ((getBlockSize()==1) && (r.getDataPointRank()>0) || (r.getDataPointRank()>1))          if (((getBlockSize()==1) && (r.getDataPointRank()>0)) || (r.getDataPointRank()>1))
103               throw TransportProblemException("Error - illegal rank of constraint value.");               throw TransportProblemException("Error - illegal rank of constraint value.");
104          if (r.getDataPointSize()!=getBlockSize())          if (r.getDataPointSize()!=getBlockSize())
105               throw TransportProblemException("Error - block size of transport problem and constraint value don't match.");               throw TransportProblemException("Error - block size of transport problem and constraint value don't match.");

Legend:
Removed from v.1976  
changed lines
  Added in v.1977

  ViewVC Help
Powered by ViewVC 1.1.26