Skip to content

Commit 7940c0b

Browse files
authored
Merge pull request #432 from GiudGiud/PR_docs3
Fix arguments list for doxygen
2 parents 3013360 + 019c0ed commit 7940c0b

36 files changed

+107
-85
lines changed

docs/doxygen/Doxyfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ WARNINGS = YES
614614
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
615615
# automatically be disabled.
616616

617-
WARN_IF_UNDOCUMENTED = YES
617+
WARN_IF_UNDOCUMENTED = NO
618618

619619
# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
620620
# potential errors in the documentation, such as not documenting some
@@ -1789,4 +1789,4 @@ GENERATE_LEGEND = YES
17891789
# remove the intermediate dot files that are used to generate
17901790
# the various graphs.
17911791

1792-
DOT_CLEANUP = YES
1792+
DOT_CLEANUP = YES
File renamed without changes.
File renamed without changes.

docs/source/api/cpulssolver.txt docs/source/api/cpulssolver.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _cpulssolver:
22

3-
=========
3+
===========
44
CPULSSolver
5-
=========
5+
===========
66

77
.. doxygenclass:: CPULSSolver
88
:project: OpenMOC
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/source/methods/cmfd.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Coarse Mesh Finite Difference Acceleration
55
==========================================
66

7-
While MOC offers many benefits including treatment of complex geometries and amenability to parallelization, it suffers from slow convergence which necessitates the use of acceleration methods. Numerous acceleration schemes have been proposed for MOC such as CMFD [Smith-1983]_, coarse mesh rebalance (CMR) [Yamamoto-2002]_, [Yamamoto-2005]_, [Yamamoto-2008]_, [Lewis]_, and low order transport operator acceleration [Li]_ with CMFD being the most widely adopted due to its simplicity and acceleration performance. OpenMOC uses the CMFD nonlinear diffusion acceleration (NDA) scheme to reduce the number of iterations required for convergence. Acceleration schemes, such as NDA, are necessary when solving full-core problems which require thousands of power iterations in LWR problems that tend to have high dominance ratios. CMFD was first proposed by Smith [1]_ and has been widely used in accelerating neutron diffusion and transport problems for many years. In particular, it has been shown that CMFD acceleration gives :math:`>` 100x speedups on large LWR problems [Smith-2002]_.
7+
While MOC offers many benefits including treatment of complex geometries and amenability to parallelization, it suffers from slow convergence which necessitates the use of acceleration methods. Numerous acceleration schemes have been proposed for MOC such as CMFD [Smith-1983]_, coarse mesh rebalance (CMR) [Yamamoto-2002]_, [Yamamoto-2005]_, [Yamamoto-2008]_, [Lewis]_, and low order transport operator acceleration [Li]_ with CMFD being the most widely adopted due to its simplicity and acceleration performance. OpenMOC uses the CMFD nonlinear diffusion acceleration (NDA) scheme to reduce the number of iterations required for convergence. Acceleration schemes, such as NDA, are necessary when solving full-core problems which require thousands of power iterations in LWR problems that tend to have high dominance ratios. CMFD was first proposed by Smith [Smith-1983]_ and has been widely used in accelerating neutron diffusion and transport problems for many years. In particular, it has been shown that CMFD acceleration gives :math:`>` 100x speedups on large LWR problems [Smith-2002]_.
88

99
CMFD acceleration functions by using the solution of a coarse mesh diffusion problem to accelerate the convergence of a fine mesh transport problem. It is implemented by overlaying a 2D (or 3D) cartesian mesh over an FSR mesh. :ref:`Figure 1 <figure-fsr-mesh-regions>` gives an illustration of the FSR mesh layout and coarse mesh layout used for solving a 17 x 17 PWR assembly problem.
1010

@@ -38,7 +38,7 @@ Variable Description Variab
3838
:math:`{\mathbf{g}}, {\mathbf{g}} \prime` Energy group index :math:`x, y` Position variable
3939
========================================= ============================= =================== =============================
4040

41-
.. _gen-coarse-mesh
41+
.. _gen-coarse-mesh:
4242

4343
Cross Section Generation
4444
========================
@@ -186,7 +186,7 @@ The neutron balance equation in a cell then becomes:
186186
187187
Note that :eq:`eqn-alg-net-current` is the algebraic net current based on the finite difference approximation being applied across the surface of two neighboring cells and not the actual net current in the MOC problem. The actual current from the MOC problem is computed by accumulating the current contribution from every segment that crosses a surface as will be shown in the :ref:`Section 7.3 <nonlinear-dif-coef>`.
188188

189-
.. _nonlinear-dif-coef
189+
.. _nonlinear-dif-coef:
190190

191191
Introduction to nonlinear diffusion correction factors
192192
======================================================
@@ -263,7 +263,7 @@ As shown in :ref:`Figure 1 <figure-fsr-mesh-regions>` the CMFD mesh is often app
263263
Note that the effective diffusion coefficient depends on the width of the cell and is therefore directional in a 2D (or 3D) mesh. :eq:`eqn-optic-thick-d` can also be used to compute the effective diffusion coefficient in the y-direction, which will differ from the effective diffusion coefficient in the x-direction if the cell is not square. As the size of the cell approaches zero and the optical thickness of the cell approaches the optically thin limit, the effective diffusion coefficient will approach the material diffusion coefficient. For simplicity, we continue to use the surface diffusion coefficient terms in the rest of this thesis without the "eff" superscript.
264264

265265

266-
.. _corner-crossings
266+
.. _corner-crossings:
267267

268268
Treatment of coarse mesh cell corner crossings
269269
==============================================

docs/source/methods/eigenvalue_calculations.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ Exponential Evaluation Method
165165

166166
The algorithms described in this section require a number of floating point operations, including addition, subtraction, multiplication and division. The most expensive operation, however, is the exponential evaluation needed to compute :math:`e^{-\tau_{k,i,g,p}}`. All mainstream compilers provide a library with intrinsic mathematical routines, including an exponential evaluator. One method of avoiding the computational cost of explicitly evaluating exponentials is through the use of a linear interpolation table. A sequence of linear approximations to a simple exponential is illustrated in :ref:`Figure 2 <figure-exponential-tangent>`. In addition to reducing the flop count for an exponential evaluation, the table may be constructed to fit completely in :math:`L1` cache and as a result, can improve the memory performance of the MOC transport sweep algorithm.
167167

168-
.. _warning: The linear interpolation tables were first replaced by quadratic interpolation tables, and those are now superseded by rational fraction approximations, which are faster to compute and more accurate. See [Giudicelli-2019]_ for more details.
168+
#NOTE
169+
The linear interpolation tables were first replaced by quadratic interpolation tables, and those are now superseded by rational fraction approximations, which are faster to compute and more accurate. See [Giudicelli-2019]_ for more details.
169170

170171
.. _figure-exponential-tangent:
171172

@@ -176,7 +177,7 @@ The algorithms described in this section require a number of floating point oper
176177

177178
**Figure 2**: Linear interpolation of an exponential.
178179

179-
The OpenMOC code incorporates an option to evaluate exponentials using either the compiler's exponential intrinsic function or a linear interpolation table. The following expression for the maximum approximation error :math:`\epsilon` for the linear interpolation method was discussed and validated by [Yamamoto]_:
180+
The OpenMOC code incorporates an option to evaluate exponentials using either the compiler's exponential intrinsic function or a linear interpolation table. The following expression for the maximum approximation error :math:`\epsilon` for the linear interpolation method was discussed and validated by [Yamamoto-2004]_:
180181

181182
.. math::
182183
:label: exponential-error
@@ -253,5 +254,5 @@ References
253254

254255
.. [Giudicelli-2019] Giudicelli G., Forget B. and Smith K., Adding a third level of parallelism to OpenMOC, an open-source deterministic neutron transport solver, M&C 2019
255256
256-
.. [Yamamoto] Yamamoto A., Kitamura Y. and Yamane Y., Computational efficiencies of approximated exponential functions for transport calculations of the characteristics method, Annals of Nuclear Energy, vol. 30, 2004
257+
.. [Yamamoto-2004] Yamamoto A., Kitamura Y. and Yamane Y., Computational efficiencies of approximated exponential functions for transport calculations of the characteristics method, Annals of Nuclear Energy, vol. 30, 2004
257258

docs/source/methods/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Theory and Methodology
1313
eigenvalue_calculations
1414
constructive_solid_geometry
1515
track_generation
16+
parallelization
1617
cmfd
1718
krylov

docs/source/methods/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Introduction
66

77
The method of characteristics is one technique for solving partial differential equations. MOC is one of the most common methods with real world applications in production lattice physics tools used today [Smith]_. The prospects for the MOC algorithm as an eventual successor to low-order diffusion-based method for reactor analysis are promising, and extensive research efforts into the efficient use of the algorithm are ongoing [Wu]_, [Taylor]_, [Liu]_, [Talamo]_. As a result, there is an opportunity for advanced parallel algorithms for high performance computing machines and nonlinear acceleration schemes to propel the application of MOC to full-core reactor physics calculations.
88

9-
:ref:`Section 2 <method_of_characteristics>` describes how the method of characteristics is applied to solve the steady-state neutron transport equation in OpenMOC. :ref:`Section 3 <eigenvalue_calculations>` presents the algorithms implemented in OpenMOC to solve the MOC equations. :ref:`Section 4 <constructive_solid_geometry>` discusses the constructive solid geometry formulation used to represent geometric models in OpenMOC. :ref:`Section 5 <track_generation>` reviews the angular quadrature and track generation algorithm in OpenMOC. Finally, :ref:`Section 5 <parallelization>` outlines the parallel algorithms in OpenMOC for high performance computing platforms while :ref:`Section 6 <cmfd>` describes CMFD, a nonlinear acceleration method in OpenMOC.
9+
:ref:`Section 2 <method_of_characteristics>` describes how the method of characteristics is applied to solve the steady-state neutron transport equation in OpenMOC. :ref:`Section 3 <eigenvalue_calculations>` presents the algorithms implemented in OpenMOC to solve the MOC equations. :ref:`Section 4 <constructive_solid_geometry>` discusses the constructive solid geometry formulation used to represent geometric models in OpenMOC. :ref:`Section 5 <track_generation>` reviews the angular quadrature and track generation algorithm in OpenMOC. :ref:`Section 6 <parallelization>` outlines the parallel algorithms in OpenMOC for high performance computing platforms while :ref:`Section 7 <cmfd>` describes CMFD, a nonlinear acceleration method in OpenMOC. :ref:`Section 7 <krylov>` gives elements for replacing the fission iteration algorithm by Krylov subspace algorithms.
1010

1111

1212
References

docs/source/methods/method_of_characteristics.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Another common approximation for MOC is to assume that the source :math:`Q_g` is
273273
The Linear Source Region Approximation
274274
======================================
275275

276-
A more accurate description of the source in spatial regions is to assume a linear variation. This is typically sufficient for the moderator in a PWR, when each channel is also cut in azimuthal source regions. The source then varies along each characteristic lines. The reader should refer themselves to `Ferrer`_ and `G. Gunow PhD Thesis`_ for more details on the track-based linear source approximation and its implementation in OpenMOC.
276+
A more accurate description of the source in spatial regions is to assume a linear variation. This is typically sufficient for the moderator in a PWR, when each channel is also cut in azimuthal source regions. The source then varies along each characteristic lines. The reader should refer themselves to [Ferrer]_ and [Gunow]_ for more details on the track-based linear source approximation and its implementation in OpenMOC.
277277

278278
.. math::
279279
:label: linear-source
@@ -445,5 +445,5 @@ References
445445
446446
.. [Ferrer] R. Ferrer and J. Rhodes, “A Linear Source Approximation Scheme for the Method of Characteristics,” volume 77, p. 119–136, 1981.
447447
448-
.. [G. Gunow PhD Thesis] G. Gunow "Full Core 3D Neutron Transport Simulation Using the Method of Characteristics with Linear Sources", PhD Thesis, Massachusetts Institute of Technology (2018).
448+
.. [Gunow] G. Gunow "Full Core 3D Neutron Transport Simulation Using the Method of Characteristics with Linear Sources", PhD Thesis, Massachusetts Institute of Technology (2018).
449449
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _parallelization:
2+
3+
======================================================================
4+
Parallelization of the Method of Characteristics for neutron transport
5+
======================================================================
6+
7+
Coming soon

src/CPUSolver.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int CPUSolver::getNumThreads() {
6060
* fluxes = solver.getFluxes(num_fluxes)
6161
* @endcode
6262
*
63-
* @param fluxes an array of FSR scalar fluxes in each energy group
63+
* @param out_fluxes an array of FSR scalar fluxes in each energy group
6464
* @param num_fluxes the total number of FSR flux values
6565
*/
6666
void CPUSolver::getFluxes(FP_PRECISION* out_fluxes, int num_fluxes) {
@@ -161,9 +161,9 @@ void CPUSolver::setNumThreads(int num_threads) {
161161

162162
/**
163163
* @brief Set the flux array for use in transport sweep source calculations.
164-
* @detail This is a helper method for the checkpoint restart capabilities,
165-
* as well as the IRAMSolver in the openmoc.krylov submodule. This
166-
* routine may be used as follows from within Python:
164+
* @details This is a helper method for the checkpoint restart capabilities,
165+
* as well as the IRAMSolver in the openmoc.krylov submodule. This
166+
* routine may be used as follows from within Python:
167167
*
168168
* @code
169169
* fluxes = numpy.random.rand(num_FSRs * num_groups, dtype=np.float)

src/Cell.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ double* Cell::getRotationMatrix() {
300300
* rotation = cell.getRotation(3)
301301
* @endcode
302302
*
303-
* @param rotation an array of rotation angles of length 3 for x, y and z
303+
* @param rotations an array of rotation angles of length 3 for x, y and z
304304
* @param num_axes the number of axes (this must always be 3)
305305
* @param units the angular units in "radians" or "degrees" (default)
306306
*/
@@ -345,7 +345,7 @@ double* Cell::getTranslation() {
345345
* translation = cell.retrieveTranslation(3)
346346
* @endcode
347347
*
348-
* @param translation an array of translations of length 3 for x, y and z
348+
* @param translations an array of translations of length 3 for x, y and z
349349
* @param num_axes the number of axes (this must always be 3)
350350
*/
351351
void Cell::retrieveTranslation(double* translations, int num_axes) {
@@ -1182,7 +1182,7 @@ void Cell::addNeighborCell(Cell* cell) {
11821182
* is within the Region. This point is only inside the Cell if it
11831183
* is on the same side of every Surface bounding the Cell.
11841184
* @param point a pointer to a Point
1185-
* @returns true if the Point is inside the Cell; otherwise false
1185+
* @return true if the Point is inside the Cell; otherwise false
11861186
*/
11871187
bool Cell::containsPoint(Point* point) {
11881188

@@ -1213,6 +1213,7 @@ bool Cell::containsPoint(Point* point) {
12131213
* is on the same side of the Surface. This Point is only inside
12141214
* the Cell if it is on the same side of every Surface in the Cell.
12151215
* @param coords a pointer to a localcoord
1216+
* @return whether the cell contains the coords or not
12161217
*/
12171218
bool Cell::containsCoords(LocalCoords* coords) {
12181219
return containsPoint(coords->getPoint());
@@ -1226,6 +1227,7 @@ bool Cell::containsCoords(LocalCoords* coords) {
12261227
* @details If the trajectory will not intersect any of the Surfaces in the
12271228
* Cell returns INFINITY.
12281229
* @param coords a pointer to a localcoords
1230+
* @return distance to nearest intersection with the cell's region boundaries
12291231
*/
12301232
double Cell::minSurfaceDist(LocalCoords* coords) {
12311233
if (_region == NULL)
@@ -1245,7 +1247,7 @@ double Cell::minSurfaceDist(LocalCoords* coords) {
12451247
* (in radians from \f$[0,2\pi]\f$)
12461248
* @param polar the polar angle of the trajectory
12471249
* (in radians from \f$[0,\pi]\f$)
1248-
* @param min_intersection a pointer to the intersection Point that is found
1250+
* @return distance to nearest intersection with the cell's region boundaries
12491251
*/
12501252
double Cell::minSurfaceDist(Point* point, double azim, double polar) {
12511253
if (_region == NULL)

src/Cmfd.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Cmfd::~Cmfd() {
253253

254254
/**
255255
* @brief Set the number of Mesh cells in a row.
256-
* @param number of Mesh cells in a row
256+
* @param num_x number of Mesh cells in a row
257257
*/
258258
void Cmfd::setNumX(int num_x) {
259259

@@ -272,7 +272,7 @@ void Cmfd::setNumX(int num_x) {
272272

273273
/**
274274
* @brief Set the number of Mesh cells in a column.
275-
* @param number of Mesh cells in a column
275+
* @param num_y number of Mesh cells in a column
276276
*/
277277
void Cmfd::setNumY(int num_y) {
278278

@@ -291,7 +291,7 @@ void Cmfd::setNumY(int num_y) {
291291

292292
/**
293293
* @brief Set the number of Mesh cells in the z-direction.
294-
* @param number of Mesh cells in the z direction
294+
* @param num_z number of Mesh cells in the z direction
295295
*/
296296
void Cmfd::setNumZ(int num_z) {
297297

@@ -1963,8 +1963,8 @@ Lattice* Cmfd::getLattice() {
19631963
/**
19641964
* @brief Add an FSR ID to a vector that contains all the FSR IDs
19651965
* contained within a CMFD mesh cell.
1966-
* @param The CMFD cell ID.
1967-
* @param The FSR ID.
1966+
* @param cmfd_cell the CMFD cell ID.
1967+
* @param fsr_id the FSR ID.
19681968
*/
19691969
void Cmfd::addFSRToCell(int cmfd_cell, long fsr_id) {
19701970
_cell_fsrs.at(cmfd_cell).push_back(fsr_id);
@@ -1973,7 +1973,7 @@ void Cmfd::addFSRToCell(int cmfd_cell, long fsr_id) {
19731973

19741974
/**
19751975
* @brief Set the number of MOC energy groups.
1976-
* @param number of MOC energy groups
1976+
* @param num_groups number of MOC energy groups
19771977
*/
19781978
void Cmfd::setNumMOCGroups(int num_groups) {
19791979
_num_moc_groups = num_groups;
@@ -2000,7 +2000,7 @@ int Cmfd::getNumCells() {
20002000

20012001
/**
20022002
* @brief set the number of FSRs.
2003-
* @param the number of FSRs
2003+
* @param num_fsrs the number of FSRs
20042004
*/
20052005
void Cmfd::setNumFSRs(long num_fsrs) {
20062006
_num_FSRs = num_fsrs;
@@ -2511,7 +2511,7 @@ void Cmfd::setBoundary(int side, boundaryType boundary) {
25112511

25122512
/**
25132513
* @brief Get the boundaryType for one side of the CMFD mesh.
2514-
* @param the CMFD mesh surface ID.
2514+
* @param side the CMFD mesh surface ID.
25152515
* @return the boundaryType for the surface.
25162516
*/
25172517
int Cmfd::getBoundary(int side) {
@@ -3311,7 +3311,7 @@ double Cmfd::getDistanceToCentroid(Point* centroid, int cell_id,
33113311

33123312
/**
33133313
* @brief Set a pointer to the Geometry.
3314-
* @param goemetry A pointer to a Geometry object.
3314+
* @param geometry A pointer to a Geometry object.
33153315
*/
33163316
void Cmfd::setGeometry(Geometry* geometry) {
33173317
_geometry = geometry;
@@ -3761,7 +3761,7 @@ void Cmfd::initialize() {
37613761
* @brief Initialize the CMFD lattice and compute mesh dimensions, considering
37623762
* both uniform/non-uniform and 2D/3D cases.
37633763
* @param offset the offset point of the CMFD Lattice
3764-
* @param whether CMFD will be used in a 2D simulation (true) or 3D
3764+
* @param is_2D whether CMFD will be used in a 2D simulation (true) or 3D
37653765
*/
37663766
void Cmfd::initializeLattice(Point* offset, bool is_2D) {
37673767

@@ -4073,7 +4073,7 @@ CMFD_PRECISION Cmfd::getSurfaceWidth(int surface, int global_ind) {
40734073
/**
40744074
* @brief Returns the width of the surface perpendicular to a given surface
40754075
* @param surface A surface index, from 0 to NUM_FACES - 1
4076-
* @paran global_ind The CMFD cell global index
4076+
* @param global_ind The CMFD cell global index
40774077
* @return The perpendicular surface width
40784078
*/
40794079
CMFD_PRECISION Cmfd::getPerpendicularSurfaceWidth(int surface, int global_ind) {

src/Cmfd.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ inline int Cmfd::getGlobalCMFDCell(int cmfd_cell) {
549549
* the appropriate CMFD mesh cell surface.
550550
* @param curr_segment the current Track segment
551551
* @param track_flux the outgoing angular flux for this segment
552-
* @param polar_weights array of polar weights for some azimuthal angle
552+
* @param azim_index azimuthal index of track angle
553+
* @param polar_index polar index of track angle
553554
* @param fwd boolean indicating direction of integration along segment
554555
*/
555556
inline void Cmfd::tallyCurrent(segment* curr_segment, float* track_flux,

0 commit comments

Comments
 (0)