Hello, thanks for the tip :), in fact using subvectors and then insert 
is really faster. But its working only when the code runs with one 
processor, when two or more are used I've got the error

[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Int value must be same on all processes, argument # 3

on the lines

rhs->create_subvector(*f0, coarse_dofs);
rhs->create_subvector(*h0, fine_dofs);

In my case each rank has its own coarse_dofs and fine_dofs arrays which 
also have diffierent sizes, is that the problem? There's a workaround?

Giacomo

On 02/08/2016 05:39 PM, Roy Stogner wrote:
>
> On Mon, 8 Feb 2016, John Peterson wrote:
>
>> Also, remember that setting values in NumericVectors is already a fairly
>> indirect operation.  For example, if you are using PETSc, the values are
>> cached and communicated only when the vector is closed.
>
> We have seen speedup in some applications by using the vectorized
> NumericVector::insert() methods instead of NumericVector::set(). A
> few fewer virtual function calls made a small but noticeable
> difference.
> ---
> Roy


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to