35 size_t num_grps =
groups_.size();
39 <<
"LBS Number of phi unknowns: " << local_unknown_count;
53 size_t num_ang_unknowns =
62 size_t num_precursor_dofs =
85 size_t block_MG_counter = 0;
97 int mat_id = cell.material_id_;
100 double cell_volume = 0.0;
102 for (
size_t i = 0; i < num_nodes; ++i)
103 cell_volume += IntV_shapeI[i];
105 size_t cell_phi_address = block_MG_counter;
107 const size_t num_faces = cell.faces_.size();
108 std::vector<bool> face_local_flags(num_faces,
true);
109 std::vector<int> face_locality(num_faces,
Chi::mpi.location_id);
110 std::vector<const chi_mesh::Cell*> neighbor_cell_ptrs(num_faces,
nullptr);
111 bool cell_on_boundary =
false;
113 for (
auto& face : cell.faces_)
115 if (not face.has_neighbor_)
119 int boundary_id = -1;
120 if (n.
Dot(ihat) > 0.999) boundary_id = 0;
121 else if (n.
Dot(ihat) < -0.999)
123 else if (n.
Dot(jhat) > 0.999)
125 else if (n.
Dot(jhat) < -0.999)
127 else if (n.
Dot(khat) > 0.999)
129 else if (n.
Dot(khat) < -0.999)
132 if (boundary_id >= 0) face.neighbor_id_ = boundary_id;
133 cell_on_boundary =
true;
135 face_local_flags[f] =
false;
136 face_locality[f] = -1;
140 const int neighbor_partition = face.GetNeighborPartitionID(*
grid_ptr_);
142 face_locality[f] = neighbor_partition;
143 neighbor_cell_ptrs[f] = &
grid_ptr_->cells[face.neighbor_id_];
161 block_MG_counter += num_nodes * num_grps *
num_moments_;
169 for (
auto& cell :
grid_ptr_->local_cells)
172 cell_nodal_mapping.reserve(cell.faces_.size());
174 for (
auto& face : cell.faces_)
176 std::vector<short> face_node_mapping;
177 std::vector<short> cell_node_mapping;
180 if (face.has_neighbor_)
182 grid_ptr_->FindAssociatedVertices(face, face_node_mapping);
183 grid_ptr_->FindAssociatedCellVertices(face, cell_node_mapping);
184 ass_face = face.GetNeighborAssociatedFace(*
grid_ptr_);
187 cell_nodal_mapping.emplace_back(
188 ass_face, face_node_mapping, cell_node_mapping);
207 <<
"Done with parallel arrays. Process memory = "
static chi::MPI_Info & mpi
LogStream LogAllVerbose1()
LogStream Log(LOG_LVL level=LOG_0)
static double GetMemoryUsageInMB()
Get current memory usage in Megabytes.
const int & location_id
Current process rank.
unsigned int AddUnknown(UnknownType unk_type, unsigned int dimension=0)
std::vector< Unknown > unknowns_
static UnknownManager GetUnitaryUnknownManager()
std::vector< double > precursor_new_local_
std::vector< std::vector< double > > psi_new_local_
chi_mesh::MeshContinuumPtr grid_ptr_
std::shared_ptr< chi_math::SpatialDiscretization > discretization_
std::vector< lbs::CellLBSView > cell_transport_views_
std::vector< UnitCellMatrices > unit_cell_matrices_
GridFaceHistogramPtr grid_face_histogram_
std::vector< double > phi_new_local_
std::vector< LBSGroup > groups_
chi_math::UnknownManager flux_moments_uk_man_
size_t max_cell_dof_count_
std::vector< double > q_moments_local_
uint64_t glob_node_count_
void InitializeFieldFunctions()
std::vector< double > phi_old_local_
std::vector< CellFaceNodalMapping > grid_nodal_mappings_
std::vector< LBSGroupset > groupsets_
MPILocalCommSetPtr grid_local_comm_set_
virtual void InitializeParrays()
uint64_t local_node_count_
std::map< int, XSPtr > matid_to_xs_map_
void ReadRestartData(const std::string &folder_name, const std::string &file_base)
size_t max_precursors_per_material_
std::vector< FaceNodalMapping > CellFaceNodalMapping
Vector3 Dot(const chi_mesh::TensorRank2Dim3 &that) const
std::string read_restart_file_base
std::string read_restart_folder_name