13 std::vector<int64_t>& nodal_nnz_off_diag,
16 unsigned int num_uk = unknown_manager.
unknowns_.size();
20 nodal_nnz_in_diag.clear();
21 nodal_nnz_off_diag.clear();
25 nodal_nnz_in_diag.resize(num_local_cells * N, 0.0);
26 nodal_nnz_off_diag.resize(num_local_cells * N, 0.0);
28 for (
int uk = 0; uk < num_uk; ++uk)
30 const unsigned int num_comps =
31 unknown_manager.
unknowns_[uk].num_components_;
32 for (
int comp = 0; comp < num_comps; ++comp)
36 const int64_t i =
MapDOFLocal(cell, 0, unknown_manager, uk, comp);
38 nodal_nnz_in_diag[i] += 1;
40 for (
auto& face : cell.faces_)
42 if (not face.has_neighbor_)
continue;
44 if (face.IsNeighborLocal(
ref_grid_)) nodal_nnz_in_diag[i] += 1;
46 nodal_nnz_off_diag[i] += 1;
const chi_mesh::MeshContinuum & ref_grid_
std::vector< Unknown > unknowns_
unsigned int GetTotalUnknownStructureSize() const
void BuildSparsityPattern(std::vector< int64_t > &nodal_nnz_in_diag, std::vector< int64_t > &nodal_nnz_off_diag, const UnknownManager &unknown_manager) const override
int64_t MapDOFLocal(const chi_mesh::Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const override
LocalCellHandler local_cells