On Wed, Jun 13, 2012 at 9:45 AM, Derek Gaston <[email protected]> wrote:

> I guess... instead of asking how to do that I should say what I really
> want to do: zero a variable.  So if I have 3 variables in a system (u,v,w)
> I just want to zero 'v' and not the other two.  I was thinking of doing
> this by snagging all of the dof_indices for v and then calling set() and
> passing those in along with 0.  Is there a better way?

I don't know of an easy way of snagging of dof_indices for v except this:
loop over elements, get the v indices off that element and accumulate them
in a set.  Inefficient?  Probably, because of duplication, but I don't
think there is an easy way to do it otherwise.  Maybe I'm missing
something.  In my case, however, this set up is done once per linear solve,
so it probably isn't too performance-critical.  And I can avoid doing this
again until the mesh changes (I don't optimize like that yet, but will do
in the future).

Dmitry.

>
> Derek
>
>
> On Wed, Jun 13, 2012 at 8:39 AM, Derek Gaston <[email protected]> wrote:
>
>> Dmitry - did you ever figure this out?  I need to do the same thing...
>> anyone know of a shortcut?
>>
>> Derek
>>
>>
>> On Fri, Mar 2, 2012 at 9:25 AM, Dmitry Karpeev <[email protected]>wrote:
>>
>>> Dear All,
>>> What's the fastest way to build a list of ALL local dof indices
>>> corresponding to a given system variable?
>>> I figured one way is to loop over the local elements, call
>>> dof_map.dof_indices(elem, elemlist, varid), combine elemlists and
>>> eliminate
>>> the duplicates.
>>> Is there a better way?
>>>
>>> Thanks.
>>> Dmitry.
>>>
>>> ------------------------------------------------------------------------------
>>> Virtualization & Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>> _______________________________________________
>>> Libmesh-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>
>>
>>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to