15 size_t num_global_cells = 0;
18 for (
const auto& template_cell : template_grid.
local_cells)
22 throw std::logic_error(
"Extruder::ExtrudeCells: "
23 "Template cell error. Not of base type POLYGON");
27 const auto& v0 = template_cell.centroid_;
28 const auto& v1 = template_grid.
vertices[template_cell.vertex_ids_[0]];
29 const auto& v2 = template_grid.
vertices[template_cell.vertex_ids_[1]];
34 if (v01.Cross(v02).Dot(khat)<0.0)
35 throw std::logic_error(
"Extruder attempting to extrude a template"
36 " cell with a normal pointing downward. This"
37 " causes erratic behavior and needs to be"
44 bool has_local_scope =
HasLocalScope(template_cell, template_grid, iz);
55 cell->material_id_ = template_cell.material_id_;
void push_back(std::unique_ptr< chi_mesh::Cell > new_cell)
LocalCellHandler local_cells
chi_mesh::Vector3 ProjectCentroidToLevel(const chi_mesh::Vector3 ¢roid, size_t level)
bool HasLocalScope(const chi_mesh::Cell &template_cell, const chi_mesh::MeshContinuum &template_continuum, size_t z_level)
int GetCellKBAPartitionIDFromCentroid(chi_mesh::Vector3 ¢roid)
void ExtrudeCells(chi_mesh::MeshContinuum &template_grid, chi_mesh::MeshContinuum &grid)
std::unique_ptr< chi_mesh::Cell > MakeExtrudedCell(const chi_mesh::Cell &template_cell, const chi_mesh::MeshContinuum &grid, size_t z_level, uint64_t cell_global_id, int partition_id, size_t num_template_cells)
std::vector< double > vertex_layers_