On 04/06/2017 02:55 PM, Jaekwang Kim wrote:
template<intdim>

void

Step4<dim>::copy_local_to_global (constAssemblyCopyData &copy_data)

{

    for(unsignedinti=0; i<copy_data.local_dof_indices.size(); ++i)

    {

        for(unsignedintj=0; j<copy_data.local_dof_indices.size(); ++j)

            system_matrix.add (copy_data.local_dof_indices[i],

                               copy_data.local_dof_indices[j],

                               copy_data.cell_matrix(i,j));

        system_rhs(copy_data.local_dof_indices[i]) += copy_data.cell_rhs(i);



    }



     *constraints.distribute_local_to_global
(copy_data.cell_matrix,copy_data.cell_rhs,copy_data.local_dof_indices,system_matrix,system_rhs);*

*    // I am suspicious on this part...*

}

You copy things twice into the global matrix and rhs, but only once taking into accounts the constraints. Take a look at step-32, for example, to see how this function is supposed to look.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to