porereax.regions ================ .. py:module:: porereax.regions .. autoapi-nested-parse:: Module for defining regions in the simulation box. Attributes ---------- .. autoapisummary:: porereax.regions.entry Functions --------- .. autoapisummary:: porereax.regions.get_region_function porereax.regions.box_region porereax.regions.reservoir_region porereax.regions.pore_region porereax.regions.wall_region Module Contents --------------- .. py:data:: entry :value: 3 .. py:function:: get_region_function(region: str, box: numpy.typing.NDArray[numpy.float64], system_properties: dict | None = None) -> collections.abc.Callable[[numpy.typing.NDArray[numpy.float64]], numpy.typing.NDArray[numpy.bool_]] Retrieve the region function based on the provided region identifier. :param region: The region identifier defining the region. :type region: str :param box: Simulation box dimensions. :type box: np.ndarray :param system_properties: System properties for defining regions, if applicable. :type system_properties: dict or None :returns: A function that takes coordinates and returns a boolean mask. :rtype: callable .. py:function:: box_region(coords: numpy.typing.NDArray[numpy.float64]) -> numpy.typing.NDArray[numpy.bool_] Region function that includes all coordinates within the simulation box. :param coords: Array of coordinates to check. :type coords: np.ndarray :returns: Boolean mask indicating which coordinates are inside the box. :rtype: np.ndarray .. py:function:: reservoir_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict) -> numpy.typing.NDArray[numpy.bool_] Region function that defines a reservoir region outside the pore. :param coords: Array of coordinates to check. :type coords: np.ndarray :param system_properties: System properties containing pore range, center, and radius. :type system_properties: dict :returns: Boolean mask indicating which coordinates are within the reservoir region. :rtype: np.ndarray .. py:function:: pore_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict) -> numpy.typing.NDArray[numpy.bool_] Region function that defines a pore region inside the pore. :param coords: Array of coordinates to check. :type coords: np.ndarray :param system_properties: System properties containing pore range, center, and radius. :type system_properties: dict :returns: Boolean mask indicating which coordinates are within the pore region. :rtype: np.ndarray .. py:function:: wall_region(coords: numpy.typing.NDArray[numpy.float64], system_properties: dict, layer_thickness: float) -> numpy.typing.NDArray[numpy.bool_] Region function that defines a wall region around the pore. :param coords: Array of coordinates to check. :type coords: np.ndarray :param system_properties: System properties containing pore range, center, and radius. :type system_properties: dict :param layer_thickness: Thickness of the wall layer. :type layer_thickness: float :returns: Boolean mask indicating which coordinates are within the wall region. :rtype: np.ndarray