-----------------------------------------------------------------------------
| 215 | } |
| 216 | //----------------------------------------------------------------------------- |
| 217 | std::vector<std::int64_t> SparsityPattern::column_indices() const |
| 218 | { |
| 219 | if (_offsets.empty()) |
| 220 | throw std::runtime_error("Sparsity pattern has not been finalised."); |
| 221 | |
| 222 | std::array range = _index_maps[1]->local_range(); |
| 223 | const std::int32_t local_size = range[1] - range[0]; |
| 224 | const std::int32_t num_ghosts = _col_ghosts.size(); |
| 225 | std::vector<std::int64_t> global(local_size + num_ghosts); |
| 226 | std::iota(global.begin(), std::next(global.begin(), local_size), range[0]); |
| 227 | std::ranges::copy(_col_ghosts, global.begin() + local_size); |
| 228 | return global; |
| 229 | } |
| 230 | //----------------------------------------------------------------------------- |
| 231 | int SparsityPattern::block_size(int dim) const { return _bs[dim]; } |
| 232 | //----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected