On 6/1/10 6:47 PM, Boyce Griffith wrote:
>
>
> On 6/1/10 6:30 PM, Roy Stogner wrote:
>>
>> On Tue, 1 Jun 2010, Boyce Griffith wrote:
>>
>>> On 6/1/10 6:14 PM, Roy Stogner wrote:
>>>
>>>> Would a couple read-only accessor functions,
>>>> DofMap::constraints_begin() and DofMap::constraints_end(), be
>>>> sufficient?
>>>
>>> I think so.
>>
>> I settled on constraint_rows_begin()/end() for the names; let me know
>> if there are any problems.
>
> Seems to work --- thanks a lot!
...except that I'm still getting an assertion failure when calling
enforce_constraints_exactly():
Assertion `it!=_global_to_local_map.end()' failed.
[2] /Users/griffith/sfw/libmesh/include/numerics/petsc_vector.h, line
1070, compiled Jun 1 2010 at 18:34:50
terminate called after throwing an instance of 'libMesh::LogicError'
what(): Error in libMesh internal logic
I am including in the ghost DOFs the vector constraint_dof_list:
const DofMap& dof_map = system.get_dof_map();
const unsigned int first_local_dof = dof_map.first_dof();
const unsigned int end_local_dof = dof_map.end_dof();
// Get DOF constraint DOFs associated with the DOF map.
std::vector<unsigned int> constraint_dof_list;
for (DofConstraints::const_iterator i =
dof_map.constraint_rows_begin();
i != dof_map.constraint_rows_end(); ++i)
{
const unsigned int constrained_dof = i->first;
// We only need the dependencies of our own constrained dofs.
if (constrained_dof < first_local_dof ||
constrained_dof >= end_local_dof)
{
const DofConstraintRow& constraint_row = i->second;
for (DofConstraintRow::const_iterator j =
constraint_row.begin();
j != constraint_row.end(); ++j)
{
const unsigned int constraint_dependency = j->first;
if (constraint_dependency < first_local_dof ||
constraint_dependency >= end_local_dof)
{
constraint_dof_list.push_back(constraint_dependency);
}
}
}
}
I guess there must be some other necessary DOFs in the default send_list?
-- Boyce
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users