jax_sn.variance_reduction.fw_cadis module¶
- fw_cadis_scalar_flux(operator: MultiGroupOperator, rhs: RightHandSide, solver: AbstractLinearSolver)[source]¶
Runs the FW-CADIS algorithm to compute an importance map for variance reduction.
First the forward problem is solved to obtain the scalar flux:
\[\phi = A^{-1} q\]where \(A\) is the multi-group operator and \(q\) is the right-hand side.
Then, the importance map is computed as:
\[\phi^\dagger = (A^\dagger)^{-1} \left( \frac{1}{\phi} \right)\]where \(A^\dagger\) is the continuous adjoint (see
solve_continuous_adjoint()).For stability purposes, the scalar flux is first averaged over each element (due to the conservation property of DG, this cannot be zero, while the value at a particular basis function node can be extremely small and blow up).
- Parameters:
operator (
MultiGroupOperator) – The multi-group operator for which to compute the importance map.rhs (
RightHandSide) – The right-hand side of the equation to solve, typically representing a response function.solver (
AbstractLinearSolver) – The (iterative) linear solver used for both the forward and adjoint solves.
- Returns:
The adjoint scalar flux importance map, shape
[n_groups, n_moments, n_elements, n_basis].- Return type:
Array