MatlabTransportPack
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

Livolant Class Reference

Livolant acceleration for inner iterations. More...

Inheritance diagram for Livolant:
Inheritance graph
[legend]
Collaboration diagram for Livolant:
Collaboration graph
[legend]

List of all members.

Public Member Functions

function Livolant ()
 Class constructor.
function setup (in obj, in)
 Setup the solver.
function solve (in obj, in g)
 Solve the within-group problem.
function reset_convergence (in this, in max_iters, in tolerance)
 Solve the within-group problem.
function display_me (in this)

Protected Member Functions

function setup_base (in this, in)
 Setup the base solver.
function initialize_scatter (in this)
 Prebuild scattering matrix for each cell.
function build_scatter_source (in this, in g, in phi)
 Build the within-group scattering source.
function build_all_scatter_source (in this, in g, in phi)
 Build all the scattering sources.
function build_fixed_source (in this, in g)
 Build source for this group excluding within-group scatter.
function build_external_source (in this, in g)
function check_convergence (in this, in iteration, in flux_error)
function print_iteration (in this, in it, in e0, in e1, in e2)

Protected Attributes

Property d_input
 User input.
Property d_state
 State vectors.
Property d_boundary
 Boundary fluxes.
Property d_mesh
 Problem mesh (either Cartesian mesh or MOC tracking)
Property d_mat
 Materials definitions.
Property d_quadrature
 Angular mesh.
Property d_equation
 Spatial discretization.
Property d_sweeper
 Sweeper over the space-angle domain.
Property d_external_source
 User-defined external source.
Property d_fission_source
 Fission source, if used.
Property d_fixed_source
 Any source that remains "fixed" within the group solve.
Property d_scatter_source
 The within group scattering source.
Property d_sigma_s
 Scattering cross-section vector for faster source computation.
Property d_max_iters
Property d_tolerance
Property d_g
Property d_M
 Moments to discrete operator.

Private Member Functions

function accelerated_iterations (in obj, in g, in mu)
 Perform a few source iterations.
function source_iterations (in obj, in g)
 Perform a few source iterations.
function shuffle_index (in obj)
 Shuffle indices so that storage is reused.
function relaxation_factor (in obj, in e0, in e1)
 Compute the relaxation factor from two residual vectors.

Private Attributes

Property d_phi
 A three column vector of current, last, and penultimate fluxes.
Property d_2
 Column index of current flux.
Property d_1
 Column index of last flux.
Property d_0
 Column index of penultimate flux.
Property d_free_iters
 Number of free iterations.
Property d_accel_iters
 Number of acceleration iteration.

Detailed Description

Livolant acceleration for inner iterations.

Source iteration for a one-group transport equation is defined by the sequence

\[ \phi^{(l+1)} = \frac{1}{4\pi}\mathbf{D}\mathbf{T}^{-1}\mathbf{S} \phi^{(l)} + \mathbf{D} \mathbf{T}^{-1} Q \, . \]

Simplifying notation, we have

\[ \phi^{(l+1)} = \mathbf{H} \phi^{(l)} + q\, . \]

Livolant acceleration solves this via relaxation, or

\[ \phi^{(l+1)} = \phi^{(l)} + \mu R^{(l+1)}\, , \]

where $ \mu $ is a relaxation parameter and $R$ is the residual, defined as the difference between successive flux estimates.

Here, $ \mu $ is dynamically updated to minimize the residual. In other words, we choose $ \mu $ to minimize

\[ R^{(l+1)} = R^{(l)} + \mu \Big ( \mathbf{H} R^{(l)}-R^{(l)} \Big ) \, . \]

Doing so in a least-squares sense (i.e. via the $L_2 $ norm) yields

\[ \mu^{(l)} = -\frac{ (R^{(l)})^T (\mathbf{H} R^{(l)}-\mathbf{R}^{(l)}) } { || \mathbf{H} \mathbf{R}^{(l)}-\mathbf{R}^{(l)} ||^2_2 } \, . \]

The implementation is sketched as follows (which follows Hebert). Suppose we have three sequential flux estimates from regular source iterations,

\[ \Phi^{(0)} = \phi^{(l)} \, , \]

\[ \Phi^{(1)} = \mathbf{H} \Phi^{(0)} + q\, , \]

and

\[ \Phi^{(2)} = \mathbf{H} \Phi^{(1)} + q\, . \]

Using these, we define the first two residuals as

\[ e_0 = \Phi^{(1)} - \Phi^{(0)} = R^{(l)} \, . \]

\[ e_1 = \Phi^{(2)} - \Phi^{(1)} \, . \]

and

\[ \mu^{(l)} = -\frac{e^T_0(e_1-e_0) } { ||e_1 - e_0)||^2_2 } \, . \]

The accelerated estimate is

\[ \phi^{(l+1)} = \phi^{(l)} + \mu^{(l)} R^{(l)} \, . \]

We need three new successive estimates to reestimate $ \mu $. These are

\[ \tilde{\Phi}^{(0)} = \phi^{(l+1)} \, , \]

\[ \tilde{\Phi}^{(1)} = \mathbf{H} \tilde{\Phi}^{(0)} + q = \mu^{(l)} \Phi^{(2)} + (1-\mu^{(l)})\Phi^{(1)}\, , \]

and

\[ \tilde{\Phi}^{(2)} = \mathbf{H} \tilde{\Phi}^{(1)} + q\, . \]

Notice that the first two estimates require nothing new. Only the last iterate requires further application of the operators.

Hebert suggests doing three source (or "free") iterations, followed by three accelerated iterations for the sake of stability. What this means is that three source iterations are performed, resulting in an updated $ \mu $ at a cost of three sweeps. Then, the sequence of $\tilde{\Phi}$'s is performed three times, with each sequence resulting in a new $ \mu $ at a cost of a single sweep. Hence, the Livolant iteration costs little more than source iteration in computational expense and an extra flux-sized vector or two in storage depending on implementation.

The iteration limits are defaulted (to three each), but the user can change these. However, doing so may yield poor stability. In particular, negative values for $ \mu $ are problematic (and if found to be negative, the accelerated iterations are simply skipped with a warning.

Input parameters specific to Livolant:

Todo:
Livolant, like GMRES, seems to work poorly for reflected conditions. There probably is a proper "consistent" way to include these conditions, but I don't know it yet.

For other relevant parameters, see InnerIteration.

Reference: Hebert, A. Applied Reactor Physics. See pp. 147-148 and 345-347.

See also:
SourceIteration

Constructor & Destructor Documentation

function Livolant ( )

Class constructor.

Returns:
Instance of the SourceIteration class.

Member Function Documentation

function accelerated_iterations ( in  obj,
in  g,
in  mu 
) [private]

Perform a few source iterations.

Parameters:
gCurrent group.
muCurrent value of relaxation parameter.
Returns:
Norm of current flux residual.
function build_all_scatter_source ( in  this,
in  g,
in  phi 
) [protected, inherited]

Build all the scattering sources.

Parameters:
gGroup for this problem. (I.e. row in MG).
phiCurrent MG flux.
function build_external_source ( in  this,
in  g 
) [protected, inherited]
function build_fixed_source ( in  this,
in  g 
) [protected, inherited]

Build source for this group excluding within-group scatter.

Parameters:
gGroup for this problem.
function build_scatter_source ( in  this,
in  g,
in  phi 
) [protected, inherited]

Build the within-group scattering source.

Parameters:
gGroup for this problem.
phiCurrent group flux.
function check_convergence ( in  this,
in  iteration,
in  flux_error 
) [protected, inherited]
function display_me ( in  this) [inherited]
function initialize_scatter ( in  this) [protected, inherited]

Prebuild scattering matrix for each cell.

While not the most *memory* efficient, this saves *time* by eliminate lots of loops.

function print_iteration ( in  this,
in  it,
in  e0,
in  e1,
in  e2 
) [protected, inherited]
function relaxation_factor ( in  obj,
in  e0,
in  e1 
) [private]

Compute the relaxation factor from two residual vectors.

Parameters:
e0Previous residual.
e1Current residual.
Returns:
Relaxation factor, $ \mu $.
function reset_convergence ( in  this,
in  max_iters,
in  tolerance 
) [inherited]

Solve the within-group problem.

Parameters:
gGroup of the problem to be solved.
Returns:
Flux residual (L-inf norm) and iteration count. Reset convergence criteria. It can be useful to use a dynamically changing convergence criteria, especially for eigenproblems. For regular power iteration, it is wasteful to use tight tolerances on the inners when the source is not as tightly known.
Parameters:
max_itersMaximum number of iterations.
toleranceMaximum point-wise error in flux
function setup ( in  obj,
in   
)

Setup the solver.

Parameters:
inputInput database.
stateState vectors, etc.
boundaryBoundary fluxes.
meshProblem mesh.
matMaterial definitions.
quadratureAngular mesh..
external_sourceUser-defined external source.
fission_sourceFission source.
function setup_base ( in  this,
in   
) [protected, inherited]

Setup the base solver.

By keeping everything out of the constructor, we can avoid having to copy the signature for all derived classes, both in their definitions and whereever thisects are instantiated. However, derived classes have other setup issues that need to be done, and so this serves as a general setup function that must be called before other setup stuff.

Parameters:
inputInput database.
stateState vectors, etc.
boundaryBoundary fluxes.
meshProblem mesh.
matMaterial definitions.
quadratureAngular mesh..
external_sourceUser-defined external source.
fission_sourceFission source.
function shuffle_index ( in  obj) [private]

Shuffle indices so that storage is reused.

This is performed before and iteration so that the "2" flux can be written into.

function solve ( in  obj,
in  g 
)

Solve the within-group problem.

Parameters:
gGroup of the problem to be solved.
Returns:
Flux residual (L-inf norm) and iteration (sweep) count.
function source_iterations ( in  obj,
in  g 
) [private]

Perform a few source iterations.

Parameters:
gCurrent group.
Returns:
Relaxation parameter and norm of flux residual.

Member Data Documentation

Property d_0 [private]

Column index of penultimate flux.

Property d_1 [private]

Column index of last flux.

Property d_2 [private]

Column index of current flux.

Property d_accel_iters [private]

Number of acceleration iteration.

Property d_boundary [protected, inherited]

Boundary fluxes.

Property d_equation [protected, inherited]

Spatial discretization.

Property d_external_source [protected, inherited]

User-defined external source.

Property d_fission_source [protected, inherited]

Fission source, if used.

Property d_fixed_source [protected, inherited]

Any source that remains "fixed" within the group solve.

Property d_free_iters [private]

Number of free iterations.

Property d_g [protected, inherited]
Property d_input [protected, inherited]

User input.

Property d_M [protected, inherited]

Moments to discrete operator.

Property d_mat [protected, inherited]

Materials definitions.

Property d_max_iters [protected, inherited]
Property d_mesh [protected, inherited]

Problem mesh (either Cartesian mesh or MOC tracking)

Property d_phi [private]

A three column vector of current, last, and penultimate fluxes.

Property d_quadrature [protected, inherited]

Angular mesh.

Property d_scatter_source [protected, inherited]

The within group scattering source.

Property d_sigma_s [protected, inherited]

Scattering cross-section vector for faster source computation.

Property d_state [protected, inherited]

State vectors.

Property d_sweeper [protected, inherited]

Sweeper over the space-angle domain.

Property d_tolerance [protected, inherited]

The documentation for this class was generated from the following file: