>> Could the api allow you to specify the indices from user-space? The
>> reason I ask is because if all your variables are the same type it
>> is pretty easy to figure out the range from the first_local_index,
>> last_local_index, n_vars, and var_num.
>>
>> That's a little hackish to do inside the library... 
>
> A *little* hackish?  No, requiring the command line option
> "--node_major_dofs" to use that coefficient numbering, that was a
> little hackish.  *Breaking* that option (as well as Taylor-Hood
> elements, etc.) would be a *lot* hackish.  ;-)

> But as an optimization which could fall back on my more general code,
> it's a very good idea.  Use NumericVector::subrange_norm() only if
> we're using var-major numbering, and have the DofMap cache the
> first_local_index_var[n] for each variable so we get the range limits
> right even if there's differing FE types in use.

Yeah, of course you're right...  For only a tiny bit of library code we can put 
together something that might be quite useful.  So, what do you think about 
something like

std:pair<unsigned int, unsigned int> local_dof_index_range = 
DofMap::local_dof_index_range (unsigned int var_num = -1);

(where I have obviously taken some liberty combining a function call with its 
prototype)?

When called without a var_num argument we just return 

std::make_pair(first_local_index, last_local_index);

otherwise the relevant bounds for var_num?

-Ben
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to