On Tue, 1 Jun 2010, Boyce Griffith wrote:

> On 6/1/10 6:01 PM, Roy Stogner wrote:
>> 
>> On Tue, 1 Jun 2010, Boyce Griffith wrote:
>> 
>>> Is there a mechanism to access the data stored in _dof_constraints,
>>> i.e., to loop over the list of constrained rows?
>> 
>> for (DofConstraints::const_iterator it=_dof_constraints.begin();
>> it != _dof_constraints.end(); ++it)
>> {
>> unsigned int index = it->first;
>> DofConstraintRow& row = it->second;
>> 
>> Basically DofConstraints is just a std::map, and even if we ever
>> change that we'll still support the STL-map-style iterators.
>
> Understood --- but dof_constraints appears to be private.

Ah, I misunderstood you!  So it is.  We hadn't anticipated the need
for applications to access it.

And I'm reluctant to make it public; we've talked about using the
DofConstraints mechanism with a few changes to support strong
Dirichlet conditions, and I'd hate to encourage people to write code
that could be broken by those changes.

Would a couple read-only accessor functions,
DofMap::constraints_begin() and DofMap::constraints_end(), be
sufficient?
---
Roy

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

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

Reply via email to