mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Addressing comments from @paulromano
This commit is contained in:
parent
25ab9d28ce
commit
4564607eff
3 changed files with 18 additions and 9 deletions
|
|
@ -80,8 +80,10 @@ The current version of the statepoint file format is 17.0.
|
|||
dimension.
|
||||
- **Unstructured Mesh Only:**
|
||||
- **volumes** (*double[]*) -- Volume of each mesh cell.
|
||||
- **centroids** (*double[]*) -- Location of the mesh cell
|
||||
centroids.
|
||||
- **vertices** (*double[]*) -- Location of the mesh vertices.
|
||||
- **connectivity** (*int[]*) -- Connectivity array for the mesh
|
||||
cells.
|
||||
- **element_types** (*int[]*) -- Mesh element types.
|
||||
|
||||
**/tallies/filters/**
|
||||
|
||||
|
|
|
|||
|
|
@ -1477,7 +1477,7 @@ class UnstructuredMesh(MeshBase):
|
|||
|
||||
.. versionadded:: 0.13
|
||||
|
||||
connectivity : np.ndarray (8, n_elements)
|
||||
connectivity : np.ndarray (n_elements, 8)
|
||||
Connectivity of the elements
|
||||
|
||||
.. versionadded:: 0.13
|
||||
|
|
@ -1633,6 +1633,17 @@ class UnstructuredMesh(MeshBase):
|
|||
|
||||
def centroid(self, bin):
|
||||
"""Return the vertex averaged centroid of an element
|
||||
|
||||
Parameters
|
||||
----------
|
||||
bin : int
|
||||
Bin ID for the returned centroid
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray
|
||||
x, y, z values of the element centroid
|
||||
|
||||
"""
|
||||
conn = self.connectivity[bin]
|
||||
coords = self.vertices[conn]
|
||||
|
|
@ -1749,11 +1760,7 @@ class UnstructuredMesh(MeshBase):
|
|||
arr.SetTuple1(i, data.flat[i])
|
||||
grid.GetCellData().AddArray(arr)
|
||||
|
||||
if vtk.VTK_MAJOR_VERSION == 5:
|
||||
grid.update()
|
||||
writer.SetInput(grid)
|
||||
else:
|
||||
writer.SetInputData(grid)
|
||||
writer.SetInputData(grid)
|
||||
|
||||
writer.Write()
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ void UnstructuredMesh::to_hdf5(hid_t group) const
|
|||
} else {
|
||||
num_elem_skipped++;
|
||||
xt::view(elem_types, i, xt::all()) = static_cast<int>(ElementType::UNSUPPORTED);
|
||||
xt::view(connectivity, i, xt::all()) = xt::xarray<int>({-1, -1, -1, -1, -1, -1, -1, -1});
|
||||
xt::view(connectivity, i, xt::all()) = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue