/[escript]/trunk/finley/src/CPPAdapter/TransportProblemAdapter.cpp
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/TransportProblemAdapter.cpp

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

revision 1364 by gross, Mon Dec 17 07:22:45 2007 UTC revision 1365 by gross, Mon Dec 17 07:28:23 2007 UTC
# Line 63  void TransportProblemAdapter::setToSolut Line 63  void TransportProblemAdapter::setToSolut
63      Paso_Options paso_options;      Paso_Options paso_options;
64      SystemMatrixAdapter::dictToPasoOptions(&paso_options,options);      SystemMatrixAdapter::dictToPasoOptions(&paso_options,options);
65      if ( out.getDataPointSize()  != getBlockSize()) {      if ( out.getDataPointSize()  != getBlockSize()) {
66       throw FinleyAdapterException("solve : column block size does not match the number of components of solution.");       throw FinleyAdapterException("solve : block size of solution does not match block size of transport problems.");
67      } else if ( source.getDataPointSize() != getBlockSize()) {      } else if ( source.getDataPointSize() != getBlockSize()) {
68       throw FinleyAdapterException("solve : row block size does not match the number of components of  right hand side.");       throw FinleyAdapterException("solve : block size of source term does not match block size of transport problems.");
69      } else if ( out.getFunctionSpace()  != getFunctionSpace()) {      } else if ( out.getFunctionSpace()  != getFunctionSpace()) {
70       throw FinleyAdapterException("solve : column function space and function space of solution don't match.");       throw FinleyAdapterException("solve : function spaces of solution and of transport problem don't match.");
71      } else if (source.getFunctionSpace() != getFunctionSpace()) {      } else if (source.getFunctionSpace() != getFunctionSpace()) {
72       throw FinleyAdapterException("solve : row function space and function space of right hand side don't match.");       throw FinleyAdapterException("solve : function spaces of source term and of transport problem don't match.");
73      } else if (dt<=0.) {      } else if (dt<=0.) {
74       throw FinleyAdapterException("solve : row function space and function space of right hand side don't match.");       throw FinleyAdapterException("solve : time increment dt needs to be positive.");
75      }      }
76      out.expand();      out.expand();
77      source.expand();      source.expand();
# Line 95  void TransportProblemAdapter::resetTrans Line 95  void TransportProblemAdapter::resetTrans
95  void TransportProblemAdapter::copyInitialValue(escript::Data& u) const  void TransportProblemAdapter::copyInitialValue(escript::Data& u) const
96  {  {
97      Paso_FCTransportProblem* transp=getPaso_FCTransportProblem();      Paso_FCTransportProblem* transp=getPaso_FCTransportProblem();
98        if ( u.getDataPointSize()  != getBlockSize()) {
99         throw FinleyAdapterException("copyInitialValue : block size of solution does not match block size of transport problems.");
100        } else if ( u.getFunctionSpace()  != getFunctionSpace()) {
101         throw FinleyAdapterException("copyInitialValue : function spaces of solution and of transport problem don't match.");
102        }
103      u.expand();      u.expand();
104      double* u_dp=u.getSampleData(0);      double* u_dp=u.getSampleData(0);
105      Paso_FCTransportProblem_checkinSolution( transp,u_dp);      Paso_FCTransportProblem_checkinSolution( transp,u_dp);

Legend:
Removed from v.1364  
changed lines
  Added in v.1365

  ViewVC Help
Powered by ViewVC 1.1.26