Hello Dr. Bangerth,

I apologize for the poor communication from my side.
Below are the changes I made to the refinement process in Step-18 in red:

typedef TrilinosWrappers::MPI::Vector vectorType;
std::vector<std::vector<vectorType>>   history_field (dim, std::vector< 
Vector<double> >(dim));
std::vector< std::vector< Vector<double> > >
             local_history_values_at_qpoints (dim, std::vector< 
Vector<double> >(dim)),
             local_history_fe_values (dim, std::vector< Vector<double> 
>(dim));
for (unsigned int i=0; i<dim; ++i)
  for (unsigned int j=0; j<dim; ++j)
  {
    history_field[i][j].reinit(locally_owned_dofs, locally_relevant_dofs, 
mpi_communicator);
    local_history_values_at_qpoints[i][j].reinit(quadrature.size());
    local_history_fe_values[i][j].reinit(history_fe.n_dofs_per_cell());
  }
.
.
[Calculate the global field]
.
.
history_field.compress(VectorOperation::add);

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.

Best,
Raghunandan.
On Thursday, September 14, 2023 at 6:49:11 PM UTC-5 Wolfgang Bangerth wrote:

> On 9/14/23 15:50, Raghunandan Pratoori wrote:
> > 
> > It took me some time to get around to trying it out. I am unable to 
> figure out 
> > how to compress the vector.
> > The simple 'history_field.compress(VectorOperation::add);' did not work 
> as 
> > expected. Can you tell me how to use it for type 
> > std::vector<std::vector<TrilinosWrappers::MPI::Vector>>?
>
> Pratoori:
> you will have to be more specific in explaining what doesn't work. "did 
> not 
> work" is not enough for me to understand what you are doing, nor what is 
> going 
> wrong. It's as if you were saying "I've tried to prove the Riemann 
> hypothesis, 
> but the proof doesn't work. Can you tell me how to fix it?" without 
> showing 
> what you already did :-)
>
> Show us the code and the error message, and then we can perhaps help!
>
> 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/351857f8-b2fd-4c00-9463-1638a808b1a0n%40googlegroups.com.

Reply via email to