Thank you all for all the suggestions you made.
In fact I tried doing two seperate sweeps as Boyce suggested, but it seems
that I am doing a mistake which leads to no change in mass matrix.

This how I am doing that after the first sweep for assembling the matrices:
.
.
.
for ( ; el != end_el; ++el)
    {
      const Elem* elem = *el;
      dof_map.dof_indices (elem, dof_indices);
      fe->reinit (elem);
      Ke.resize (dof_indices.size(), dof_indices.size());
      Me.resize (dof_indices.size(), dof_indices.size());

        for (unsigned int side=0; side<elem->n_sides(); side++){
          if (elem->neighbor(side) == NULL)
            {
              const std::vector<std::vector<Real> >&  phi_face =
fe_face->get_phi();
              fe_face->reinit(elem, side);
              for (unsigned int i=0; i<phi_face.size(); i++){
                matrix_B.set(dof_indices[i],dof_indices[i],1.);
                  } // end if (elem->neighbor(side) == NULL)
            }  // end boundary condition section
          }
    }

Also, what is the best way to loop over the nodes which live on the outer
surface of the domain?
Is it just the way I am doing it for (unsigned int side=0;
side<elem->n_sides(); side++){
          if (elem->neighbor(side) == NULL)
and then for (unsigned int i=0; i<phi_face.size(); i++){ ....

Thanks again,
Omar
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to