Hi everybody,

I want to push this and provide you with news... What I did now, was to export the systemMatrix and RHS to Matlab and tried to solve it there, as it obviously is a problem with the solver. Matlab did also have some problems, but it was possible to solve the problem using fsolve. (The direct solver, bicgstab failed, where gmres was able to get the right solution for one of the unknowns but not for the other one). The matrix is singular and I suppose this can be the reason why the solvers terminate during step 0. Does this sounds reasonable to you?

I now attempted to transform the problem to a second order problem. Here I expierence another problem. When applying the gradient to the first order equations I get a delta function in the right hand side. How can this be treated in assembling the system?

Thanks.

Timo

Timo Koellner wrote:
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

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

Reply via email to