I am not sur if I fully understand the memory structure of the Property 
Pool (or at least I am still confused by it).
If I understand correctly, the properties of all the particles are stored 
in a single Handle array and the get_properties of a single particle 
returns an array view pointing to this large array.
However, the n_properties_per_slot() returns the number of properties 
associated with a single particle. Is there a way to know from within the 
property pool the size of the handle array?

If the properties are stored in a continuous block, one could easily write 
a function that takes into argument a vector of property index, the value 
to set and the number of particles for example. This function would then be 
called from the particle handler which in turn would have an interface to 
this function with the vector of property index and the value to set.
Would that be the right approach? If so, I can work on a PR.




On Monday, October 19, 2020 at 10:11:33 a.m. UTC-4 Wolfgang Bangerth wrote:

> On 10/19/20 4:58 AM, blais...@gmail.com wrote:
> > The issue is that this code is being called a lot (in our case every 
> > iteration, so 100k to 10M times) and each iteration is very fast (1k 
> iteration 
> > is a second or so). Consequently, we've had some severe issue when 
> timing in 
> > parallel.
> > If nothing is wrong with the code I guess what I am seeing is just the 
> cost of 
> > iterating through the particle data structure and valgrind is confusing 
> me :). 
> > I'll try to see if I can combine this loop with another one.
>
> That's one option. Option 2 is to write an interface to the PropertyPool 
> class 
> that allows you to set to zero certain components of all particle 
> properties.
>
> Best
> W.
>
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2cd315d9-f961-4dfc-befb-855f64ccb076n%40googlegroups.com.

Reply via email to