Thank you for all repliers!!

I tried fix code as you mentioned.... please see redline...

 template <int dim>

  void StokesProblem<dim>::assemble_system ()




    *QGaussLobatto<**2>   quadrature_formula(degree+2);*

    FEValues<dim> fe_values (fe, quadrature_formula,

                             update_values    |

                             update_quadrature_points  |

                             update_JxW_values |


but I received an error message that....

An error occurred in line <1831> of file 
</Users/jaekwangjk/dealii-8.4.1/include/deal.II/lac/block_matrix_base.h> in 

    void dealii::BlockMatrixBase<dealii::SparseMatrix<double> >::add(const 
size_type, const size_type, const value_type) [MatrixType = 

The violated condition was: 


The name and call sequence of the exception was:


Additional Information: 

In a significant number of places, deal.II checks that some intermediate 
value is a finite number (as opposed to plus or minus infinity, or NaN/Not 
a Number). In the current function, we encountered a number that is not 
finite (its value is (nan,0) and therefore violates the current assertion.

This may be due to the fact that some operation in this function created 
such a value, or because one of the arguments you passed to the function 
already had this value from some previous operation. In the latter case, 
this function only triggered the error but may not actually be responsible 
for the computation of the number that is not finite.

There are two common cases where this situation happens. First, your code 
(or something in deal.II) divides by zero in a place where this should not 
happen. Or, you are trying to solve a linear system with an unsuitable 
solver (such as an indefinite or non-symmetric linear system using a 
Conjugate Gradient solver); such attempts oftentimes yield an operation 
somewhere that tries to divide by zero or take the square root of a 
negative value.

In any case, when trying to find the source of the error, recall that the 
location where you are getting this error is simply the first place in the 
program where there is a check that a number (e.g., an element of a 
solution vector) is in fact finite, but that the actual error that computed 
the number may have happened far earlier. To find this location, you may 
want to add checks for finiteness in places of your program visited before 
the place where this error is produced.One way to check for finiteness is 
to use the 'AssertIsFinite' macro.

The deal.II project is located at
For mailing list/forum options, see
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to