On Wed, 5 Nov 2008, Derek Gaston wrote:
> Anyone have a good piece of code for computing a norm of just the > piece of a NumericVector that corresponds to a specific variable > number? My problem is that I have multiple > variables in my system... but I need to get the norm of the residual > for each one individually. > > Should we maybe extend the l2_norm(), l1_norm(), linfty_norm() > functions to take an option variable number? Does the NumericVector class even have enough information to know which variable a coefficient belongs to? I'd hope it doesn't; I like modular code. I think what you want to modify is the SystemNorm class. Currently it assumes that you either want a weighted combination of Sobolev norms of different variables or a discrete norm of the entire vector. Extending it (and the classes that use it) to provide weighted discrete norms of particular combinations of variables within a vector should be straightforward. --- 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
