Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

pymrm.ibm_recon.IBMNormalDerivative

Back to module page · Back to alphabetical overview

Signature

IBMNormalDerivative()

Summary

One-sided normal-derivative operators and diagnostics per IBM crossing.

Documentation

The outward normal derivative on each side of crossing k is

``q_side[k] = alpha_side[k] * c_gamma_side[k] + (D_side @ c_spatial)[k]``

with c_spatial the field on the spatial grid (flattened, C-order) and the outward per side sign convention described in the module docstring.

Attributes

Shape information

n_crossings : int Number of wall crossings (matches ibm.n_crossings). spatial_shape : tuple Spatial grid shape. shape : tuple Full field shape (spatial + non-spatial axes). axes : tuple of int Which axes of shape are spatial. ns_size : int Product of the non-spatial dimensions (1 when purely spatial). n_cells : int Total number of cells, prod(shape). n_spatial_cells : int Number of spatial cells, prod(spatial_shape). h_ref : ndarray, shape (ndim_spatial,) Median cell-centre spacing along each spatial axis (reference scale for the GFD weights).

Source

View on GitHub

class IBMNormalDerivative:
    """One-sided normal-derivative operators and diagnostics per IBM crossing.

    The outward normal derivative on each side of crossing ``k`` is

        ``q_side[k] = alpha_side[k] * c_gamma_side[k] + (D_side @ c_spatial)[k]``

    with ``c_spatial`` the field on the spatial grid (flattened, C-order) and
    the *outward per side* sign convention described in the module docstring.

    Attributes
    ----------
    normals : ndarray, shape (n_crossings, ndim_s)
        Unit normals, pointing from solid to fluid.
    alpha_out, alpha_in : ndarray, shape (n_crossings,)
        Weight of the one-sided interface value in ``q_side``.
    D_out, D_in : csr_array, shape (n_crossings, n_spatial_cells)
        Weights of the same-side cell values in ``q_side``.
    degree_out, degree_in : ndarray of int
        Polynomial degree actually used: 2 or 1 (GFD), 0 (two-point normal
        formula), -1 (degenerate axis-direction two-point fallback).
    n_stencil_out, n_stencil_in : ndarray of int
        Number of cell points in the stencil.
    radius_out, radius_in : ndarray
        Physical search radius of the accepted stencil.
    cond_out, cond_in : ndarray
        Conditioning of the GFD moment matrix (1 for two-point formulas).
    moment_residual_out, moment_residual_in : ndarray
        Max-norm residual of the polynomial moment conditions.
    weight_norm_out, weight_norm_in : ndarray
        ``h``-scaled 1-norm of the weights, O(1) for a healthy formula.
    unresolved_out, unresolved_in : ndarray of bool
        True where only the degenerate axis-direction fallback was possible.

    Shape information
    -----------------
    n_crossings : int
        Number of wall crossings (matches ``ibm.n_crossings``).
    spatial_shape : tuple
        Spatial grid shape.
    shape : tuple
        Full field shape (spatial + non-spatial axes).
    axes : tuple of int
        Which axes of ``shape`` are spatial.
    ns_size : int
        Product of the non-spatial dimensions (1 when purely spatial).
    n_cells : int
        Total number of cells, ``prod(shape)``.
    n_spatial_cells : int
        Number of spatial cells, ``prod(spatial_shape)``.
    h_ref : ndarray, shape (ndim_spatial,)
        Median cell-centre spacing along each spatial axis (reference scale
        for the GFD weights).
    """

    normals: np.ndarray

    alpha_out: np.ndarray
    alpha_in: np.ndarray
    D_out: csr_array
    D_in: csr_array

    degree_out: np.ndarray
    degree_in: np.ndarray
    n_stencil_out: np.ndarray
    n_stencil_in: np.ndarray
    radius_out: np.ndarray
    radius_in: np.ndarray
    cond_out: np.ndarray
    cond_in: np.ndarray
    moment_residual_out: np.ndarray
    moment_residual_in: np.ndarray
    weight_norm_out: np.ndarray
    weight_norm_in: np.ndarray
    unresolved_out: np.ndarray
    unresolved_in: np.ndarray

    n_crossings: int
    spatial_shape: tuple
    shape: tuple
    axes: tuple
    ns_size: int
    n_cells: int
    n_spatial_cells: int
    h_ref: np.ndarray

Members

D_in

View source on GitHub

D_out

View source on GitHub

alpha_in

View source on GitHub

alpha_out

View source on GitHub

axes

View source on GitHub

cond_in

View source on GitHub

cond_out

View source on GitHub

degree_in

View source on GitHub

degree_out

View source on GitHub

h_ref

View source on GitHub

moment_residual_in

View source on GitHub

moment_residual_out

View source on GitHub

n_cells

View source on GitHub

n_crossings

View source on GitHub

n_spatial_cells

View source on GitHub

n_stencil_in

View source on GitHub

n_stencil_out

View source on GitHub

normals

View source on GitHub

ns_size

View source on GitHub

radius_in

View source on GitHub

radius_out

View source on GitHub

shape

View source on GitHub

spatial_shape

View source on GitHub

unresolved_in

View source on GitHub

unresolved_out

View source on GitHub

weight_norm_in

View source on GitHub

weight_norm_out

View source on GitHub