Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Roy Stogner
On Wed, 5 Nov 2008, Kirk, Benjamin (JSC-EG) wrote: If both PETSc and Trilinos allow the user to manage the local element storage, that could certainly be exploited for performance.  operator(i) would be inline Good. with some error checking (in debug/devel mode only) and then return _va

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Roy Stogner
On Wed, 5 Nov 2008, Kirk, Benjamin (JSC-EG) wrote: > 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 local_dof_index_range = > DofMap::local_dof_index_range

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Kirk, Benjamin (JSC-EG)
[email protected] Subject: Re: [Libmesh-users] Norm of a NumericVector for specific variable... So... after hashing this out with some people around here... I'm now thinking that the vector multiply and call linear algebra package norm is a bad idea. Firstly, we have some syst

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Derek Gaston
So... after hashing this out with some people around here... I'm now thinking that the vector multiply and call linear algebra package norm is a bad idea. Firstly, we have some systems where we're solving up to 9 variables! That means we'd have to do all of that stuff every time not t

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Kirk, Benjamin (JSC-EG)
>> 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 th

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Roy Stogner
On Wed, 5 Nov 2008, Kirk, Benjamin (JSC-EG) wrote: 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. T

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Kirk, Benjamin (JSC-EG)
: [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

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Derek Gaston
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 pac

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Roy Stogner
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& v, unsigned int var = 0, > FEMNormType norm_type = L2) R

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Derek Gaston
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& v, unsigned int var = 0, FEMNormType norm_type = L2) But like you say, that function assumes that if

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Roy Stogner
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 > fo

Re: [Libmesh-users] Norm of a NumericVector for specific variable...

2008-11-05 Thread Kirk, Benjamin (JSC-EG)
What about a scaled_norm of sorts where you can weight each variable by a constant? Yours is then just a special case with a one and some zeros? - Original Message - From: Derek Gaston <[EMAIL PROTECTED]> To: [email protected] Sent: Wed Nov 05 16:08:09 2008 Subject: