Dear everybody: I don't have any particular problem, just trying to streamline a code. I am have a mess with the interfaces of my code, in particular with the functions and classes I have created, primarily because I have to handle a ''packet'' of vectors, say
PETScWrappers::MPI::Vector Vect1; PETScWrappers::MPI::Vector Vect2; PETScWrappers::MPI::Vector Vect3; PETScWrappers::MPI::Vector Vect4; … PETScWrappers::MPI::Vector Vect7; and use them either as input or output arguments of some functions, solvers, complementary computations, etc. This is quite cumbersome, and as solution I naively thought I could do the following std::vector<PETScWrappers::MPI::Vector > VectorPacket ; VectorPacket.resize(7) ; for (int i=0; i<7 ; ++i) VectorPacket[i].reinit (locally_owned_dofs, mpi_communicator ) ; So, now VectorPacket is really a packet, rather than seven isolated vectors. It is almost needless to say that this is bad idea, std::vector will demand quite a few things from the class PETScWrappers::MPI::Vector which are just not there (in particular some operators). In reality the size of the packet of vector is not always seven, which means that I really need to use a proper container for which I can change it's size. Do you have any suggestion (a.k.a. creative approach) on how to deal with an issue like this one? Which container from the STL would be appropriate? Many thanks. -- 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. For more options, visit https://groups.google.com/d/optout.