Hello,
I am using parallel::shared::Triangulation, sometimes, but not always, I
will get the following very strange behaviour when doing refine_mesh.
This is the code.
int refine_count = 0;
int coarsen_count = 0;
for(auto cell = this->tria.begin_active(); cell != this->tria.end();
++cell){
if(cell->refine_flag_set()) refine_count++;
if(cell->coarsen_flag_set()) coarsen_count++;
}
std::cout<<"Process No.
"<<Utilities::MPI::this_mpi_process(this->mpi_communicator) <<". Refine
Count = "<<refine_count<<std::endl;
std::cout<<"Process No.
"<<Utilities::MPI::this_mpi_process(this->mpi_communicator) <<". Coarsen
Count = "<<coarsen_count<<std::endl;
SolutionTransfer<dim> sol_trans(this->dof_handler);
this->tria.prepare_coarsening_and_refinement();
sol_trans.prepare_for_coarsening_and_refinement(locally_relevant_sln);
std::cout<<"Process No.
"<<Utilities::MPI::this_mpi_process(this->mpi_communicator) <<".
Pre_refine, n_active_cells = "<<this->tria.n_active_cells()<<std::endl;
this->run_mesh_refinement();
std::cout<<"Process No.
"<<Utilities::MPI::this_mpi_process(this->mpi_communicator) <<".
Post_refine, n_active_cells = "<<this->tria.n_active_cells()<<std::endl;
and I have the following output:
Process No. 1. Refine Count = 6144
Process No. 1. Coarsen Count = 1442
Process No. 0. Refine Count = 6144
Process No. 0. Coarsen Count = 1442
Process No. 1. Pre_refine, n_active_cells = 43772
Process No. 0. Pre_refine, n_active_cells = 43772
Process No. 0. Post_refine, n_active_cells = 61367
Process No. 1. Post_refine, n_active_cells = 61364
I am running with 2 MPI processes. It looks very weird that both processes
have the same refine count and coarsen count, but end up with different
number of active cells.
Given a parallel::shared::Triangulation mesh, if the two processes have
different active cells, then the program cannot proceed...
--
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.