On 9/14/23 20:13, Raghunandan Pratoori wrote:
The above section of code gives an error during the compress operation. The
error message is -
‘class std::vector<std::vector<dealii::TrilinosWrappers::MPI::Vector,
std::allocator<dealii::TrilinosWrappers::MPI::Vector> > >’ has no member named
‘compress’
The above error message is expected as the compress operation is not defined
for that datatype. However, I am unsure how to do the compress operation, as
mentioned in Step-18. Please advice.
Well, as you already note, there is no compress() member function on
std::vector. But you don't want to call compress() on the std::vector anyway,
you want to call it on the individual TrilinosWrappers::MPI::Vector objects
that are stored in the std::vector. The following should do:
for (unsigned int i=0; i<history_field.size(); ++i)
for (unsigned int j=0; j<history_field[i].size(); ++j)
history_field[i][j].compress(...);
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/b694a626-536d-a5ff-4b9f-28105b8d222f%40colostate.edu.