14 std::vector<int64_t>& nodal_nnz_in_diag,
15 std::vector<int64_t>& nodal_nnz_off_diag,
21 nodal_nnz_in_diag.clear();
22 nodal_nnz_off_diag.clear();
24 nodal_nnz_in_diag.resize(local_dof_count, 0);
25 nodal_nnz_off_diag.resize(local_dof_count, 0);
31 size_t num_nodes = cell_mapping.NumNodes();
34 for (
int i = 0; i < num_nodes; ++i)
37 nodal_nnz_in_diag[ir] +=
static_cast<int64_t
>(num_nodes);
41 for (
auto& face : cell.faces_)
43 if (face.has_neighbor_ and face.IsNeighborLocal(
ref_grid_))
48 for (
int i = 0; i < num_nodes; ++i)
51 nodal_nnz_in_diag[ir] +=
52 static_cast<int64_t
>(adj_cell_mapping.NumNodes());
66 for (
auto& face : cell.faces_)
68 if (face.has_neighbor_ and (not face.IsNeighborLocal(
ref_grid_)))
73 for (
int i = 0; i < cell_mapping.NumNodes(); ++i)
76 nodal_nnz_off_diag[ir] +=
77 static_cast<int64_t
>(adj_cell_mapping.NumNodes());
86 auto backup_nnz_in_diag = nodal_nnz_in_diag;
87 auto backup_nnz_off_diag = nodal_nnz_off_diag;
91 nodal_nnz_in_diag.clear();
92 nodal_nnz_off_diag.clear();
102 for (
int j = 0; j < N; ++j)
105 nodal_nnz_in_diag[ir] = backup_nnz_in_diag[i];
106 nodal_nnz_off_diag[ir] = backup_nnz_off_diag[i];
114 for (
int j = 0; j < N; ++j)
119 nodal_nnz_in_diag[ir] = backup_nnz_in_diag[i];
120 nodal_nnz_off_diag[ir] = backup_nnz_off_diag[i];
static chi::MPI_Info & mpi
const CellMapping & GetCellMapping(const chi_mesh::Cell &cell) const
uint64_t local_base_block_size_
const chi_mesh::MeshContinuum & ref_grid_
UnknownStorageType dof_storage_type_
unsigned int GetTotalUnknownStructureSize() const
std::vector< int64_t > cell_local_block_address_
void BuildSparsityPattern(std::vector< int64_t > &nodal_nnz_in_diag, std::vector< int64_t > &nodal_nnz_off_diag, const UnknownManager &unknown_manager) const override
LocalCellHandler local_cells