On 6/16/20 1:46 PM, Andrew Davis wrote:

and I have gotten what I expect.  I have also tried attaching the particle properties using:

unsigned int npart = 0;
for( auto iter=particleHandler.begin(); iter!=particleHandler.end(); ++iter, ++part ) {   dealii::ArrayView<double> data(interpolatedParticleQuantities.begin() + part*ncomponents, ncomponents);

but I get the compiler error:

*error: *cannot convert ‘*dealii::ArrayView<double>*’ to ‘*const std::vector<double, std::allocator<double> >&*’

353 | iter->set_properties(*data*);

Does anyone know what I am doing wrong? Or is there is a better way to do this? I'm sure this is a dumb question, but I couldn't find anything in the tutorials/examples.

You've already solved this one problem by converting the ArrayView to a std::vector by hand in your next mail.

> The violated condition was:
> property_pool != nullptr
> Additional information:
> This exception -- which is used in many places in the library -- usually

That's more complicated. The exception happens in the line
and tells you that the particle 'iter' points to isn't associated with a PropertyPool, i.e., the object that stores particle properties. I'm not sure why that is so. I believe that from your code, you set up the ParticleHandler to hold properties, but I can't see where the ParticleHandler's PropertyPool would be propagated to the newly added particles.

Can you create a minimal program that shows the issue? It doesn't have to do anything useful, just illustrate the error.


Wolfgang Bangerth          email:                 bange...@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 
--- 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 

Reply via email to