ndiffusion.cell_volumes¶
- ndiffusion.cell_volumes(edges_x, geom=None, edges_y=None)[source]¶
Cell volumes, in the same order as the solver’s cells.
- Parameters:
edges_x (array-like or UnstructuredMesh2D) – Cell edges as passed to the solver. An unstructured mesh returns its cell areas (volume per unit depth), the same ones the solver uses.
geom (Geometry or Geometry2D) –
Geometry.Slab(the default for 1-D),CylinderorSphere;Geometry2D.XYorRZtogether with edges_y.edges_y (array-like, optional) – Second set of edges for a 2-D structured mesh. For RZ, edges_x is the axial z and edges_y the radius, as for the solvers.
- Returns:
(n_cells,). 2-D structured cell(i, j)is entryi * ny + j.- Return type: