35 : communicator_(comm) {
40 : communicator_(PETSC_COMM_WORLD) {
41 resize(local_size, ghost_idx);
52 data_ptr_ = std::make_shared< std::vector<double> >(local_size);
69 data_ptr_ = std::make_shared< std::vector<double> >(local_size + ghost_idx.size());
73 data_ptr_->resize(local_size + ghost_idx.size());
115 for(
unsigned int i=0; i<loc_indices.n_elem; i++){
116 unsigned int idx = loc_indices(i);
118 vec(i) = (*data_ptr_)[idx];
129 for(
unsigned int i=0; i<loc_indices.n_elem; i++){
130 unsigned int idx = loc_indices(i);
132 vec(i) = (*data_ptr_)[idx];
143 for(
unsigned int i=0; i<loc_indices.n_elem; i++){
144 unsigned int idx = loc_indices(i);
146 (*data_ptr_)[idx] = values(i);