Thanks for the response! I tried to put "Assert (system_matrix.n() == dof_handler.n_dofs(), ExcInternalError()); " when I assemble system , but i get the same error message, regardless of it
*An error occurred in line <1668> of file </Users/kimjaekwang/dealii-8.4.1/include/deal.II/lac/constraint_matrix.templates.h> in function* * void dealii::internals::dealiiSparseMatrix::add_value(const LocalType, const size_type, const size_type, SparseMatrixIterator &) [SparseMatrixIterator = dealii::SparseMatrixIterators::Iterator<double, false>, LocalType = double]* *The violated condition was: * * matrix_values->column() == column* *The name and call sequence of the exception was:* * typename SparseMatrix<typename SparseMatrixIterator::MatrixType::value_type>::ExcInvalidIndex(row, column)* *Additional Information: * *You are trying to access the matrix entry with index <3,13>, but this entry does not exist in the sparsity pattern of this matrix.* By the way, i found that the code is working well when I refine my mesh globally, saying 100% of refinement. GridRefinement::refine_and_coarsen_fixed_number (triangulation, estimated_error_per_cell, 1.0, 0.0); it goes 5-refinement cycle perfectly. *Cycle 0:* * Number of active cells: 4* * Number of degrees of freedom: 25* *dof_hander._n_dofs() : 25* * Assemble system finished* * ||u_k-u_{k-1}|| = 9.91167e-06 Iteration Number: 52* * L2_error : 0.00233134* *Cycle 1:* * Number of active cells: 16* *dof_hander._n_dofs() : 81* *Set up system finished* * Assemble system finished* * ||u_k-u_{k-1}|| = 9.41577e-06 Iteration Number: 15* * L2_error : 0.000299119* *Cycle 2:* * Number of active cells: 16* *dof_hander._n_dofs() : 81* *Set up system finished* * Assemble system finished* * ||u_k-u_{k-1}|| = 9.98969e-07 Iteration Number: 2* * L2_error : 0.000287962* *Cycle 3:* * Number of active cells: 16* *dof_hander._n_dofs() : 81* *Set up system finished* * Assemble system finished* * ||u_k-u_{k-1}|| = 6.38877e-06 Iteration Number: 1* * L2_error : 0.000287717* *[100%] Built target run* However, if only 90% of cell is being refined, I could only go 3 cycle, and if then same of less than 80 I am receiving same errors... Might AMR be related to this...? GridRefinement::refine_and_coarsen_fixed_number (triangulation, estimated_error_per_cell, 0.8, 0.0); -- 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.