Wolfgang, thank you for the hint. I looked at setp 47 sparsity pattern. If I understood it right, the main difference stands in the locally_relevant_dofs, which are no longer extracted and used. Rather, the sparsity pattern is based on the whole dof_handler, as per the instruction
DoFTools::make_flux_sparsity_pattern( this->dof_handler, dsp, this->hanging_node_constraints, true ); At present, I am a bit confused by the final statements of the setup_system, namely: system_matrix.reinit(sparsity_pattern); system_rhs.reinit(dof_handler.n_dofs()); In step 47, system_matrix is of type Sparse_Matrix, whereas I am using wrappers to PETSc or TRILINOS ( i.e LA::MPI::SparseMatrix ) and they cannot be reinit with the sparsity_pattern. Similarly for system_rhs. I have been reading those classes yet could not figure out how to circumvent the problem. Can you please address me in this regard? Thank you so much, Alberto *Alberto Salvadori* Dipartimento di Ingegneria Meccanica e Industriale (DIMI) Universita` di Brescia, via Branze 43, 25123 Brescia Italy tel 030 3715426 e-mail: [email protected] web-page: http://m4lab.unibs.it/faculty.html On Wed, Dec 23, 2020 at 8:43 PM Wolfgang Bangerth <[email protected]> wrote: > > Alberto, > my suspicion would be that you are computing terms for the interface > matrix > that are not part of the sparsity pattern of the Trilinos matrix. (PETSc > does > not require you to say up front where the nonzero entries of the matrix > are > going to be, if I recall correctly.) > > This can happen because for "normal" CG methods, you only get entries in > the > matrix if DoFs i,j are located on the same cell. But for methods that > contain > jump terms on the interfaces, you also get contributions for DoFs i,j > located > on different cells (and not necessarily at the face you're integrating > over). > Take a look at how step-47 builds its sparsity pattern. > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > www: http://www.math.colostate.edu/~bangerth/ > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/138efd45-e249-2dbf-af90-b4e2edb4e40f%40colostate.edu > . > -- Informativa sulla Privacy: http://www.unibs.it/node/8155 <http://www.unibs.it/node/8155> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CABcATpdaH%3Dxg1FPy0GnS5Rk6VcCzWH1jSHPVZRoiqXihjj7T9w%40mail.gmail.com.
