On 6/1/10 4:57 PM, Roy Stogner wrote:
>
> On Tue, 1 Jun 2010, Boyce Griffith wrote:
>
>> Are there specific ghost DOFs that are required if I wish to enforce DOF
>> constraints, e.g., periodic boundary conditions?
>
> You should only need to ensure that, on the processor which owns the
> constrained DoF, every dependency of that constrained DoF is present
> as a ghost DoF. We do that in DoFMap::add_constraints_to_send_list().
> That function's currently hard-coded to modify the DoFMap::_send_list
> based on the DoFMap indexing, but it's short and shouldn't be hard to
> modify for your alternate ghost vector pattern.

Would it work simply to append the send_list associated with the DofMap 
to my list of ghosted dofs, e.g.,

    const vector<unsigned int>& send_list = dof_map.get_send_list();
    vector<unsigned int> ghost_dofs = ...;
    ghost_dofs.insert(ghost_dofs.end(), send_list.begin(),
                      send_list.end());
    AutoPtr<NumericVector<double> > ghosted_solution =
       system.solution->clone();
    ghosted_solution->init(solution->size(), solution->local_size(),
                           ghost_dofs, GHOSTED);

-- Boyce

------------------------------------------------------------------------------

_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to