On Thu, Nov 13, 2008 at 11:19 AM, Roy Stogner <[EMAIL PROTECTED]>wrote:
>
> On Thu, 13 Nov 2008, Derek Gaston wrote:
>
> How does this work in parallel - pass in a set of only local elements
> on each processor?
Yes - note the new local_dof_indices() method on System().
> I still think we'd have done better to use another NumericVector of
> coefficients. It would have about the same overhead as std::set in
> the most common case and would be much more efficient when taking
> weighted discrete norms.
Well.... I kind of mocked it up... and just didn't like it. It felt like a
lot manipulation just to do something simple.
> Can we at least re-optimize the case where the user just wants a
> discrete norm of the whole vector? I've always used Sobolev norms
> when I wanted "slow but physically meaningful" and discrete norms when
> I wanted "fast but hackish", and I'm worried that unnecessarily
> finding dof indices and summing each variable separately might take
> away the "fast" part of that.
If you want the discrete norm of the whole vector just call v.l2_norm() or
whatever.
If you're talking about possibly detecting that all of the variable weights
are 1.0 and calling v.l2_norm() in System::calculate_norm()... that should
be possible. I viewed what was there before as wrong since it didn't take
the weighting into account at all.
Specifically, if you called the calculate_norm() method that takes a
variable number and passed in a discrete norm.... you didn't get back the
norm of the entries corresponding to that variable... instead you got back
the norm of the whole vector (with no warning or anything). Now you get
back what you expect.
Do you want me to put a check in there to see if all of the variable weights
are 1.0 and call l2_norm() (or whatever) directly?
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel