/[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 1417 by gross, Mon Feb 25 04:45:48 2008 UTC revision 1429 by trankine, Wed Feb 27 08:53:20 2008 UTC
# Line 30  AbstractTransportProblem::AbstractTransp Line 30  AbstractTransportProblem::AbstractTransp
30  {  {
31    if (blocksize<=0)    if (blocksize<=0)
32       throw TransportProblemException("Error - negative block size of transport problem.");       throw TransportProblemException("Error - negative block size of transport problem.");
33    if ((theta<0.) or (theta>1.))    if ((theta<0.) || (theta>1.))
34       throw TransportProblemException("Error - theta needs to be between 0. and 1..");       throw TransportProblemException("Error - theta needs to be between 0. and 1..");
35    
36     m_empty=0;     m_empty=0;
# Line 71  void AbstractTransportProblem::setInitia Line 71  void AbstractTransportProblem::setInitia
71       if (u.isEmpty())       if (u.isEmpty())
72            throw TransportProblemException("Error - empty initial value.");            throw TransportProblemException("Error - empty initial value.");
73    
74       if ((getBlockSize()==1) and (u.getDataPointRank()>0) or (u.getDataPointRank()>1))       if ((getBlockSize()==1) && (u.getDataPointRank()>0) || (u.getDataPointRank()>1))
75            throw TransportProblemException("Error - illegal rank of initial value.");            throw TransportProblemException("Error - illegal rank of initial value.");
76    
77       if (u.getDataPointSize()!=getBlockSize())       if (u.getDataPointSize()!=getBlockSize())
# Line 88  void AbstractTransportProblem::insertCon Line 88  void AbstractTransportProblem::insertCon
88       if (q.isEmpty()) {       if (q.isEmpty()) {
89            return;            return;
90       }       }
91       if ((getBlockSize()==1) and (q.getDataPointRank()>0) or (q.getDataPointRank()>1))       if ((getBlockSize()==1) && (q.getDataPointRank()>0) || (q.getDataPointRank()>1))
92            throw TransportProblemException("Error - illegal rank of constraint location.");            throw TransportProblemException("Error - illegal rank of constraint location.");
93       if (q.getDataPointSize()!=getBlockSize())       if (q.getDataPointSize()!=getBlockSize())
94            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 98  void AbstractTransportProblem::insertCon Line 98  void AbstractTransportProblem::insertCon
98            Data r2=Data(0.,q.getDataPointShape(),getFunctionSpace());            Data r2=Data(0.,q.getDataPointShape(),getFunctionSpace());
99            copyConstraint(source,q2,r2);            copyConstraint(source,q2,r2);
100       } else {       } else {
101          if ((getBlockSize()==1) and (r.getDataPointRank()>0) or (r.getDataPointRank()>1))          if ((getBlockSize()==1) && (r.getDataPointRank()>0) || (r.getDataPointRank()>1))
102               throw TransportProblemException("Error - illegal rank of constraint value.");               throw TransportProblemException("Error - illegal rank of constraint value.");
103          if (r.getDataPointSize()!=getBlockSize())          if (r.getDataPointSize()!=getBlockSize())
104               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.1417  
changed lines
  Added in v.1429

  ViewVC Help
Powered by ViewVC 1.1.26