Dear Chucui,

Thanks for the explanation - clearly I was wrong with regards to exactly how 
much complexity could be stripped from this example. Anyway, I think that 
Daniel has made the critical observation as to where the fault may lie. 
Hopefully his suggestion will sort this out for you.

Best,
Jean-Paul

> On 08 Aug 2018, at 16:38, chucui1...@gmail.com wrote:
> 
> Dear Jean-Paul,
> 
> Thank you very much for your patience, when I print some information like 
> this:
> 
> template <int dim>
> void Problem<dim>::run ()
> {
> [...]
>   setup_dofs ();
> std::cout << "test-1 "<< std::endl;                              
>         VectorTools::project (dof_handler_0, constraints_phi, 
> QGauss<dim>(degree+2),
>                         SolutionsPhi<dim>(),
>                         phi_0);      
> std::cout << "test-2 " << std::endl;                                          
>         VectorTools::project (dof_handler_2, constraints_q, 
> QGauss<dim>(degree+2),
>                         SolutionsQ<dim>(),
>                         q_0);  
>  std::cout << "test-3 " << std::endl;                           
>         assemble_system_1 (phi_0);    
>  std::cout << "test-4" << std::endl;                   
>         assemble_rhs_1 (phi_0, q_0);
>  std::cout << "test-5" << std::endl;         
> 
> and the output is
> 
> Linking CXX executable Case0-3
> [ 50%] Built target Case0-3
> [100%] Run with Debug configuration
>    Number of active cells: 16384
>    Number of degrees of freedom: 98818 (16641+16641+65536)
> test-1 
> test-2 
> test-3 
> 
> --------------------------------------------------------
> An error occurred in line <1764> of file 
> </home/yucan/boost/deal.ii-8.5.1/deal.II/include/deal.II/lac/sparse_matrix.h> 
> in function
>     void 
> dealii::SparseMatrix<number>::add(dealii::SparseMatrix<number>::size_type, 
> dealii::SparseMatrix<number>::size_type, number) [with number = double; 
> dealii::SparseMatrix<number>::size_type = unsigned int]
> The violated condition was: 
>     (index != SparsityPattern::invalid_entry) || (value == number())
> Additional information: 
>     You are trying to access the matrix entry with index <0,1>, but this 
> entry does not exist in the sparsity pattern of this matrix.
> 
> 
> So it can't run when arrive at "assemble_system_1", so "setup-dof()",  
> "assemble_system_1()", "run()" are left—— this is LittleCase0-3.cc
> if only "setup_dof()", "run()" are left——this is LittleCase0-4.cc
> 
> Hope this is a minimal example. Thank you very much!
> 
> Best,
> Chucui
> 
> 
> 
> -- 
> The deal.II project is located at http://www.dealii.org/ 
> <http://www.dealii.org/>
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> <https://groups.google.com/d/forum/dealii?hl=en>
> --- 
> 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 to dealii+unsubscr...@googlegroups.com 
> <mailto:dealii+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> <LittleCase0-3.cc><LittleCase0-4.cc>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
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 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to