On Wed, 5 Nov 2008, Derek Gaston wrote:

> Hmmm... I didn't even know that SystemNorm existed.  After poking around to 
> where it was used... it looks like a method already exists for what I want:
>
> System::calculate_norm(NumericVector<Number>& v, unsigned int var = 0, 
> FEMNormType norm_type = L2)

Right.  System has its hands on the DofMap, so it can do exactly what
you want without any change in the classes' interdependence.

> But like you say, that function assumes that if you want a discrete norm of 
> the vector... that you want it of the entire vector.  In fact... 
> ultimately... NumericVector::norm_type() gets called.

Hey, what did you want me to do, reinvent the wheel?  ;-)

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.

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

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

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