I had a closer look on the system matrix and rhs, when multiplying the exact solution on it and noticed, that transposing the system matrix actually gives the correct matrix. Then the linear system is fulfilled.

But using the transposed matrix as system matrix with one of the solvers still gives the same exception:

"Iterative method reported convergence failure in step 0 with residual nan"

So it seems like setting up the system and assembling the matrix is working (except of the transpose thing), but the solvers are not. Any clue why is that?



Timo Koellner wrote:
I actually did this. Not by checking the norm but saving the matrix and rhs to a file. There are no nan or inf values.

As I can solve the eqns exactly in 1d I built a vector with the exact solution and tested if it's a solution of the computed system.

dealii::VectorTools::interpolate(dofHandler, ExSolutionFunction<1>(), exSolution);
dealii::Vector<double> mult(rhs.size());
systemMatrix.vmult(mult, exSolution);
std::cout << mult-rhs << std::endl;

Not very surprisingly, it's not. It seems to be working for one of the components (the scalar one) of the FESystem but not for the other one. I again checked the assembling of the matrix and rhs but couldn't find any mistake.



Wolfgang Bangerth wrote:
"Exception on processing:
Iterative method reported convergence failure in step 1 with residual nan"

I haven't looked at your code, but it strikes me that you get a NaN after only one iteration. Have you done something like
  std::cout << system_matrix.frobenius_norm() << " "
                 << system_rhs.l2_norm();
to verify that your matrix/rhs aren't already containing NaNs before you even hand them over to the solver?

Best
 W.

------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to