Thanks for the guidance. I tried replacing the " source/particles/particle_handler.cc <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdealii%2Fdealii%2Fpull%2F10589%2Ffiles%23diff-df7869b8ff6741c5bba620988f7bd995&data=02%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cd00ea92f27a5466d8a5e08d8395d0f41%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637322419138637595&sdata=CQSVVYYrHp5wMfy3INtkJBdS%2BNjFzBqLAdPwVHI1r%2FU%3D&reserved=0>" file with the one present in "https://github.com/dealii/dealii/pull/10589/files";. Also include/deal.II/particles/particle_accessor.h <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdealii%2Fdealii%2Fpull%2F10319%2Ffiles%23diff-ba98c140727c3e55b479f34172de381b&data=02%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cd00ea92f27a5466d8a5e08d8395d0f41%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637322419138637595&sdata=Y9F5eICnrFT8jNpnmg03tO3gb%2BWO%2B8xEqt9%2F9fucTBQ%3D&reserved=0> and source/particles/particle_accessor.cc <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdealii%2Fdealii%2Fpull%2F10319%2Ffiles%23diff-0b2cb32ab20618cd2a77e2ddfda9eddd&data=02%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cd00ea92f27a5466d8a5e08d8395d0f41%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637322419138647592&sdata=7ZHhT3M4M%2Bu2FaPwpR2qwSkJevjIip4d7%2BvaQrqmsG0%3D&reserved=0> from "https://github.com/dealii/dealii/pull/10319/files";. Then compiled again my deal.ii 9.2.0 but it gives error during compilation.

Yes -- we put about 10 changes every day into deal.II. You can't just replace individual files in 9.2 with the current development sources :-)


Therefore as a second option, I have created a simplified code which represents my problem. Kindly receive the files attached. Looking forward for your guiding response!

The code in question looks like this:

  Particles::Particle<dim> new_particle;
  new_particle.set_location(location);
  new_particle.set_reference_location(
  mapping.transform_real_to_unit_cell(cell, location));
  new_particle.set_id(next_unused_particle_id);

  SymmetricTensor<2, dim> strain;                             strain = 0;
  new_particle.set_properties(make_array_view(strain));

  particle_handler.insert_particle(new_particle, cell);

It is correct that set_properties() throws an exception here, because there really is no property pool associated with this particle. If you write it like this:

  auto inserted_particle
    = particle_handler.insert_particle(new_particle, cell);
  inserted_particle->set_properties(make_array_view(strain));

then things will work if you also change the number of properties stored by the ParticleHandler object to dim*(dim+1)/2=6 (it is currently 'dim').

Best
 W.

--
------------------------------------------------------------------------
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 
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/bc3f6ab2-bf49-1dc1-44fd-7e3b4e101a08%40colostate.edu.

Reply via email to