std::cout << col_index_ptr[i] << " ";
std::cout << std::endl << std::endl;
std::cout << "Matrix row has the following indices:" << std::endl;
- int n_indices, *indices;
- trilinos_sparsity_pattern().ExtractMyRowView(row_partitioner().LID(static_cast<TrilinosWrappers::types::int_type>(row)),
- n_indices,
- indices);
+ std::vector<TrilinosWrappers::types::int_type> indices;
+ const Epetra_CrsGraph* graph =
+ (nonlocal_matrix.get() != 0 &&
+ row_partitioner().MyGID(static_cast<TrilinosWrappers::types::int_type>(row)) == false) ?
+ &nonlocal_matrix->Graph() : &matrix->Graph();
+
+ indices.resize(graph->NumGlobalIndices(static_cast<TrilinosWrappers::types::int_type>(row)));
+ int n_indices = 0;
+ graph->ExtractGlobalRowCopy(static_cast<TrilinosWrappers::types::int_type>(row),
+ indices.size(), n_indices, &indices[0]);
+ AssertDimension(static_cast<unsigned int>(n_indices), indices.size());
+
for (TrilinosWrappers::types::int_type i=0; i<n_indices; ++i)
std::cout << indices[i] << " ";
std::cout << std::endl << std::endl;
||
(cell->neighbor(face)->subdomain_id() !=
cell->subdomain_id()))
- constraints.add_entries_local_to_global
- (dofs_on_other_cell, dofs_on_this_cell,
- sparsity, keep_constrained_dofs);
+ {
+ constraints.add_entries_local_to_global
+ (dofs_on_other_cell, dofs_on_this_cell,
+ sparsity, keep_constrained_dofs);
+ if (cell->neighbor(face)->active())
+ constraints.add_entries_local_to_global
+ (dofs_on_other_cell, dofs_on_other_cell,
+ sparsity, keep_constrained_dofs);
+ }
}
}
}