MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / column_indices

Method column_indices

cpp/dolfinx/la/SparsityPattern.cpp:217–229  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

215}
216//-----------------------------------------------------------------------------
217std::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//-----------------------------------------------------------------------------
231int SparsityPattern::block_size(int dim) const { return _bs[dim]; }
232//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

local_rangeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected