Hello,

I am using parallel::shared::Triangulation and 
TrilinosWrappers::MPI::Vector. It seems the refine_mesh procedure in Step 
-18 cannot be directly transferred to Trilinos... Is there any tutorials on 
this object? I appreciate if anyone can tell me some references...

Meanwhile, there is something I don't understand...

IndexSet global_active_cells(this->tria.n_active_cells());

global_active_cells.add_range(0, this->tria.n_active_cells());

IndexSet local_active_cells(this->tria.n_active_cells());

local_active_cells.clear();

int count = 0;

for(auto cell = this->tria.begin_active(); cell != this->tria.end(); ++cell
){

    if(cell->is_locally_owned()){

         local_active_cells.add_index(cell->active_cell_index());

         count ++;

     }

}

TrilinosWrappers::MPI::Vector distributed_error_per_cell(local_active_cells, 
global_active_cells, this->mpi_communicator);

std::cout<<"Process No. "<<Utilities::MPI::this_mpi_process(this->
mpi_communicator) << " ; added "<<count<<" local active cells."<<std::endl;

std::cout<<"Process No. "<<Utilities::MPI::this_mpi_process(this->
mpi_communicator) <<" ; Global size = " << distributed_error_per_cell.size
()<<std::endl;

std::cout<<"Process No. "<<Utilities::MPI::this_mpi_process(this->
mpi_communicator) <<" ; Local size = " << distributed_error_per_cell.
local_size()<<std::endl;

and the output is

Process No. 0 ; added 129 local active cells.

Process No. 1 ; added 127 local active cells.

Process No. 0 ; Global size = 256

Process No. 0 ; Local size = 256

Process No. 1 ; Global size = 256

Process No. 1 ; Local size = 256

Should the local size be equal to the local active cells? why is it equal 
to the global size? In this sense, all the vectors I initialize as 
TrilinosWrappers::MPI::Vector vec(locally_owned_dofs, locally_relevant_dofs, 
this->mpi_communicator);
will have the size of the global dofs, given that I am using 
parallel::shared::Triangulation. looks weird....

Best,
Yiyang

-- 
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.

Reply via email to