mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Make creation of spatial trees based on usage for unstructured mesh. (#2815)
This commit is contained in:
parent
63916067ee
commit
4fa3fbcb19
3 changed files with 14 additions and 0 deletions
|
|
@ -2057,6 +2057,13 @@ void MOABMesh::initialize()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MOABMesh::prepare_for_tallies()
|
||||
{
|
||||
// if the KDTree has already been constructed, do nothing
|
||||
if (kdtree_)
|
||||
return;
|
||||
|
||||
// build acceleration data structures
|
||||
compute_barycentric_data(ehs_);
|
||||
|
|
|
|||
|
|
@ -77,8 +77,10 @@ std::string MeshFilter::text_label(int bin) const
|
|||
|
||||
void MeshFilter::set_mesh(int32_t mesh)
|
||||
{
|
||||
// perform any additional perparation for mesh tallies here
|
||||
mesh_ = mesh;
|
||||
n_bins_ = model::meshes[mesh_]->n_bins();
|
||||
model::meshes[mesh_]->prepare_for_tallies();
|
||||
}
|
||||
|
||||
void MeshFilter::set_translation(const Position& translation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue