mcdc.MeshStructured#
- class mcdc.MeshStructured(name: str = '', x: Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] = array([-1.e+10, 1.e+10]), y: Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] = array([-1.e+10, 1.e+10]), z: Sequence[float] | ndarray[tuple[Any, ...], dtype[float64]] = array([-1.e+10, 1.e+10]))#
Structured spatial bins for simulation tallies and transport techniques.
- Parameters:
name (str, optional) – User-facing mesh name.
x (sequence of float, optional) – Strictly ordered grid boundaries in cm. Each omitted axis defaults to one effectively unbounded bin.
y (sequence of float, optional) – Strictly ordered grid boundaries in cm. Each omitted axis defaults to one effectively unbounded bin.
z (sequence of float, optional) – Strictly ordered grid boundaries in cm. Each omitted axis defaults to one effectively unbounded bin.
Examples
Create nonuniform bins along z:
>>> import mcdc >>> mesh = mcdc.MeshStructured(z=[0.0, 0.5, 2.0, 10.0])
Create a two-dimensional mesh from explicit boundaries:
>>> mesh_xy = mcdc.MeshStructured( ... x=[-2.0, -1.0, 0.0, 2.0], ... y=[-3.0, 0.0, 1.0, 3.0], ... )
Mix uniformly generated and explicitly listed boundaries:
>>> import numpy as np >>> mesh_xyz = mcdc.MeshStructured( ... x=np.linspace(-5.0, 5.0, 21), ... y=[-1.0, 0.0, 1.0], ... z=np.linspace(0.0, 10.0, 101), ... )