From: Dmitry K. <ka...@mc...> - 2012-06-14 21:56:08
|
What are the node iterators I need for this? I assume I'll need to call dof_map().get_indices() here and something else on the elements? Thanks. Dmitry. On Wed, Jun 13, 2012 at 1:06 PM, Roy Stogner <roy...@ic...>wrote: > > Suggestion: Do one loop over nodes adding all indices for each > variable at each node, then a loop over elements adding all indices > for each variable at each element (not at the nodes of each element, > but at the element-considered-as-**DofObject itself). That way you > don't get any duplicates, don't need std::set, and you're > O(N) rather than O(N log N). > > Even if you need a sorted list, a sort on the final vector may be > faster than building up a sorted set one element at a time. > --- > Roy > > > On Wed, 13 Jun 2012, Dmitry Karpeev wrote: > > So, I basically found a workaround. It's not the most efficient, by from >> my >> (imperfect) understanding of the libMesh code, there might not be a more >> efficient way. You can find the details in src/solvers/petscdmlibmesh.C. >> >> Dmitry. >> >> On Wed, Jun 13, 2012 at 9:39 AM, Derek Gaston <fri...@gm...> 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 <ka...@mc... >>> >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/<http://www.accelacomm.com/jaw/sfnl/114/51521223/> >>>> ______________________________**_________________ >>>> Libmesh-users mailing list >>>> Libmesh-users@lists.**sourceforge.net<Lib...@li...> >>>> https://lists.sourceforge.net/**lists/listinfo/libmesh-users<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/<http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/> >> >> ______________________________**_________________ >> Libmesh-users mailing list >> Libmesh-users@lists.**sourceforge.net<Lib...@li...> >> https://lists.sourceforge.net/**lists/listinfo/libmesh-users<https://lists.sourceforge.net/lists/listinfo/libmesh-users> >> >> >> |