22 <<
" VolumeMesherPredefinedUnpartitioned executing. Memory in use = "
33 int desired_process_count = Px*Py*Pz;
35 if (desired_process_count !=
Chi::mpi.process_count)
38 <<
"ERROR: Number of processors available ("
40 ") does not match amount of processors "
41 "required by partitioning parameters ("
42 << desired_process_count <<
").";
49 "nullptr encountered for unparitioned mesh");
56 std::vector<int64_t> cell_pids;
59 grid->GetBoundaryIDMap() =
umesh_ptr_->GetMeshOptions().boundary_id_map;
67 auto& vertex_subs =
umesh_ptr_->GetVertextCellSubscriptions();
68 size_t cell_globl_id = 0;
69 for (
auto raw_cell :
umesh_ptr_->GetRawCells())
73 auto cell =
MakeCell(*raw_cell, cell_globl_id,
74 cell_pids[cell_globl_id],
umesh_ptr_->GetVertices());
76 for (uint64_t vid : cell->vertex_ids_)
77 grid->vertices.Insert(vid,
umesh_ptr_->GetVertices()[vid]);
79 grid->cells.push_back(std::move(cell));
85 grid->SetGlobalVertexCount(
umesh_ptr_->GetVertices().size());
92 {umesh_ptr_->GetMeshOptions().ortho_Nx,
93 umesh_ptr_->GetMeshOptions().ortho_Ny,
94 umesh_ptr_->GetMeshOptions().ortho_Nz});
99 <<
"] amount of local cells="
100 << grid->local_cells.size();
102 size_t total_local_cells = grid->local_cells.size();
103 size_t total_global_cells = 0;
105 MPI_Allreduce(&total_local_cells,
108 MPI_UNSIGNED_LONG_LONG,
113 <<
"VolumeMesherPredefinedUnpartitioned: Cells created = "
114 << total_global_cells
#define ChiLogicalErrorIf(condition, message)
static chi::Timer program_timer
static void Exit(int error_code)
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 & process_count
Total number of processes.
const int & location_id
Current process rank.
std::string GetTimeString() const
static std::shared_ptr< MeshContinuum > New()
void SetContinuum(MeshContinuumPtr &grid)
void SetGridAttributes(MeshAttributes new_attribs, std::array< size_t, 3 > ortho_Nis={0, 0, 0})
VOLUME_MESHER_OPTIONS options
std::shared_ptr< const chi_mesh::UnpartitionedMesh > umesh_ptr_
static std::unique_ptr< chi_mesh::Cell > MakeCell(const chi_mesh::UnpartitionedMesh::LightWeightCell &raw_cell, uint64_t global_id, uint64_t partition_id, const std::vector< chi_mesh::Vector3 > &vertices)
static bool CellHasLocalScope(const chi_mesh::UnpartitionedMesh::LightWeightCell &lwcell, uint64_t cell_global_id, const std::vector< std::set< uint64_t > > &vertex_subscriptions, const std::vector< int64_t > &cell_partition_ids)
static std::vector< int64_t > KBA(const chi_mesh::UnpartitionedMesh &umesh)
PartitionType partition_type