Hi all,
I am writing a piece of parallel code and it seems that I don't understand
a few issues.
My code is close to step-31 I construct the matrices this way
system_matrix.clear();
system_precon.clear();
BlockDynamicSparsityPattern dsp(2, 2);
dsp.block(0,0).reinit (n_u, n_u);
dsp.block(0,1).reinit (n_u, n_p);
dsp.block(1,0).reinit (n_p, n_u);
dsp.block(1,1).reinit (n_p, n_p);
dsp.collect_sizes();
DoFTools::make_sparsity_pattern(dof_handler, dsp,
constraints, true);
SparsityTools::distribute_sparsity_pattern (dsp,
dof_handler.locally_owned_dofs_per_processor(),
mpi_communicator,
locally_relevant_dofs);
system_matrix.reinit(dsp);
system_precon.reinit(dsp);
locally_relevant_solution.reinit (owned_partitioning,
relevant_partitioning,
mpi_communicator);
system_rhs.reinit (owned_partitioning,
mpi_communicator);
Next I assemble the matrices and use "constraint object" to distribute local to
global as follows
cell->get_dof_indices (local_dof_indices);
constraints.distribute_local_to_global(cell_matrix, cell_rhs,
local_dof_indices,
system_matrix,
system_rhs);
constraints.distribute_local_to_global(cell_precond,
local_dof_indices,
system_precon);
However at these two last lines the excution crashes with the message
*You are trying an operation on a vector that is only allowed if the vector has
no ghost elements, but the vector you are operating on does have ghost
elements. Specifically, vectors with ghost elements are read-only and cannot
appear in operations that write into these vectors.*
why is this happening. I am not creating the system_rhs with ghost elements.
Any help is appriciated. Thank you.
Best,
Ashkan
--
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].
For more options, visit https://groups.google.com/d/optout.