Unfortunately there is nothing in the library that is generic to find all local 
dof indices for a specific variable.

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...  What if NumericVector 
allowed a subrange_norm()?

Seems like we should eventually implement the block sparse matrix and vector 
variants - that would make it really easy.  I've often wondered if there would 
be much of a performance gain on the linear algebra side.



----- Original Message -----
From: Derek Gaston <[EMAIL PROTECTED]>
To: Roy Stogner <[EMAIL PROTECTED]>
Cc: [email protected] <[email protected]>
Sent: Wed Nov 05 17:27:57 2008
Subject: Re: [Libmesh-users] Norm of a NumericVector for specific variable...

On Nov 5, 2008, at 4:09 PM, Roy Stogner wrote:

> In fact, I think we'll want to hand this norm off to NumericVector in
> the end too, providing it with a cloned NumericVector whose
> coefficients are set to the proper weights given in the SystemNorm, so
> it just has to call the linear algebra package to pointwise multiply
> and then take a norm.

This makes sense to me.

>> So... now my question is... is there a way to get a list of all of  
>> the DofIndices for a variable on a processor?  Or am I going to  
>> have to loop over each element calling dof_map->dof_indices() and  
>> passing in the variable to build up this list?
>
> I don't see any way, no.  Maybe Ben knows of something I'm forgetting.

Hopefully.

> But at least you won't have to loop over *every* element - you just
> need to know which local DoFs belong to your variable.

Right... just loop over local elements.

Well... I guess I'll start writing something...

Derek

-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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