\subsection{The {\tt EDI:} module}\label{sect:EDIData}

The \moc{EDI:} module supplies the main editing options to DRAGON. It can be
use to compute the reaction rates, average and condensed cross sections to store
this information on a file for further use. The calling specifications are:

\begin{DataStructure}{Structure \dstr{EDI:}}
\dusa{EDINAM} \moc{:=} \moc{EDI:} $[$ \dusa{EDINAM} $]$
\dusa{LIBNAM} $[$ \dusa{TRKNAM} \dusa{FLUNAM} $]$ \\
~~~~~$[$ \dusa{REFGEO} $[$ \dusa{MACROGEO} $]~]~[$ \dusa{REFPIJ} $]~[$ \dusa{SURFIL} $]$ \moc{::} \dstr{descedi}
\end{DataStructure}

\noindent
where
\begin{ListeDeDescription}{mmmmmmmm}

\item[\dusa{EDINAM}] {\tt character*12} name of the \dds{edition} data
structure ({\tt L\_EDIT} signature) where the edition results will be stored.

\item[\dusa{LIBNAM}] {\tt character*12} name of the read-only \dds{macrolib} or
\dds{microlib} data structure ({\tt L\_MACROLIB} or {\tt L\_LIBRARY} signature) that contains the
macroscopic cross sections (see \Sectand{MACData}{LIBData}).

\item[\dusa{TRKNAM}] {\tt character*12} name of the read-only \dds{tracking} data
structure ({\tt L\_TRACK} signature) containing the tracking (see \Sect{TRKData}). {\bf Note:} If data
structures \dusa{TRKNAM} and \dusa{FLUNAM} are not given, a flux is recovered from the \dds{macrolib}
present in \dusa{LIBNAM} and used to perform the editions.

\item[\dusa{FLUNAM}] {\tt character*12} name of the read-only \dds{fluxunk} data
structure ({\tt L\_FLUX} signature) containing a transport solution (see \Sect{FLUData}).

\item[\dusa{REFGEO}] {\tt character*12} optional name of the read-only reference \dds{geometry} data
structure ({\tt L\_GEOM} signature) that was used for the original flux calculation (see \Sect{GEOData}).

\item[\dusa{MACROGEO}] {\tt character*12} optional name of the read-only macro-\dds{geometry} data
structure ({\tt L\_GEOM} signature) that is saved in \dusa{EDINAM} and can be used in the homogenization
process or in the SPH equivalence procedure. In some cases the
module \moc{EDI:} can automatically build a macro-geometry, however it is always
possible to specify explicitly the macro-geometry to be saved in \dusa{EDINAM}.

\item[\dusa{REFPIJ}] {\tt character*12} optional name of the read-only \dds{asmpij} data
structure ({\tt L\_PIJ} signature) that was used for the reference flux calculation (see \Sect{ASMData}).
Compulsory if keyword \moc{ALBS} is used in \Sect{descedi}.

\item[\dusa{SURFIL}] \texttt{character*12} name of the read-only SALOME--formatted sequential {\sc ascii}
file used to store the surfacic elements of the geometry. This file is required if and only if the keyword \moc{G2S}
is set in data structure \dstr{descedi}.

\item[\dstr{descedi}] structure containing the input data to this module
(see \Sect{descedi}).

\end{ListeDeDescription}

\clearpage

\subsubsection{Data input for module {\tt EDI:}}\label{sect:descedi}

\begin{DataStructure}{Structure \dstr{descedi}}
$[$ \moc{EDIT} \dusa{iprint} $]$ \\
$[$ \moc{UPS} $]$ \\
$[$ \moc{MERG} $\{$ \moc{NONE} $|$ \moc{COMP} $|$ \moc{GEO} $|$ \moc{HMIX} $|$ \\
\hskip 0.8cm \moc{G2S} \dusa{nhom} $[[$ \moc{RECT} \dusa{xm} \dusa{xp} \dusa{ym} \dusa{yp} $]]~[[$ \moc{TRIA} \dusa{x1} \dusa{y1} \dusa{x2} \dusa{y2} \dusa{x3} \dusa{y3} $]]~[$ \moc{REMIX} (\dusa{imix2}(ii),ii=1,nhom) $]~|$ \\
\hskip 0.8cm \moc{CELL} $[~\{$ \moc{SYBIL} $|$ \moc{EXCELL} $|$ \moc{NXT} $|$ \moc{DEFAULT} $|$ \moc{UNFOLD} $\}~]~[$ \moc{REMIX} (\dusa{imix2}(ii),ii=1,nbmix2) $]~|$ \\
\hskip 0.8cm \moc{REGI} (\dusa{iregm}(ii),ii=1,nregio) $|$ \\
\hskip 0.8cm \moc{MIX} $[$ (\dusa{imixm}(ii),ii=1,nbmix) $]~\}$ $]$ \\
$[$ \moc{TAKE} $\{$ \\
\hskip 0.8cm \moc{REGI} (\dusa{iregt}(ii),ii=1,nregio) $|$ \\
\hskip 0.8cm \moc{MIX} (\dusa{imixt}(ii),ii=1,nbmix) $\}$ $]$  \\
$[$ $\{$ \moc{P0W} $|$ \moc{P1W\_L} $|$ \moc{P1W\_TO} $|$ \moc{PNW\_SP} $\}$ $]$ \\
$[$ \moc{COND} $[~\{$  \moc{NONE} $|$ ( \dusa{icond}(ii), ii=1,ngcond) $|$ ( \dusa{energy}(ii), ii=1,ngcond) $\}~]~]$\\
$[$ \moc{MICR} $[$ \moc{ALLX} $]~[$ \moc{ISOTXS} $[$ \moc{ASCII} $]~]$ $\{$ \moc{ALL} $|$ \moc{RES} $|$ 
  \dusa{nis} (\dusa{HISO}(i),i=1,\dusa{nis}) $\}$\\
\hskip 0.8cm $[$ \moc{REAC} \dusa{nreac} (\dusa{HREAC}(i),i=1,\dusa{nreac}) $]~]$\\
$[$ \moc{ACTI} $[$ \moc{ISOTXS} $[$ \moc{ASCII} $]~]$ $\{$ \moc{NONE} $|$ (\dusa{imixa}(ii),ii=1,nbmix) $]$ $\}$\\ 
$[$ \moc{SAVE} $[$ \moc{ON} $\{$ \dusa{DIRN} $|$ \dusa{idirn} $\}$ $]$ $]$ \\
$[$ \moc{PERT} $]$ \\
$[$ \moc{STAT} $\{$ \moc{ALL} $|$ \moc{RATE} $|$ \moc{FLUX} $|$ \moc{DELS} $\}$  
  $[$ \moc{REFE} $\{$ \dusa{DIRO} $|$ \dusa{idiro} $\}$$]$ $]$ \\
$[$ \moc{NOHF} $]~[$ \moc{NBAL} $]$ \\
$[$ \moc{MAXR} \dusa{maxpts} $]$ \\
$[~\{$ \moc{DIRE} $|$ \moc{PROD} $\}~]$ \\
$[$ \moc{MGEO} \dusa{MACGEO} $]$ \\
$[~\{$ \moc{NADF} $|$ \moc{ALBS} $|$ \moc{JOUT} $|$ \moc{ADFM} $|$\\
~~~~~~~$[[$ \moc{ADF} \dusa{TYPE} $\{$ \moc{REGI} (\dusa{ireg}(ii),ii=1,iimax) \moc{ENDR} $|$ \moc{MIX} (\dusa{imix}(ii),ii=1,iimax)  \moc{ENDM} $\}~]]~\}~]$ \\
$[$~\moc{LEAK}~\dusa{b2}~$]$
\end{DataStructure}

\noindent where

\begin{ListeDeDescription}{mmmmmmmm}

\item[\moc{EDIT}] keyword used to modify the print level \dusa{iprint}.

\item[\dusa{iprint}] index used to control the printing of this module. The
\dusa{iprint} parameter is important for adjusting the amount of data that is
printed by this calculation step:

\begin{itemize}

\item \dusa{iprint}=0 results in no output;

\item \dusa{iprint}=1 results in the average and integrated fluxes being printed
(floating default);

\item \dusa{iprint}=2 results in the reaction rates being printed; 

\item \dusa{iprint}=3 is identical to the previous option, but the condensed
and/or homogenized vectorial cross sections are also printed;

\item \dusa{iprint}=4 is identical to the previous option, but the  condensed
and/or homogenized transfer cross sections are also printed.

\end{itemize}

\item[\moc{UPS}] keyword to specify that the reaction rates and the condensed
and/or homogenized cross sections are corrected so as to eliminate
up-scattering. This option is useful for reactor analysis codes which cannot
take into account such cross sections.

\item[\moc{NONE}] keyword to deactivate the homogeneization or the condensation. 

\item[\moc{MERG}] keyword to specify that the neutron flux is to be
homogenized over specified regions or mixtures. 

\item[\moc{REGI}] keyword to specify that the homogenization of the neutron
flux will take place over the following regions. Here nregio$\le$\dusa{maxreg}
with \dusa{maxreg} the maximum number of regions for which solutions were
obtained.

\item[\dusa{iregm}] array of homogenized region numbers to which are
associated the old regions. In the editing routines a value of \dusa{iregm}=0
allows the corresponding region to be neglected. 

\item[\moc{MIX}] keyword to specify that the homogenization of the neutron
flux will take place over the following mixtures. Here
we must have nbmix$\le$\dusa{maxmix} where \dusa{maxmix} is the maximum number
of mixtures in the macroscopic cross section library.  

\item[\dusa{imixm}] array of homogenized region numbers to which are
associated the material mixtures. In the editing routines a value of
\dusa{imixm}=0 allows the corresponding isotopic mixtures to be neglected. For a mixture in this
library which is not used in the geometry one should insert a value of 0 for the
new region number associated with this mixture. This option is also useful to homogenize the cross-section data of the second-level mixtures by combining the first-level mixtures in
a two-level computational scheme for a PWR assembly. By default, if \moc{MIX} is set and
\dusa{imixm} is not set, \dusa{imixm(ii)}$=$\dusa{ii} is assumed.

\item[\moc{COMP}] keyword to specify that the a complete homogenization is to
take place. 

\item[\moc{GEO}] keyword to specify that a geometry equivalence procedure (equigeom) is to be used. Merging indices
are automatically computed by comparing the reference geometry \dusa{REFGEO} with the macro-geometry \dusa{MACROGEO}.
This capability is limited to EXCELL--type reference geometries.

\item[\moc{G2S}] keyword to specify that the homogenization will be based on the geometry definition available in the surfacic
file \dusa{SURFIL}.

\item[\dusa{nhom}] number of homogeneous nodes to be defined using \moc{RECT} and/or \moc{TRIA} data structures. Many homogeneous mixtures can be defined by
repeating the \moc{RECT} and/or \moc{TRIA} data structures.

\item[\moc{RECT}] keyword to specify a unique homogeneous mixture based on a rectangular node. 

\item[\dusa{xm}] lower limit of the homogeneous node alonx X--axis.

\item[\dusa{xp}] upper limit of the homogeneous node alonx X--axis.

\item[\dusa{ym}] lower limit of the homogeneous node alonx Y--axis.

\item[\dusa{yp}] upper limit of the homogeneous node alonx Y--axis.

\item[\moc{TRIA}] keyword to specify a unique homogeneous mixture based on a triangular node.

\item[\dusa{x1}] X--coordinate of the first corner.

\item[\dusa{y1}] Y--coordinate of the first corner.

\item[\dusa{x2}] X--coordinate of the second corner.

\item[\dusa{y2}] Y--coordinate of the second corner.

\item[\dusa{x3}] X--coordinate of the third corner.

\item[\dusa{y3}] Y--coordinate of the third corner.

\item[\moc{HMIX}] keyword to specify that the homogenization region will be selected using the information provided by the \moc{HMIX} option in the \moc{GEO:} module (see \Sect{descPP}). In this case, all the regions associated with a virtual homogenization mixture will be homogenized. If the virtual homogenization mixtures were not defined in the geometry, the real mixtures are used instead (see \moc{MIX} keyword in \Sect{descPP}). This option is valid only for \moc{NXT:} based \dds{tracking} data structure (this option uses the information stored on the reference \dds{TRKNAM} data structure).

\item[\moc{CELL}] keyword to specify that the a cell-by-cell homogenization
(with or without SPH equivalence) is to take place. The macro-geometry and the merging indices are automatically
computed and the macro-geometry named {\tt MACRO-GEOM} is created on the root directory of \dusa{EDINAM}. This
capability is limited to reference geometries previously tracked by EURYDICE (see \Sect{SYBILData}) or NXT (see 
\Sect{NXTData}).

\item[\moc{SYBIL}] the macro-geometry produced by \moc{CELL} is tracked by {\tt SYBILT:} module.

\item[\moc{EXCELL}] the macro-geometry produced by \moc{CELL} is tracked by {\tt EXCELT:} module.

\item[\moc{NXT}] the macro-geometry produced by \moc{CELL} is tracked by {\tt NXT:} module.

\item[\moc{DEFAULT}] the macro-geometry produced by \moc{CELL} is tracked by another module (default option).

\item[\moc{UNFOLD}] the macro-geometry produced by \moc{CELL} is unfolded and tracked with the \moc{DEFAULT} option. This option is
useful with fine power reconstruction techniques.

\item[\moc{REMIX}] the homogenization produced by option \moc{MERG} \moc{G2S} or \moc{MERG} \moc{CELL} (cell-by-cell) is further
homogenized according to \dusa{imix2} indices. This option is useful to integrate the assembly gap into the boundary cells. By default, one homogenized region is created
for each region of the macro-geometry.

\item[\dusa{imix2}] array of rehomogenized region numbers to which are associated the regions indices created {\sl after}
the \moc{MERG} \moc{G2S} or \moc{MERG} \moc{CELL} homogenization was performed. In the editing routines a value of \dusa{imix2}=0 allows the corresponding
region to be neglected. Here, nbmix2 is equal to the number of mixtures in the geometry before the \moc{REMIX} operation is performed (equal to the number
of cells in the macro-geometry if \moc{MERG} \moc{CELL} was set).

\item[\moc{TAKE}] keyword to specify that the neutron flux is to be edited
over specified regions or mixtures. 

\item[\moc{REGI}] keyword to specify that the editing of the neutron flux will
take place over the following regions. Here nregio$\le$\dusa{maxreg}
with \dusa{maxreg} the maximum number of regions for which solutions were
obtained.

\item[\dusa{iregt}] regions where the editing will take place. The new region
numbers associated with these editing regions are numbered sequentially.

\item[\moc{MIX}] keyword to specify that the editing of the neutron
flux will take place over the following mixtures. Here
we must have nbmix$\le$\dusa{maxmix} where \dusa{maxmix} is the maximum number
of mixtures in the macroscopic cross section library.  

\item[\dusa{imixt}] mixtures where the editing will take place.
Each mixture set here must exists in the reference geometry.

\item[\moc{P0W}] keyword to specify that the $P_\ell$, $\ell\ge 1$ information is to be
homogenized and condensed using the scalar flux. This is the default option.

\item[\moc{P1W\_L}] keyword to specify that the $P_\ell$, $\ell\ge 1$ information is to be
homogenized and condensed using a current recovered from a consistent $P_1$ or
from a consistent heterogeneous $B_1$ model.

\item[\moc{P1W\_TO}] keyword to specify that the $P_\ell$, $\ell\ge 1$ information is to be
homogenized and condensed using the Todorova flux\cite{todorova}, defined as
$$
\phi_1(\bff(r),E)={\phi(\bff(r),E)\over \Sigma_i(E)-\Sigma_{{\rm s1},i}(E)}
$$
\noindent where $\Sigma_i(E)$ and $\Sigma_{{\rm s1},i}(E)$ are the macroscopic total and $P_1$ scattering
cross sections in the mixture $i$ containing the point $\bff(r)$. This option is not recommended.

\item[\moc{PNW\_SP}] keyword to specify that the $P_\ell$, $\ell\ge 1$ information is to be
homogenized and condensed using a weighting spectra based on the APOLLO3 averaging formula\cite{condPn}, defined as
$$
\phi_\ell(\bff(r),E)={ \displaystyle\sum_{m=-\ell}^\ell \phi_\ell^m(\bff(r),E) \left<\phi_\ell^m\right>_{G,M} \over \displaystyle\sum_{m=-\ell}^\ell \left<\phi_\ell^m\right>_{G,M} }
$$
where $\phi_\ell^m(\bff(r),E)$ are the spherical harmonic $\ell$-th moment of the flux with $E \in G$ and $\bff(r) \in M$. Here, $G$ is the
condensed macrogroup and $M$ is the homogenized mixture.

\item[\moc{COND}] keyword to specify that a group condensation of the flux is
to be performed.

\item[\dusa{icond}] array of increasing energy group limits that will be associated with
each of the ngcond condensed groups. The final value of
\dusa{icond} will automatically be set to \dusa{ngroup} while the values of 
\dusa{icond}$>$\dusa{ngroup} will be droped from the condensation. 
We must have ngcond$\le$\dusa{ngroup}. By default, if \moc{COND} is set and \dusa{icond}
is not set, all energy groups are condensed together.

\item[\dusa{energy}] array of decreasing energy limits (in eV) that will be
associated with each of the ngcond condensed groups. We must have ngcond$\le$\dusa{ngroup+1}. 
Note that if an energy limit is located between two energy groups, the condensation
group will include this associated energy group. In the case where two energy
limits fall within the same energy group the lowest energy will be droped.
Finally the maximum and minimum energy limits can be skipped since they will be
taken automatically from the information available in the library.

\item[\moc{MICR}] keyword to specify that the condensation and homogenization
procedure will be used to associate microscopic cross sections to the isotopes
present in the homogenized regions. The macroscopic cross sections and the
diffusion coefficients are weighted by the multigroup fluxes appearing in the
regions where the isotopes are present. The resulting nuclear properties are
saved on \dusa{EDINAM} when the \moc{SAVE} keyword is present.

\item[\moc{ALLX}] keyword used to register the region number of each isotope before merging, in the 
embedded library. The homogeneized information is therefore registered for each isotope in the merging
region, as depicted by the formulas below. This procedure is useful to produce particular databases, 
in order to perform micro-depletion calculations in diffusion with DONJON.

\item[\moc{ALL}] keyword to specify that all the isotopes present in the
homogenized region are to be kept individual and processed.

\item[\moc{RES}] keyword to specify that all the isotopes present in the
homogenized region will be merged as a single residual isotope.

\item[\dusa{nis}] number of isotopes present in the homogenized
region to be processed.

\item[\dusa{HISO}] array of {\tt character*8} isotopes alias names to be processed.

\item[\moc{REAC}] keyword to specify the reaction names to be included in the output microlib. By default, all available reactions
are included in the output microlib.

\item[\dusa{nreac}] number of reactions to be included in the output microlib.

\item[\dusa{HREAC}] array of {\tt character*8} reaction names to be included in the output microlib.

\item[\moc{ACTI}] keyword to specify that microscopic activation
data will be edited for the isotopes associated with the specified mixture. This
information correspond to the microscopic cross section associated with each
isotope in a given macro-group and macro-region assuming a concentration
for this isotope of 1.0 $\times{\it cm}^{-3}$ in each region. This keyword is
followed by nacti material mixture indices, where
nacti$\le$\dusa{maxmix}.

\item[\moc{NONE}] keyword to specify that no isotope present in the
homogenized region is to be used as activation data.

\item[\dusa{imixa}] array of material mixture indices which contains the
isotopes for which activation data is to be generated.
\dusa{nmix}$\le$\dusa{maxmix}. Even mixture not used in the geometry 
can be considered here.

\item[\moc{ISOTXS}] keyword to specify that the set of microscopic cross
section generated by the \moc{MICR} and \moc{ACTI} command will also
be saved on a microscopic group neutron cross section library in the ISOTXS-IV
format. This will generate a file for each final region specified by the
\moc{TAKE} or \moc{MERG} keyword, numbered consecutively ({\tt IFILE}). The name
of the file ({\tt NISOTXS}) is built using the command 

\begin{verbatim}
WRITE(NISOTXS,'(A6,I6.6)') 'ISOTXS',IFILE
\end{verbatim}

\item[\moc{ASCII}] keyword to specify that the ISOTXS file is created in ascii format.
By  default, it is created in binary format.

\item[\moc{SAVE}] keyword to specify that the fluxes, the macroscopic and
microscopic cross sections and the volumes corresponding to homogenized regions
are to be saved on \dusa{EDINAM}. A \dds{macrolib} is store on a subdirectory
of \dds{edition}.

\item[\moc{ON}] keyword to specify on which directory of \dusa{EDINAM} this
information is to be stored.

\item[\dusa{DIRN}] name of the directory on which the above information is to
be stored.

\item[\dusa{idirn}] number associated with a directory of \dusa{EDINAM} on
which the above information is to be stored. To each number \dusa{idirn} is
associated a directory name \moc{CDIRN}={\tt 'REF-CASE'//CN} where {\tt CN} is a
{\tt character*4} variable defined by {\tt WRITE(CN,'(I4)')} \moc{idirn}.

\item[\moc{PERT}] keyword to specify that first order perturbations for 
the microscopic cross sections are to be saved on \dusa{EDINAM}. 

\item[\moc{STAT}] keyword to specify that a comparison between the current and
a reference set of reaction rates and/or integrated fluxes is to be performed. 

\item[\moc{ALL}] keyword to specify that the relative differences in the
reaction rates and the integrated fluxes are to be printed.

\item[\moc{RATE}] keyword to specify that the relative differences in the
reaction rates are to be printed.

\item[\moc{FLUX}] keyword to specify that the relative differences in the
integrated fluxes are to be printed. 

\item[\moc{DELS}] keyword to specify that the absolute differences in the
macroscopic cross section are to be printed.

\item[\moc{REFE}] keyword to specify the directory of \dusa{EDINAM} where the
reference data requires for the comparison is stored. When this keyword is
absent, the last reaction rates and integrated fluxes saved on \dusa{EDINAM} are
used.

\item[\dusa{DIRO}] name of the directory from which the reference information
is taken.

\item[\dusa{idiro}] number associated with an directory of \dusa{EDINAM} on
which the reference information is  stored. To each number \dusa{idirn} is
associated a the directory  \moc{CDIRN}={\tt 'REF-CASE'//CN} where {\tt CN} is a
{\tt character*4} variable defined by {\tt WRITE(CN,'(I4)')} \moc{idirn}. 

\item[\moc{NOHF}] keyword to suppress the calculation and edition of the H-factors (sum of all
the cross sections producing energy times the energy produced by each reaction).
Note that this calculation may be time-consuming. By default, the H-factors are
computed and edited if keyword \moc{DEPL} and associated data is set in module {\tt LIB:}.

\item[\moc{NBAL}] keyword to specify the editing of the four factors computed
from a group balance. In this case, the user must specify explicitly a three
group condensation.

\item[\moc{MAXR}] keyword to specify the number of components in
region-related dynamically allocated arrays. If the default value is
not sufficient, an error message is issued.

\item[\dusa{maxpts}] user-defined maximum number of components.

\item[\moc{DIRE}] use the direct flux to perform homogenization or/and
condensation (default value).

\item[\moc{PROD}] use the product of the direct and adjoint flux to perform homogenization or/and
condensation. This option is used only in specialized applications such as in the {\sc clio} perturbative
analysis formula.\cite{clio} The homogenization and condensation equations are presented in Sect.~\ref{sect:prod}.
{\bf Note:} The \dusa{FLUNAM} object must contain both an adjoint and a direct flux solution.

\item[\moc{MGEO}] keyword to define the name of the macro-geometry, which must appear among the RHS. The macro-geometry is recovered automatically
by interface modules such as \moc{COMPO:} (see \Sect{COMPOData}) or manually by a CLE-2000 statement such as
\begin{verbatim}
GEONAM := EDINAM :: STEP UP 'MACRO-GEOM' ;
\end{verbatim}
\noindent where {\tt GEONAM} and {\tt EDINAM} are {\tt L\_GEOM} and {\tt L\_EDIT} LCM objects, respectively.

\item[\dusa{MACGEO}] character*12 name of the macro-geometry.

\item[\moc{NADF}] keyword to desactivate boundary editions.

\item[\moc{ALBS}] keyword to specify that the boundary flux is to be obtained from relation
$\phi_{\rm surf}=4J_{\rm out}/S$ where $J_{\rm out}$ is the outgoing interface current. The albedo of
the geometry are to be taken into account in the complete homogenization process. Thus the \moc{MERG}
and \moc{COMP} options must be specified. The boundary fluxes are obtained from a calculation using the collision
probabilities. This option requires a geometry with \moc{VOID} (see \Sect{descBC}) external boundary conditions to
be closed using \moc{ALBS} in module \moc{ASM:} (see \Sect{descasm}).\cite{ALSB2}

\item[\moc{JOUT}] keyword to recover multigroup boundary current information ($J_{\rm out}$ and $J_{\rm in}$). This keyword
is only compatible with \moc{MCCGT:} or \moc{SYBILT:} trackings and if keyword \moc{ARM} is set in module \moc{ASM:}
(see \Sect{descasm}). The outgoing/ingoing interface currents are recovered by direct homogenization and condensation of the
flux unknown components corresponding to external boundary and used with the current iteration method in Eurydice or from a MOC
calculation. The boundary flux required by the SPH method is to be obtained from relation $\phi_{\rm surf}=4J_{\rm out}/S$ where
$J_{\rm out}$ is the outgoing interface current. The net boundary current is to be obtained from relation
$J_{\rm net}=J_{\rm out}-J_{\rm in}$.

\item[\moc{ADFM}] keyword to specify that the ADF information is recovered from macrolib in RHS object \dusa{LIBNAM}. ADF information can
be defined as explained in Sect.~\ref{sect:descxs} of module {\tt MAC:} and recovered in module {\tt EDI:} for further processing.

\item[\moc{ADF}] keyword to specify that boundary editions are required. Averaged fluxes are
computed over boundary regions.

\item[\dusa{TYPE}] {\tt character*4} name of the boundary edit corresponding to
regions \dusa{ireg} or mixtures \dusa{imix}. Any user-defined name can be used, but some
standard names are recognized by module \moc{SPH} (see \Sect{descsph}). Standard names are: $=$ \moc{FD\_C}:
corner flux edition; $=$ \moc{FD\_B}: surface (assembly gap) flux edition; $=$ \moc{FD\_H}:
row flux edition. These are the first row of surrounding cells in the assembly.

\item[\dusa{ireg}] index of a region of the reference geometry belonging to boundary edition.

\item[\dusa{imix}] index of a material mixture of the reference geometry belonging to boundary edition.

\item[\moc{LEAK}] keyword used to introduce leakage in the embedded {\sc macrolib}. This option should only be used for non-regression tests. The {\sc microlib} is not modified.

\item[\dusa{b2}] the imposed buckling corresponding to the leakage.

\end{ListeDeDescription}

\subsubsection{Homogenization and condensation with the flux}

The cross sections are homogenized over macro-volumes $V_{\rm merg}$ and condensed over
macro groups $E_{\rm merg}$. We also use $V_i$ to identify the subset of $V_{\rm merg}$ where
the isotope $i$ is defined. The module {\tt EDI:} produces the following homogenized/condensed information:

\begin{description}
\item[integrated volume:]
$$
\overline V=\int_{V_{\rm merg}} dV
$$

\item[macroscopic cross section of type $\bff(x)$:]
$$
\overline \Sigma_x = {\int_{V_{\rm merg}} dV \int_{E_{\rm merg}} dE \, \Sigma_x(\bff(r),E) \, \phi(\bff(r),E)
\over \int_{V_{\rm merg}} dV \int_{E_{\rm merg}} dE \, \phi(\bff(r),E)}
$$

\item[number density for isotope $\bff(i)$:]
$$
\overline N_i= {1\over \overline V} \int_{V_i} dV N_i(\bff(r))
$$
\noindent where $N_i(\bff(r))$ is the space-dependent number density of isotope $i$.

\item[neutron flux:]
$$
\overline\phi = {1\over \overline V} \, \int_{V_{\rm merg}} dV \int_{E_{\rm merg}} dE \, \phi(\bff(r),E)
$$

\item[microscopic cross section of type $\bff(x)$ for isotope $\bff(i)$:]
\begin{eqnarray*}
\overline \sigma_{x,i} \negthinspace\negthinspace &=& \negthinspace\negthinspace { 1 \over \overline N_i} \, {\int_{V_i} dV \int_{E_{\rm merg}} dE \, N_i(\bff(r)) \, \sigma_{x,i}(\bff(r),E) \, \phi(\bff(r),E)
\over \int_{V_{\rm merg}} dV \int_{E_{\rm merg}} dE \, \phi(\bff(r),E)} \\
&=& \negthinspace\negthinspace { 1 \over \overline N_i\, \overline\phi \, \overline V} \, \int_{V_i} dV \int_{E_{\rm merg}} dE \, N_i(\bff(r)) \, \sigma_{x,i}(\bff(r),E) \, \phi(\bff(r),E) \ \ .
\end{eqnarray*}
\end{description}

\subsubsection{Homogenization and condensation with the flux and adjoint flux}\label{sect:prod}

If the \moc{PROD} keyword is set in data structure \ref{sect:descedi}, the adjoint flux is introduced as a weighting function in the
homogenization and condensation formulas. In this case, the module {\tt EDI:} produces the following homogenized/condensed information:

\begin{description}

\item[adjoint neutron flux:]
$$
\overline\phi^* = {1\over \overline V} \, \int_{V_{\rm merg}} dV \int_{E_{\rm merg}} dE \, \phi^*(\bff(r),E)
$$

\item[microscopic transfer cross section for isotope $\bff(i)$:]
$$
\overline \sigma_{{\rm s},i} ={ 1 \over \overline N_i\, (\overline\phi^*)' \, \overline\phi \, \overline V} \, \int_{V_i} dV \int_{E'_{\rm merg}} dE' \,\int_{E_{\rm merg}} dE \, N_i(\bff(r)) \, \sigma_{{\rm s},i}(\bff(r),E' \leftarrow E) \, \phi^*(\bff(r),E') \, \phi(\bff(r),E)
$$
\noindent with
$$
(\overline\phi^*)' = {1\over \overline V} \, \int_{V_{\rm merg}} dV \int_{E'_{\rm merg}} dE' \, \phi^*(\bff(r),E')
$$

\item[microscopic cross section of type $\bff(x)\neq$ f for isotope $\bff(i)$:]
$$
\overline \sigma_{x,i} ={ 1 \over \overline N_i\, \overline\phi^* \, \overline\phi \, \overline V} \, \int_{V_i} dV \int_{E_{\rm merg}} dE \, N_i(\bff(r)) \, \sigma_{x,i}(\bff(r),E) \, \phi^*(\bff(r),E) \, \phi(\bff(r),E)
$$

\item[microscopic $\nu$ times fission cross section for isotope $\bff(i)$:]
$$
\overline\nu\overline\sigma_{{\rm f},i} ={ 1 \over \overline N_i\, \overline\phi \, \overline V} \, \int_{V_i} dV \int_{E_{\rm merg}} dE \, N_i(\bff(r)) \, \nu\sigma_{{\rm f},i}(\bff(r),E) \, \phi(\bff(r),E)
$$

\item[fission spectra for isotope $\bff(i)$:]
$$
\overline\chi_{i} ={ 1 \over \overline{\cal F}_i \overline\phi^* \, \overline V} \, \int_{V_i} dV \int_{E_{\rm merg}} dE \, \chi_{i}(\bff(r),E) \, {\cal F}_i(\bff(r)) \phi^*(\bff(r),E)
$$

\noindent where ${\cal F}_i(\bff(r))$ is the energy-integrated fission rate for isotope $\bff(i)$, defined as
$$
{\cal F}_i(\bff(r))=\int_\infty dE \, N_i(\bff(r)) \, \nu\sigma_{{\rm f},i}(\bff(r),E) \, \phi(\bff(r),E)
$$

\noindent and
$$
\overline{\cal F}_i={1\over \overline V} \int_{V_i} dV \, {\cal F}_i(\bff(r)) \ .
$$
\end{description}

Both the macrolib and microlib information is affected by the adjoint weighting. However, users should be advised that this operation may have some
undesirable effects on the fission spectrum normalization. Its use must therefore be limited to specialized applications where the adjoint weighting
is theoretically required. This is the case, for example, with the {\sc clio} perturbative analysis method.\cite{clio}

\eject
