f4enix.input.ww_gvr.geometry.Geometry#
- class f4enix.input.ww_gvr.geometry.Geometry(header: WWHeader, coarse_vectors: Vectors, fine_vectors: Vectors)#
Bases:
objectClass that contains all the geometrical information and methods associated to a WW file, including a pyvista mesh.
- Parameters:
Methods
__init__(header, coarse_vectors, fine_vectors)Class that contains all the geometrical information and methods associated to a WW file, including a pyvista mesh.
export_as_vtk(file_path)Exports the grid as a VTK file.
fill_grid_array(array, name)Fills the grid with an array given in K, J, I order.
fill_grid_ratios(ratios_by_particle)Fills the grid with the ratios of the WW file.
fill_grid_values(values_by_particle)Fills the grid with the values of the WW file.
plot()Plots the grid with the values of the WW file in an interactive window
Attributes
Returns a Vectors object of the vectors in the b2 format of the WW file
coordinate_typeReturns the director 1 vector (axis) of the cylinder if the grid is cylindrical.
Returns the director 2 vector (radius) of the cylinder if the grid is cylindrical.
Returns the number of coarse intervals in the i direction
Returns the number of intervals in the i direction
Returns the number of coarse intervals in the j direction
Returns the number of intervals in the j direction
Returns the number of coarse intervals in the k direction
Returns the number of intervals in the k direction
originReturns a Vectors object (1D) with the coarse and fine vectors combined
- property b2_vectors: Vectors#
Returns a Vectors object of the vectors in the b2 format of the WW file
- property director_1: list[float] | None#
Returns the director 1 vector (axis) of the cylinder if the grid is cylindrical.
- property director_2: list[float] | None#
Returns the director 2 vector (radius) of the cylinder if the grid is cylindrical.
- export_as_vtk(file_path: Path) None#
Exports the grid as a VTK file.
- Parameters:
file_path (Path) – The path to create the VTK file.
- fill_grid_array(array: ndarray[Any, dtype[_ScalarType_co]], name: str) None#
Fills the grid with an array given in K, J, I order.
If the grid is cylindrical, it properly manages the theta dimension even if it was extended with _extend_theta_intervals from the meshgrids module.
- Parameters:
array (NDArray) – The array to fill the grid with.
name (str) – The name of the array, key.
- fill_grid_ratios(ratios_by_particle: dict[ParticleType, dict[float, ndarray]]) None#
Fills the grid with the ratios of the WW file.
- Parameters:
ratios_by_particle (ValuesByParticle) – The ratios of the WW file grouped by particle.
- Return type:
None
- fill_grid_values(values_by_particle: dict[ParticleType, dict[float, ndarray]]) None#
Fills the grid with the values of the WW file.
- Parameters:
values_by_particle (ValuesByParticle) – The values of the WW file grouped by particle.
- Return type:
None
- property i_coarse_ints: int#
Returns the number of coarse intervals in the i direction
- property i_ints: int#
Returns the number of intervals in the i direction
- property j_coarse_ints: int#
Returns the number of coarse intervals in the j direction
- property j_ints: int#
Returns the number of intervals in the j direction
- property k_coarse_ints: int#
Returns the number of coarse intervals in the k direction
- property k_ints: int#
Returns the number of intervals in the k direction
- plot() None#
Plots the grid with the values of the WW file in an interactive window