MomentGauge.Models.Moment35P2
Contents
MomentGauge.Models.Moment35P2
#
Module Contents#
Classes#
The exponential family distribution model for M35P2 gauged statistics. |
|
The exponential family distribution model using the canonical form for M35 gauged statistics. |
Attributes#
- class MomentGauge.Models.Moment35P2.M35_P2_Gauged_Legendre_1D(constant)#
Bases:
MomentGauge.Models.ExpFamilyBase.GaugedExpFamilyModel
,MomentGauge.Models.ExpFamilyBase.BaseExpFamilyModel
The exponential family distribution model for M35P2 gauged statistics.
The gauged statistics are defined in
MomentGauge.Statistic.PolyGaugedStatistics.M35_1D_gauged_stats
.- Parameters:
constant (dict) –
dictionary with the following keys
’m’ : float - the mass of particle considered
’kB’ : float - the Boltzmann constant
’n_x’ : int - the order of Gauss Legendre quadrature in x dimension. Required by
MomentGauge.Sampler.QuadratureSampler.Gauss_Legendre_Sampler_Polar3D
’n_r’ : int - the order of Gauss Legendre quadrature in r dimension.
’B_x’ : int - how many blocks are splitted in the x dimension for Gauss Legendre quadrature.
’B_r’ : int - how many blocks are splitted in the r dimension for Gauss Legendre quadrature.
’alpha’: float - the initial step size used in backtracking line search, default = 1. Required by
MomentGauge.Optim.NewtonOptimizer.Newton_Optimizer
’beta’: float - the decreasing factor of the step size used in backtracking line search, default = 0.5
’c’: float - the parameter used in the Armijo’s condiiton, must lies in (0,1), default = 5e-4
’atol’: float - the absolute error tolerance of the Armijo’s condiiton since we use -(atol + rtol*abs(next_value)) instead of 0 to handle single precision numerical error. default = 5e-6.
’rtol’: float - the relative error tolerance of the Armijo’s condition since we use -(atol + rtol*abs(next_value)) instead of 0 to handle single precision numerical error. default = 1e-5.
’max_iter’: int - the maximal iteration allowed for the Netwon’s method, default = 100
’max_back_tracking_iter’: int - the maximal iteration allowed for the backtracking line search, default = 25
’tol’: float - the tolerance for residual, below which the optimization stops.
’min_step_size’: float - the minimum step size given by back tracking, below which the optimization stops, default = 1e-6.
’reg_hessian’: bool - Regularize the Hessian if the Cholesky decomposition failed. Default = True
’debug’: bool - print debug information if True.
- m#
the mass of particle considered
- Type:
float
- kB#
the Boltzmann constant
- Type:
float
- constant#
dictionary with the keys containing ‘m’ and ‘kB’
- Type:
dict
- suff_statistics(u, gauge_paras)#
Compute the value of sufficient statistics at certain \(\mathbf{u}\)
- Parameters:
u (float array of shape (3)) – The 3D sample vector
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
- Returns:
The array \(\{ \phi_0(\mathbf{u}), \phi_1(\mathbf{u}), \phi_2(\mathbf{u}) \}\)
- Return type:
float array of shape (3)
- natural_paras_to_moments(betas, gauge_paras, domain)#
Compute the moments of sufficient statistics given natural parameters`
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
The array \(\{ M_0, \cdots, M_M \}\)
- Return type:
float array of shape (11)
- moments_to_natural_paras(betas_ini, moments, gauge_paras, domain)#
Compute the natural parameters \(\boldsymbol{\beta}\) from the moments of sufficient statistics.
- Parameters:
betas_ini (float array of shape (11)) – A set of proposed natural parameter \(\boldsymbol{\beta}\)
moments (float array of shape (11)) – the target moments that we expect exponential familty with the natural parameter \(\boldsymbol{\beta}\) to have.
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
A tuple containing
beta: float array of shape (11) - The natural parameters \(\boldsymbol{\beta}\)
opt_info: tuple - A tuple containing other information of the optimization process
values: float - the optimal value of target_function.
residuals: float - the residual of the optimization.
step: float - the total number of Newton’s step iteration.
bsteps: float - the total number of Backtracking step.
- Return type:
Tuple
- natural_paras_to_custom_moments(betas, gauge_paras, domain, statistics, stats_gauge_paras=())#
Compute the moments of custom statistics given natural parameters.
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
statistics (function) –
A float-valued or tensor-valued function \(\phi_{i_1,\cdots,i_k}\) ( u , \(*\) gauge_paras ) with
Parameters:
u : float array of shape (3) - The 3D sample vector \(\mathbf{u}\)
\(*\) gauge_paras : - Arbitrary many extra parameters such as \(\mathbf{g}\). The \(*\) refers to the unpacking operator in python.
Returns:
float or array of arbitrary shape \((d_1,\cdots,d_k)\) – the value of the statistic \(\phi_{i_1,\cdots,i_k}(\mathbf{u},\mathbf{g})\)
stats_gauge_paras (tuple) – A tuple ( para1, para2, … ) containing arbitrary many extra parameters the custom statistics function \(\phi_{i_1,\cdots,i_k}\) required. Defaut is (), an empty tuple.
- Returns:
The moment value \(M_{i_1,\cdots,i_k}(\mathbf{g})\)
- Return type:
float or array of arbitrary shape \((d_1,\cdots,d_k)\)
- moments_gauge_transformation(moments, gauge_para2, gauge_para1, domain)#
Gauge transformation for moments of sufficient statistics. The transformation is defined as
\begin{equation} M_i( s_r', s_x', w_x' )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) M_j(s_r, s_x, w_x); \quad i,j = 0, \cdots, 8 \end{equation}which is induced from the gauge transformation \(T_{ij}(\mathbf{g}',\mathbf{g})\) between sufficient statistics \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) such that
\begin{equation} \phi_i(\mathbf{u}, (s_r', s_x', w_x') )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) \phi_j(\mathbf{u}, (s_r, s_x, w_x)); \quad i,j = 0, \cdots, 8 \end{equation}with \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) is sufficient statistics parameterized by gauge parameters \((s_r, s_x, w_x)\).
- Parameters:
moments (float array of shape (11)) – the moments \(M_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_para2 (float array of shape (3)) – The array (\(s_r'\), \(s_x'\), \(w_x'\)).
gauge_para1 (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
the moments \(M_i(s_r', s_x', w_x')\) of sufficient statistics
- Return type:
float array of shape (M+1)
- natural_paras_gauge_transformation(betas, gauge_para2, gauge_para1, domain)#
Gauge transformation for natural parameters. The transformation is defined as
\begin{equation} \beta_i( s_r', s_x', w_x' )= T_{ij}^T(s_r, s_x, w_x,s_r', s_x', w_x') \beta_j(s_r, s_x, w_x); \quad i,j = 0, \cdots, 8 \end{equation}which is induced from the gauge transformation \(T_{ij}(\mathbf{g}',\mathbf{g})\) between sufficient statistics \(\phi_i(\mathbf{u},\mathbf{g})\) such that
\begin{equation} \phi_i(\mathbf{u}, (s_r', s_x', w_x') )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) \phi_j(\mathbf{u}, (s_r, s_x, w_x)); \quad i,j = 0, \cdots, 8 \end{equation}with \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) is sufficient statistics parameterized by gauge parameters \((s_r, s_x, w_x)\).
- Parameters:
betas (float array of shape (M+1)) – the moments \(\beta_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_para2 (float array of shape (3)) – The array (\(s_r'\), \(s_x'\), \(w_x'\)).
gauge_para1 (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
the moments \(\beta_i(s_r', s_x', w_x')\) of sufficient statistics
- Return type:
float array of shape (M+1)
- natural_paras_to_fluid_properties(betas, gauge_paras, domain)#
Compute the fluid properties including number density \(n\), density \(\rho\), flow velocities \(\mathbf{v} = \{v_\alpha, \alpha \in \{x,y,z\}\}\), temperature \(T\), pressure \(p\), stress \(\{\sigma_{\alpha \beta}, \alpha, \beta \in \{x,y,z\}\}\) and heat flux \(\{q_{\alpha}, \alpha \in \{x,y,z\}\}\).
\begin{equation} \begin{split} n &= \frac{\rho}{m}= \int f(\mathbf{u}) d^3 \mathbf{u} \\ v_\alpha &= \frac{1}{n}\int u_\alpha f(\mathbf{u}) d^3 \mathbf{u}\\ p &= n k_B T = \frac{1}{3} \int m c_\alpha c_\alpha f(\mathbf{u}) d^3 \mathbf{u} \\ \sigma_{\alpha\beta} &= \int m c_\alpha c_\beta f(\mathbf{u}) d^3 \mathbf{u} - p \delta_{\alpha\beta} \\ \epsilon &= \frac{3}{2} k_B T = \frac{1}{n}\int \frac{m}{2} \mathbf{c}^2 f(\mathbf{u}) d^3 \mathbf{u} \\ q_\alpha &= \int \frac{m}{2} c_\alpha \mathbf{c}^2 f(\mathbf{u}) d^3 \mathbf{u}; \quad \alpha, \beta \in \{x,y,z\} \end{split} \end{equation}in which \(m\) is the mass of gas molecule.
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
Array containing macroscopic quantities \(\{ \rho, n, v_x, v_y, v_z, T, p, \sigma_{xx}, \sigma_{xy}, \sigma_{xz}, \sigma_{yy}, \sigma_{yz}, \sigma_{zz}, q_x, q_y, q_z \}\)
- Return type:
float array of shape (16)
- standard_gauge_para_from_moments(moments, gauge_paras)#
the standard gauge parameters \(\mathbf{g}\) prefered among all possible gauges.
- Parameters:
moments (float array of shape (11)) – the moments \(M_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
- Returns:
The gauge parameters (\(s_r\), \(s_x\), \(w_x\)) in the Hermite gauge.
- Return type:
float array of shape (3)
- class MomentGauge.Models.Moment35P2.M35_P2_Gauged_Canonical_Legendre_1D(constant)#
Bases:
M35_P2_Gauged_Legendre_1D
,MomentGauge.Models.ExpFamilyBase.CanonicalExpFamilyModel
The exponential family distribution model using the canonical form for M35 gauged statistics.
The gauged statistics are defined in
MomentGauge.Statistic.PolyGaugedStatistics.M35_1D_gauged_stats
.- Parameters:
constant (dict) –
dictionary with the following keys
’m’ : float - the mass of particle considered
’kB’ : float - the Boltzmann constant
’n_x’ : int - the order of Gauss Legendre quadrature in x dimension. Required by
MomentGauge.Sampler.QuadratureSampler.Gauss_Legendre_Sampler_Polar3D
’n_r’ : int - the order of Gauss Legendre quadrature in r dimension.
’B_x’ : int - how many blocks are splitted in the x dimension for Gauss Legendre quadrature.
’B_r’ : int - how many blocks are splitted in the r dimension for Gauss Legendre quadrature.
’alpha’: float - the initial step size used in backtracking line search, default = 1. Required by
MomentGauge.Optim.NewtonOptimizer.Newton_Optimizer
’beta’: float - the decreasing factor of the step size used in backtracking line search, default = 0.5
’c’: float - the parameter used in the Armijo’s condiiton, must lies in (0,1), default = 5e-4
’atol’: float - the absolute error tolerance of the Armijo’s condiiton since we use -(atol + rtol*abs(next_value)) instead of 0 to handle single precision numerical error. default = 5e-6.
’rtol’: float - the relative error tolerance of the Armijo’s condition since we use -(atol + rtol*abs(next_value)) instead of 0 to handle single precision numerical error. default = 1e-5.
’max_iter’: int - the maximal iteration allowed for the Netwon’s method, default = 100
’max_back_tracking_iter’: int - the maximal iteration allowed for the backtracking line search, default = 25
’tol’: float - the tolerance for residual, below which the optimization stops.
’min_step_size’: float - the minimum step size given by back tracking, below which the optimization stops, default = 1e-6.
’reg_hessian’: bool - Regularize the Hessian if the Cholesky decomposition failed. Default = True
’debug’: bool - print debug information if True.
- m#
the mass of particle considered
- Type:
float
- kB#
the Boltzmann constant
- Type:
float
- constant#
dictionary with the keys containing ‘m’ and ‘kB’
- Type:
dict
- suff_statistics(u, gauge_paras)#
Compute the value of sufficient statistics at certain \(\mathbf{u}\)
- Parameters:
u (float array of shape (3)) – The 3D sample vector
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
- Returns:
The array \(\{ \phi_0(\mathbf{u}), \phi_1(\mathbf{u}), \phi_2(\mathbf{u}) \}\)
- Return type:
float array of shape (3)
- natural_paras_to_moments(betas, gauge_paras, domain)#
Compute the moments of sufficient statistics given natural parameters`
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
The array \(\{ M_0, \cdots, M_M \}\)
- Return type:
float array of shape (11)
- moments_to_natural_paras(betas_ini, moments, gauge_paras, domain)#
Compute the natural parameters \(\boldsymbol{\beta}\) from the moments of sufficient statistics.
- Parameters:
betas_ini (float array of shape (11)) – A set of proposed natural parameter \(\boldsymbol{\beta}\)
moments (float array of shape (11)) – the target moments that we expect exponential familty with the natural parameter \(\boldsymbol{\beta}\) to have.
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
A tuple containing
beta: float array of shape (11) - The natural parameters \(\boldsymbol{\beta}\)
opt_info: tuple - A tuple containing other information of the optimization process
values: float - the optimal value of target_function.
residuals: float - the residual of the optimization.
step: float - the total number of Newton’s step iteration.
bsteps: float - the total number of Backtracking step.
- Return type:
Tuple
- natural_paras_to_custom_moments(betas, gauge_paras, domain, statistics, stats_gauge_paras=())#
Compute the moments of custom statistics given natural parameters.
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
statistics (function) –
A float-valued or tensor-valued function \(\phi_{i_1,\cdots,i_k}\) ( u , \(*\) gauge_paras ) with
Parameters:
u : float array of shape (3) - The 3D sample vector \(\mathbf{u}\)
\(*\) gauge_paras : - Arbitrary many extra parameters such as \(\mathbf{g}\). The \(*\) refers to the unpacking operator in python.
Returns:
float or array of arbitrary shape \((d_1,\cdots,d_k)\) – the value of the statistic \(\phi_{i_1,\cdots,i_k}(\mathbf{u},\mathbf{g})\)
stats_gauge_paras (tuple) – A tuple ( para1, para2, … ) containing arbitrary many extra parameters the custom statistics function \(\phi_{i_1,\cdots,i_k}\) required. Defaut is (), an empty tuple.
- Returns:
The moment value \(M_{i_1,\cdots,i_k}(\mathbf{g})\)
- Return type:
float or array of arbitrary shape \((d_1,\cdots,d_k)\)
- moments_gauge_transformation(moments, gauge_para2, gauge_para1, domain)#
Gauge transformation for moments of sufficient statistics. The transformation is defined as
\begin{equation} M_i( s_r', s_x', w_x' )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) M_j(s_r, s_x, w_x); \quad i,j = 0, \cdots, 8 \end{equation}which is induced from the gauge transformation \(T_{ij}(\mathbf{g}',\mathbf{g})\) between sufficient statistics \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) such that
\begin{equation} \phi_i(\mathbf{u}, (s_r', s_x', w_x') )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) \phi_j(\mathbf{u}, (s_r, s_x, w_x)); \quad i,j = 0, \cdots, 8 \end{equation}with \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) is sufficient statistics parameterized by gauge parameters \((s_r, s_x, w_x)\).
- Parameters:
moments (float array of shape (11)) – the moments \(M_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_para2 (float array of shape (3)) – The array (\(s_r'\), \(s_x'\), \(w_x'\)).
gauge_para1 (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
the moments \(M_i(s_r', s_x', w_x')\) of sufficient statistics
- Return type:
float array of shape (M+1)
- natural_paras_gauge_transformation(betas, gauge_para2, gauge_para1, domain)#
Gauge transformation for natural parameters. The transformation is defined as
\begin{equation} \beta_i( s_r', s_x', w_x' )= T_{ij}^T(s_r, s_x, w_x,s_r', s_x', w_x') \beta_j(s_r, s_x, w_x); \quad i,j = 0, \cdots, 8 \end{equation}which is induced from the gauge transformation \(T_{ij}(\mathbf{g}',\mathbf{g})\) between sufficient statistics \(\phi_i(\mathbf{u},\mathbf{g})\) such that
\begin{equation} \phi_i(\mathbf{u}, (s_r', s_x', w_x') )= T_{ij}(s_r', s_x', w_x',s_r, s_x, w_x) \phi_j(\mathbf{u}, (s_r, s_x, w_x)); \quad i,j = 0, \cdots, 8 \end{equation}with \(\phi_i(\mathbf{u},(s_r, s_x, w_x))\) is sufficient statistics parameterized by gauge parameters \((s_r, s_x, w_x)\).
- Parameters:
betas (float array of shape (M+1)) – the moments \(\beta_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_para2 (float array of shape (3)) – The array (\(s_r'\), \(s_x'\), \(w_x'\)).
gauge_para1 (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
the moments \(\beta_i(s_r', s_x', w_x')\) of sufficient statistics
- Return type:
float array of shape (M+1)
- natural_paras_to_fluid_properties(betas, gauge_paras, domain)#
Compute the fluid properties including number density \(n\), density \(\rho\), flow velocities \(\mathbf{v} = \{v_\alpha, \alpha \in \{x,y,z\}\}\), temperature \(T\), pressure \(p\), stress \(\{\sigma_{\alpha \beta}, \alpha, \beta \in \{x,y,z\}\}\) and heat flux \(\{q_{\alpha}, \alpha \in \{x,y,z\}\}\).
\begin{equation} \begin{split} n &= \frac{\rho}{m}= \int f(\mathbf{u}) d^3 \mathbf{u} \\ v_\alpha &= \frac{1}{n}\int u_\alpha f(\mathbf{u}) d^3 \mathbf{u}\\ p &= n k_B T = \frac{1}{3} \int m c_\alpha c_\alpha f(\mathbf{u}) d^3 \mathbf{u} \\ \sigma_{\alpha\beta} &= \int m c_\alpha c_\beta f(\mathbf{u}) d^3 \mathbf{u} - p \delta_{\alpha\beta} \\ \epsilon &= \frac{3}{2} k_B T = \frac{1}{n}\int \frac{m}{2} \mathbf{c}^2 f(\mathbf{u}) d^3 \mathbf{u} \\ q_\alpha &= \int \frac{m}{2} c_\alpha \mathbf{c}^2 f(\mathbf{u}) d^3 \mathbf{u}; \quad \alpha, \beta \in \{x,y,z\} \end{split} \end{equation}in which \(m\) is the mass of gas molecule.
- Parameters:
betas (float array of shape (11)) – the natural parameter \(\boldsymbol{\beta}\) of the distribution
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
domain (float array of shape (3)) –
an array (a_x, b_x, b_r), in which
a_x : float - lower integration limit in x dimension for the Legendre quadrature
b_x : float - upper integration limit in x dimension for the Legendre quadrature
b_r : float - upper integration limit in r dimension for the Legendre quadrature
- Returns:
Array containing macroscopic quantities \(\{ \rho, n, v_x, v_y, v_z, T, p, \sigma_{xx}, \sigma_{xy}, \sigma_{xz}, \sigma_{yy}, \sigma_{yz}, \sigma_{zz}, q_x, q_y, q_z \}\)
- Return type:
float array of shape (16)
- standard_gauge_para_from_moments(moments, gauge_paras)#
the standard gauge parameters \(\mathbf{g}\) prefered among all possible gauges.
- Parameters:
moments (float array of shape (11)) – the moments \(M_i(s_r, s_x, w_x)\) of sufficient statistics
gauge_paras (float array of shape (3)) – The array (\(s_r\), \(s_x\), \(w_x\)).
- Returns:
The gauge parameters (\(s_r\), \(s_x\), \(w_x\)) in the Hermite gauge.
- Return type:
float array of shape (3)
- MomentGauge.Models.Moment35P2.constant#