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(); |
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); |