mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Apply suggestions from @paulromano
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
7eeb9ffa89
commit
41a7f5453e
2 changed files with 3 additions and 3 deletions
|
|
@ -730,7 +730,7 @@ class MeshFilter(Filter):
|
|||
def __init__(self, mesh, filter_id=None, translation=None):
|
||||
self.mesh = mesh
|
||||
self.id = filter_id
|
||||
self._translation = translation
|
||||
self.translation = translation
|
||||
|
||||
def __hash__(self):
|
||||
string = type(self).__name__ + '\n'
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ openmc_mesh_filter_get_translation(int32_t index, double translation[3])
|
|||
}
|
||||
|
||||
// Get translation from the mesh filter and set value
|
||||
auto mesh_filter = static_cast<MeshFilter*>(filter.get());
|
||||
auto mesh_filter = dynamic_cast<MeshFilter*>(filter.get());
|
||||
const auto& t = mesh_filter->translation();
|
||||
for (int i = 0; i < 3; i++) { translation[i] = t[i]; }
|
||||
|
||||
|
|
@ -202,4 +202,4 @@ openmc_mesh_filter_set_translation(int32_t index, double translation[3])
|
|||
return 0;
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
} // namespace openmc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue