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

Reply via email to