From 019c0edfd50657667f7ba7486d914819aedc7077 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 12 Jul 2019 23:45:57 -0400 Subject: [PATCH] Fix arguments list for doxygen --- docs/doxygen/Doxyfile | 4 +-- ...ation.png => cmfd-axial-interpolation.png} | Bin docs/source/api/{cmfd.txt => cmfd.rst} | 0 .../api/{cpulssolver.txt => cpulssolver.rst} | 4 +-- .../api/{halfspace.txt => halfspace.rst} | 0 docs/source/api/{region.txt => region.rst} | 0 ...ckgenerator3D.txt => trackgenerator3D.rst} | 0 .../api/{zcylinder.txt => zcylinder.rst} | 0 docs/source/methods/cmfd.rst | 8 +++--- .../methods/eigenvalue_calculations.rst | 7 +++-- docs/source/methods/index.rst | 1 + docs/source/methods/introduction.rst | 2 +- .../methods/method_of_characteristics.rst | 4 +-- docs/source/methods/parallelization.rst | 7 +++++ src/CPUSolver.cpp | 8 +++--- src/Cell.cpp | 10 ++++--- src/Cmfd.cpp | 22 +++++++-------- src/Cmfd.h | 3 +- src/ExpEvaluator.cpp | 5 ++-- src/Geometry.cpp | 10 +++++-- src/MOCKernel.cpp | 2 +- src/Matrix.cpp | 6 ++-- src/Mesh.cpp | 1 + src/ParallelHashMap.h | 2 +- src/Quadrature.cpp | 12 ++++---- src/Region.cpp | 8 +++++- src/Region.h | 4 +-- src/Solver.cpp | 8 +++--- src/Solver.h | 1 + src/Surface.h | 3 +- src/Track.cpp | 26 +++++++++--------- src/TrackGenerator.cpp | 4 +-- src/TrackGenerator3D.cpp | 4 +-- src/TrackTraversingAlgorithms.cpp | 4 +-- src/exponentials.h | 8 +++--- src/linalg.cpp | 4 +-- 36 files changed, 107 insertions(+), 85 deletions(-) rename docs/img/{cmfd-axial-prolongation.png => cmfd-axial-interpolation.png} (100%) rename docs/source/api/{cmfd.txt => cmfd.rst} (100%) rename docs/source/api/{cpulssolver.txt => cpulssolver.rst} (79%) rename docs/source/api/{halfspace.txt => halfspace.rst} (100%) rename docs/source/api/{region.txt => region.rst} (100%) rename docs/source/api/{trackgenerator3D.txt => trackgenerator3D.rst} (100%) rename docs/source/api/{zcylinder.txt => zcylinder.rst} (100%) create mode 100644 docs/source/methods/parallelization.rst diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 3afc04ce1..a457f8a8b 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -614,7 +614,7 @@ WARNINGS = YES # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. -WARN_IF_UNDOCUMENTED = YES +WARN_IF_UNDOCUMENTED = NO # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some @@ -1789,4 +1789,4 @@ GENERATE_LEGEND = YES # remove the intermediate dot files that are used to generate # the various graphs. -DOT_CLEANUP = YES \ No newline at end of file +DOT_CLEANUP = YES diff --git a/docs/img/cmfd-axial-prolongation.png b/docs/img/cmfd-axial-interpolation.png similarity index 100% rename from docs/img/cmfd-axial-prolongation.png rename to docs/img/cmfd-axial-interpolation.png diff --git a/docs/source/api/cmfd.txt b/docs/source/api/cmfd.rst similarity index 100% rename from docs/source/api/cmfd.txt rename to docs/source/api/cmfd.rst diff --git a/docs/source/api/cpulssolver.txt b/docs/source/api/cpulssolver.rst similarity index 79% rename from docs/source/api/cpulssolver.txt rename to docs/source/api/cpulssolver.rst index 2bce841d2..4736d8af0 100644 --- a/docs/source/api/cpulssolver.txt +++ b/docs/source/api/cpulssolver.rst @@ -1,8 +1,8 @@ .. _cpulssolver: -========= +=========== CPULSSolver -========= +=========== .. doxygenclass:: CPULSSolver :project: OpenMOC diff --git a/docs/source/api/halfspace.txt b/docs/source/api/halfspace.rst similarity index 100% rename from docs/source/api/halfspace.txt rename to docs/source/api/halfspace.rst diff --git a/docs/source/api/region.txt b/docs/source/api/region.rst similarity index 100% rename from docs/source/api/region.txt rename to docs/source/api/region.rst diff --git a/docs/source/api/trackgenerator3D.txt b/docs/source/api/trackgenerator3D.rst similarity index 100% rename from docs/source/api/trackgenerator3D.txt rename to docs/source/api/trackgenerator3D.rst diff --git a/docs/source/api/zcylinder.txt b/docs/source/api/zcylinder.rst similarity index 100% rename from docs/source/api/zcylinder.txt rename to docs/source/api/zcylinder.rst diff --git a/docs/source/methods/cmfd.rst b/docs/source/methods/cmfd.rst index 627b862e8..d127cf226 100644 --- a/docs/source/methods/cmfd.rst +++ b/docs/source/methods/cmfd.rst @@ -4,7 +4,7 @@ Coarse Mesh Finite Difference Acceleration ========================================== -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]_. +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]_. 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 ` gives an illustration of the FSR mesh layout and coarse mesh layout used for solving a 17 x 17 PWR assembly problem. @@ -38,7 +38,7 @@ Variable Description Variab :math:`{\mathbf{g}}, {\mathbf{g}} \prime` Energy group index :math:`x, y` Position variable ========================================= ============================= =================== ============================= -.. _gen-coarse-mesh +.. _gen-coarse-mesh: Cross Section Generation ======================== @@ -186,7 +186,7 @@ The neutron balance equation in a cell then becomes: 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 +.. _nonlinear-dif-coef: Introduction to nonlinear diffusion correction factors ====================================================== @@ -263,7 +263,7 @@ As shown in :ref:`Figure 1 ` the CMFD mesh is often app 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. -.. _corner-crossings +.. _corner-crossings: Treatment of coarse mesh cell corner crossings ============================================== diff --git a/docs/source/methods/eigenvalue_calculations.rst b/docs/source/methods/eigenvalue_calculations.rst index ffef0c6b3..11072c47d 100644 --- a/docs/source/methods/eigenvalue_calculations.rst +++ b/docs/source/methods/eigenvalue_calculations.rst @@ -165,7 +165,8 @@ Exponential Evaluation Method 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 `. 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. -.. _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. +#NOTE +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. .. _figure-exponential-tangent: @@ -176,7 +177,7 @@ The algorithms described in this section require a number of floating point oper **Figure 2**: Linear interpolation of an exponential. -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]_: +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]_: .. math:: :label: exponential-error @@ -253,5 +254,5 @@ References .. [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 -.. [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 +.. [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 diff --git a/docs/source/methods/index.rst b/docs/source/methods/index.rst index a66842271..8286b0c75 100644 --- a/docs/source/methods/index.rst +++ b/docs/source/methods/index.rst @@ -13,5 +13,6 @@ Theory and Methodology eigenvalue_calculations constructive_solid_geometry track_generation + parallelization cmfd krylov diff --git a/docs/source/methods/introduction.rst b/docs/source/methods/introduction.rst index 758e3adbb..219d6af19 100644 --- a/docs/source/methods/introduction.rst +++ b/docs/source/methods/introduction.rst @@ -6,7 +6,7 @@ Introduction 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. -:ref:`Section 2 ` describes how the method of characteristics is applied to solve the steady-state neutron transport equation in OpenMOC. :ref:`Section 3 ` presents the algorithms implemented in OpenMOC to solve the MOC equations. :ref:`Section 4 ` discusses the constructive solid geometry formulation used to represent geometric models in OpenMOC. :ref:`Section 5 ` reviews the angular quadrature and track generation algorithm in OpenMOC. Finally, :ref:`Section 5 ` outlines the parallel algorithms in OpenMOC for high performance computing platforms while :ref:`Section 6 ` describes CMFD, a nonlinear acceleration method in OpenMOC. +:ref:`Section 2 ` describes how the method of characteristics is applied to solve the steady-state neutron transport equation in OpenMOC. :ref:`Section 3 ` presents the algorithms implemented in OpenMOC to solve the MOC equations. :ref:`Section 4 ` discusses the constructive solid geometry formulation used to represent geometric models in OpenMOC. :ref:`Section 5 ` reviews the angular quadrature and track generation algorithm in OpenMOC. :ref:`Section 6 ` outlines the parallel algorithms in OpenMOC for high performance computing platforms while :ref:`Section 7 ` describes CMFD, a nonlinear acceleration method in OpenMOC. :ref:`Section 7 ` gives elements for replacing the fission iteration algorithm by Krylov subspace algorithms. References diff --git a/docs/source/methods/method_of_characteristics.rst b/docs/source/methods/method_of_characteristics.rst index bb10a630f..cb3acfb64 100644 --- a/docs/source/methods/method_of_characteristics.rst +++ b/docs/source/methods/method_of_characteristics.rst @@ -273,7 +273,7 @@ Another common approximation for MOC is to assume that the source :math:`Q_g` is The Linear Source Region Approximation ====================================== -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. +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. .. math:: :label: linear-source @@ -445,5 +445,5 @@ References .. [Ferrer] R. Ferrer and J. Rhodes, “A Linear Source Approximation Scheme for the Method of Characteristics,” volume 77, p. 119–136, 1981. -.. [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). +.. [Gunow] G. Gunow "Full Core 3D Neutron Transport Simulation Using the Method of Characteristics with Linear Sources", PhD Thesis, Massachusetts Institute of Technology (2018). diff --git a/docs/source/methods/parallelization.rst b/docs/source/methods/parallelization.rst new file mode 100644 index 000000000..1b6228bae --- /dev/null +++ b/docs/source/methods/parallelization.rst @@ -0,0 +1,7 @@ +.. _parallelization: + +====================================================================== +Parallelization of the Method of Characteristics for neutron transport +====================================================================== + +Coming soon diff --git a/src/CPUSolver.cpp b/src/CPUSolver.cpp index 55ad9a01d..7ae9bd4dc 100644 --- a/src/CPUSolver.cpp +++ b/src/CPUSolver.cpp @@ -60,7 +60,7 @@ int CPUSolver::getNumThreads() { * fluxes = solver.getFluxes(num_fluxes) * @endcode * - * @param fluxes an array of FSR scalar fluxes in each energy group + * @param out_fluxes an array of FSR scalar fluxes in each energy group * @param num_fluxes the total number of FSR flux values */ void CPUSolver::getFluxes(FP_PRECISION* out_fluxes, int num_fluxes) { @@ -161,9 +161,9 @@ void CPUSolver::setNumThreads(int num_threads) { /** * @brief Set the flux array for use in transport sweep source calculations. - * @detail This is a helper method for the checkpoint restart capabilities, - * as well as the IRAMSolver in the openmoc.krylov submodule. This - * routine may be used as follows from within Python: + * @details This is a helper method for the checkpoint restart capabilities, + * as well as the IRAMSolver in the openmoc.krylov submodule. This + * routine may be used as follows from within Python: * * @code * fluxes = numpy.random.rand(num_FSRs * num_groups, dtype=np.float) diff --git a/src/Cell.cpp b/src/Cell.cpp index 17b912da5..1e02d6f36 100644 --- a/src/Cell.cpp +++ b/src/Cell.cpp @@ -300,7 +300,7 @@ double* Cell::getRotationMatrix() { * rotation = cell.getRotation(3) * @endcode * - * @param rotation an array of rotation angles of length 3 for x, y and z + * @param rotations an array of rotation angles of length 3 for x, y and z * @param num_axes the number of axes (this must always be 3) * @param units the angular units in "radians" or "degrees" (default) */ @@ -345,7 +345,7 @@ double* Cell::getTranslation() { * translation = cell.retrieveTranslation(3) * @endcode * - * @param translation an array of translations of length 3 for x, y and z + * @param translations an array of translations of length 3 for x, y and z * @param num_axes the number of axes (this must always be 3) */ void Cell::retrieveTranslation(double* translations, int num_axes) { @@ -1182,7 +1182,7 @@ void Cell::addNeighborCell(Cell* cell) { * is within the Region. This point is only inside the Cell if it * is on the same side of every Surface bounding the Cell. * @param point a pointer to a Point - * @returns true if the Point is inside the Cell; otherwise false + * @return true if the Point is inside the Cell; otherwise false */ bool Cell::containsPoint(Point* point) { @@ -1213,6 +1213,7 @@ bool Cell::containsPoint(Point* point) { * is on the same side of the Surface. This Point is only inside * the Cell if it is on the same side of every Surface in the Cell. * @param coords a pointer to a localcoord + * @return whether the cell contains the coords or not */ bool Cell::containsCoords(LocalCoords* coords) { return containsPoint(coords->getPoint()); @@ -1226,6 +1227,7 @@ bool Cell::containsCoords(LocalCoords* coords) { * @details If the trajectory will not intersect any of the Surfaces in the * Cell returns INFINITY. * @param coords a pointer to a localcoords + * @return distance to nearest intersection with the cell's region boundaries */ double Cell::minSurfaceDist(LocalCoords* coords) { if (_region == NULL) @@ -1245,7 +1247,7 @@ double Cell::minSurfaceDist(LocalCoords* coords) { * (in radians from \f$[0,2\pi]\f$) * @param polar the polar angle of the trajectory * (in radians from \f$[0,\pi]\f$) - * @param min_intersection a pointer to the intersection Point that is found + * @return distance to nearest intersection with the cell's region boundaries */ double Cell::minSurfaceDist(Point* point, double azim, double polar) { if (_region == NULL) diff --git a/src/Cmfd.cpp b/src/Cmfd.cpp index 9d79c994b..083cebf73 100644 --- a/src/Cmfd.cpp +++ b/src/Cmfd.cpp @@ -253,7 +253,7 @@ Cmfd::~Cmfd() { /** * @brief Set the number of Mesh cells in a row. - * @param number of Mesh cells in a row + * @param num_x number of Mesh cells in a row */ void Cmfd::setNumX(int num_x) { @@ -272,7 +272,7 @@ void Cmfd::setNumX(int num_x) { /** * @brief Set the number of Mesh cells in a column. - * @param number of Mesh cells in a column + * @param num_y number of Mesh cells in a column */ void Cmfd::setNumY(int num_y) { @@ -291,7 +291,7 @@ void Cmfd::setNumY(int num_y) { /** * @brief Set the number of Mesh cells in the z-direction. - * @param number of Mesh cells in the z direction + * @param num_z number of Mesh cells in the z direction */ void Cmfd::setNumZ(int num_z) { @@ -1963,8 +1963,8 @@ Lattice* Cmfd::getLattice() { /** * @brief Add an FSR ID to a vector that contains all the FSR IDs * contained within a CMFD mesh cell. - * @param The CMFD cell ID. - * @param The FSR ID. + * @param cmfd_cell the CMFD cell ID. + * @param fsr_id the FSR ID. */ void Cmfd::addFSRToCell(int cmfd_cell, long fsr_id) { _cell_fsrs.at(cmfd_cell).push_back(fsr_id); @@ -1973,7 +1973,7 @@ void Cmfd::addFSRToCell(int cmfd_cell, long fsr_id) { /** * @brief Set the number of MOC energy groups. - * @param number of MOC energy groups + * @param num_groups number of MOC energy groups */ void Cmfd::setNumMOCGroups(int num_groups) { _num_moc_groups = num_groups; @@ -2000,7 +2000,7 @@ int Cmfd::getNumCells() { /** * @brief set the number of FSRs. - * @param the number of FSRs + * @param num_fsrs the number of FSRs */ void Cmfd::setNumFSRs(long num_fsrs) { _num_FSRs = num_fsrs; @@ -2511,7 +2511,7 @@ void Cmfd::setBoundary(int side, boundaryType boundary) { /** * @brief Get the boundaryType for one side of the CMFD mesh. - * @param the CMFD mesh surface ID. + * @param side the CMFD mesh surface ID. * @return the boundaryType for the surface. */ int Cmfd::getBoundary(int side) { @@ -3311,7 +3311,7 @@ double Cmfd::getDistanceToCentroid(Point* centroid, int cell_id, /** * @brief Set a pointer to the Geometry. - * @param goemetry A pointer to a Geometry object. + * @param geometry A pointer to a Geometry object. */ void Cmfd::setGeometry(Geometry* geometry) { _geometry = geometry; @@ -3761,7 +3761,7 @@ void Cmfd::initialize() { * @brief Initialize the CMFD lattice and compute mesh dimensions, considering * both uniform/non-uniform and 2D/3D cases. * @param offset the offset point of the CMFD Lattice - * @param whether CMFD will be used in a 2D simulation (true) or 3D + * @param is_2D whether CMFD will be used in a 2D simulation (true) or 3D */ void Cmfd::initializeLattice(Point* offset, bool is_2D) { @@ -4073,7 +4073,7 @@ CMFD_PRECISION Cmfd::getSurfaceWidth(int surface, int global_ind) { /** * @brief Returns the width of the surface perpendicular to a given surface * @param surface A surface index, from 0 to NUM_FACES - 1 - * @paran global_ind The CMFD cell global index + * @param global_ind The CMFD cell global index * @return The perpendicular surface width */ CMFD_PRECISION Cmfd::getPerpendicularSurfaceWidth(int surface, int global_ind) { diff --git a/src/Cmfd.h b/src/Cmfd.h index 66d03c0c3..87bb52b3c 100644 --- a/src/Cmfd.h +++ b/src/Cmfd.h @@ -549,7 +549,8 @@ inline int Cmfd::getGlobalCMFDCell(int cmfd_cell) { * the appropriate CMFD mesh cell surface. * @param curr_segment the current Track segment * @param track_flux the outgoing angular flux for this segment - * @param polar_weights array of polar weights for some azimuthal angle + * @param azim_index azimuthal index of track angle + * @param polar_index polar index of track angle * @param fwd boolean indicating direction of integration along segment */ inline void Cmfd::tallyCurrent(segment* curr_segment, float* track_flux, diff --git a/src/ExpEvaluator.cpp b/src/ExpEvaluator.cpp index 0f545d9bf..751a9163d 100644 --- a/src/ExpEvaluator.cpp +++ b/src/ExpEvaluator.cpp @@ -35,7 +35,7 @@ ExpEvaluator::~ExpEvaluator() { /** * @brief Set the Quadrature to use when computing exponentials. - * @param polar_quad a Quadrature object pointer + * @param quadrature a Quadrature object pointer */ void ExpEvaluator::setQuadrature(Quadrature* quadrature) { _quadrature = quadrature; @@ -144,8 +144,7 @@ FP_PRECISION ExpEvaluator::getTableSpacing() { /** * @brief Get the number of entries in the exponential interpolation table. - * @param entries in the interpolation table - * + * @return entries in the interpolation table */ int ExpEvaluator::getTableSize() { diff --git a/src/Geometry.cpp b/src/Geometry.cpp index 986f0d770..9fd7f7036 100644 --- a/src/Geometry.cpp +++ b/src/Geometry.cpp @@ -1006,7 +1006,8 @@ Cell* Geometry::findCellContainingCoords(LocalCoords* coords) { * each LocalCoord in the linked list for the Lattice or Universe * that it is in. * @param coords pointer to a LocalCoords object - * @param angle the angle for a trajectory projected from the LocalCoords + * @param azim the azimuthal angle for a trajectory projected from the LocalCoords + * @param polar the polar angle for a trajectory projected from the LocalCoords * @return returns a pointer to a cell if found, NULL if no cell found */ Cell* Geometry::findFirstCell(LocalCoords* coords, double azim, double polar) { @@ -1057,7 +1058,8 @@ Material* Geometry::findFSRMaterial(long fsr_id) { * return a pointer to the Cell that the LocalCoords will reach * next along its trajectory. * @param coords pointer to a LocalCoords object - * @param angle the angle of the trajectory + * @param azim the azimuthal angle of the trajectory + * @param polar the polar angle of the trajectory * @return a pointer to a Cell if found, NULL if no Cell found */ Cell* Geometry::findNextCell(LocalCoords* coords, double azim, double polar) { @@ -1331,6 +1333,7 @@ int Geometry::findExtrudedFSR(LocalCoords* coords) { * @brief Return the ID of the flat source region that a given * LocalCoords object resides within. * @param coords a LocalCoords object pointer + * @param err_check whether to fail instead of returning -1 if not found * @return the FSR ID for a given LocalCoords object */ long Geometry::getFSRId(LocalCoords* coords, bool err_check) { @@ -1420,6 +1423,7 @@ std::map > Geometry::getCellsToFSRs() { * @brief Return the global ID of the flat source region that a given * LocalCoords object resides within. * @param coords a LocalCoords object pointer + * @param err_check whether to fail instead of returning -1 if not found * @return the FSR ID for a given LocalCoords object */ long Geometry::getGlobalFSRId(LocalCoords* coords, bool err_check) { @@ -1638,7 +1642,7 @@ void Geometry::reserveKeyStrings(int num_threads) { * creates a unique FSR key by constructing a structured string * that describes the hierarchy of lattices/universes/cells. * @param coords a LocalCoords object pointer - * @return the FSR key + * @param key a reference to the FSR key */ void Geometry::getFSRKeyFast(LocalCoords* coords, std::string& key) { diff --git a/src/MOCKernel.cpp b/src/MOCKernel.cpp index 3ee715f8f..7d0731537 100644 --- a/src/MOCKernel.cpp +++ b/src/MOCKernel.cpp @@ -126,7 +126,7 @@ int MOCKernel::getCount() { * @details MOC kernels ensure that there are no segments with an optical path * length greater than the maximum optical path length by splitting * them when they get too large. - * @param the maximum optical path length for a segment + * @param max_tau the maximum optical path length for a segment */ void MOCKernel::setMaxOpticalLength(FP_PRECISION max_tau) { _max_tau = max_tau; diff --git a/src/Matrix.cpp b/src/Matrix.cpp index b09de83a9..522667a4a 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -79,7 +79,7 @@ Matrix::~Matrix() { * @param cell_from The origin cell. * @param group_from The origin group. * @param cell_to The destination cell. - * @param group_from The destination group. + * @param group_to The destination group. * @param val The value used to increment the row/column location. */ void Matrix::incrementValue(int cell_from, int group_from, @@ -124,7 +124,7 @@ void Matrix::incrementValue(int cell_from, int group_from, * @param cell_from The origin cell. * @param group_from The origin group. * @param cell_to The destination cell. - * @param group_from The destination group. + * @param group_to The destination group. * @param val The value used to set the row/column location. */ void Matrix::setValue(int cell_from, int group_from, @@ -264,7 +264,7 @@ void Matrix::printString() { * @param cell_from The origin cell. * @param group_from The origin group. * @param cell_to The destination cell. - * @param group_from The destination group. + * @param group_to The destination group. * @return The value at the corresponding row/column location. */ CMFD_PRECISION Matrix::getValue(int cell_from, int group_from, diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 9b79f70b8..8748393b7 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -235,6 +235,7 @@ Vector3D Mesh::getFormattedReactionRates(RxType rx, bool volume_average) { * Lattice. If the widths_offsets size is 3, the center-point of the * geometry is used as the offset. * @param rx The type of reaction to tally + * @param volume_average whether to volume average results * @return The reaction rates in a 3D vector indexed by the lattice cell * x, y, and z indexes */ diff --git a/src/ParallelHashMap.h b/src/ParallelHashMap.h index 2ee70eef6..82d026552 100644 --- a/src/ParallelHashMap.h +++ b/src/ParallelHashMap.h @@ -504,7 +504,7 @@ bool ParallelHashMap::contains(K& key) { /** * @brief Determine the value associated with a given key. - * @details This function follows the same algorithm as except that + * @details This function follows the same algorithm as "contains" except that * the value associated with the searched key is returned. * First the thread accessing the table acquires the lock corresponding * with the associated bucket based on the key. Then the linked list diff --git a/src/Quadrature.cpp b/src/Quadrature.cpp index 35f673bd8..429e74045 100644 --- a/src/Quadrature.cpp +++ b/src/Quadrature.cpp @@ -1091,7 +1091,7 @@ double GLPolarQuad::legendrePolynomial(size_t n, double x) { /** * @brief The first logarithmic derivative of a Legendre polynomial - * @param m the order of the polynomial + * @param n the order of the polynomial * @param x point at which to evaluate the logarithmic derivative * @return the value of the logarithmic derivative at x */ @@ -1104,7 +1104,7 @@ double GLPolarQuad::logDerivLegendre(size_t n, double x) { /** * @brief The second logarithmic derivative of a Legendre polynomial - * @param m the order of the polynomial + * @param n the order of the polynomial * @param x point at which to evaluate the logarithmic derivative * @return the value of the logarithmic derivative at x */ @@ -1118,10 +1118,10 @@ double GLPolarQuad::secondLogDerivLegendre(size_t n, double x) { /** * @brief Finds the roots of Legendre polynomial of order n. - * @detail Guesses for positive roots are set at logarithmic intervals. - * Positive roots are found simultaneously using an - * Alberth-Householder-n method. Each guess is successively nudged - * towards a true root. Only the positive roots are calculated + * @details Guesses for positive roots are set at logarithmic intervals. + * Positive roots are found simultaneously using an + * Alberth-Householder-n method. Each guess is successively nudged + * towards a true root. Only the positive roots are calculated * @param n the order of the polynomial * @return a list of the roots of the polynomial */ diff --git a/src/Region.cpp b/src/Region.cpp index 587984f02..e880aa522 100644 --- a/src/Region.cpp +++ b/src/Region.cpp @@ -578,6 +578,7 @@ boundaryType Region::getMaxZBoundaryType() { * @details If the trajectory will not intersect any of the Surfaces in the * Region returns INFINITY. * @param coords a pointer to a localcoords + * @return distance to the region boundaries */ double Region::minSurfaceDist(LocalCoords* coords) { @@ -604,7 +605,12 @@ double Region::minSurfaceDist(LocalCoords* coords) { * LocalCoords object. * @details If the trajectory will not intersect any of the Surfaces in the * Region returns INFINITY. - * @param coords a pointer to a localcoords + * @param point the Point of interest + * @param azim the azimuthal angle of the trajectory + * (in radians from \f$[0,2\pi]\f$) + * @param polar the polar angle of the trajectory + * (in radians from \f$[0,\pi]\f$) + * @return distance to nearest intersection with the region's boundaries */ double Region::minSurfaceDist(Point* point, double azim, double polar) { diff --git a/src/Region.h b/src/Region.h index d2af94f9b..daeaf1d29 100644 --- a/src/Region.h +++ b/src/Region.h @@ -83,8 +83,8 @@ class Region { virtual boundaryType getMinZBoundaryType(); virtual boundaryType getMaxZBoundaryType(); virtual bool containsPoint(Point* point) =0; - virtual double minSurfaceDist(Point* point, double azim, double polar=M_PI_2); virtual double minSurfaceDist(LocalCoords* coords); + virtual double minSurfaceDist(Point* point, double azim, double polar=M_PI_2); virtual Region* clone(); }; @@ -155,8 +155,8 @@ class Halfspace : public Region { boundaryType getMinZBoundaryType(); boundaryType getMaxZBoundaryType(); bool containsPoint(Point* point); - double minSurfaceDist(Point* point, double azim, double polar=M_PI_2); double minSurfaceDist(LocalCoords* coords); + double minSurfaceDist(Point* point, double azim, double polar=M_PI_2); }; /** diff --git a/src/Solver.cpp b/src/Solver.cpp index eca92d50d..9ae72f159 100644 --- a/src/Solver.cpp +++ b/src/Solver.cpp @@ -454,7 +454,7 @@ void Solver::setTrackGenerator(TrackGenerator* track_generator) { /** * @brief Sets the threshold for source/flux convergence. * @brief The default threshold for convergence is 1E-5. - * @param source_thresh the threshold for source/flux convergence + * @param threshold the threshold for source/flux convergence */ void Solver::setConvergenceThreshold(double threshold) { @@ -500,7 +500,7 @@ void Solver::setFixedSourceByFSR(long fsr_id, int group, double source) { * @brief Assign a fixed source for a Cell and energy group. * @details This routine will add the fixed source to all instances of the * Cell in the geometry (e.g., all FSRs for this Cell). - * @param fsr_id the Cell of interest + * @param cell a pointer to the Cell of interest * @param group the energy group * @param source the volume-averaged source in this group */ @@ -527,7 +527,7 @@ void Solver::setFixedSourceByCell(Cell* cell, int group, double source) { * @brief Assign a fixed source for a Material and energy group. * @details This routine will add the fixed source to all instances of the * Material in the geometry (e.g., all FSRs with this Material). - * @param fsr_id the Material of interest + * @param material a pointer to the Material of interest * @param group the energy group * @param source the volume-averaged source in this group */ @@ -657,7 +657,7 @@ void Solver::correctXS() { * the magnitude of the stabilizing correction. * * @param stabilization_factor The factor applied to the stabilizing correction - * @param stabilizaiton_type The type of stabilization to use + * @param stabilization_type The type of stabilization to use */ void Solver::stabilizeTransport(double stabilization_factor, stabilizationType stabilization_type) { diff --git a/src/Solver.h b/src/Solver.h index fd8aecd09..65f177a95 100644 --- a/src/Solver.h +++ b/src/Solver.h @@ -508,6 +508,7 @@ class Solver { * @param fission_rates an array to store the fission rates (implicitly passed * in as a NumPy array from Python) * @param num_FSRs the number of FSRs passed in from Python + * @param nu whether to return nu-fission rates instead of fission rates */ virtual void computeFSRFissionRates(double* fission_rates, long num_FSRs, bool nu = false) =0; diff --git a/src/Surface.h b/src/Surface.h index 7cee742e7..ee7657d64 100644 --- a/src/Surface.h +++ b/src/Surface.h @@ -192,7 +192,7 @@ class Surface { bool isPointOnSurface(Point* point); bool isCoordOnSurface(LocalCoords* coord); - double getMinDistance(Point* point, double azim, double polar=M_PI_2); + double getMinDistance(Point* point, double azim, double polar); double getMinDistance(LocalCoords* coord); /** @@ -392,7 +392,6 @@ class ZCylinder: public Surface { * @param point a pointer to the Point of interest * @param azim the azimuthal angle defining the trajectory in radians * @param polar the polar angle defining the trajectory in radians - * @param intersection a pointer to a Point for storing the intersection * @return the minimum distance to the Surface */ inline double Surface::getMinDistance(Point* point, double azim, double polar) { diff --git a/src/Track.cpp b/src/Track.cpp index 11d363226..3c70a83ca 100644 --- a/src/Track.cpp +++ b/src/Track.cpp @@ -125,7 +125,7 @@ void Track::setSurfaceIn(int surface_in) { /** * @brief Set the surface at which the Track ends. - * @param surface_in surface at which the Track ends in the domain. + * @param surface_out surface at which the Track ends in the domain. */ void Track::setSurfaceOut(int surface_out) { _surface_out = surface_out; @@ -303,7 +303,7 @@ int Track::getLinkIndex() { /** * @brief Set a pointer to the reflective Track in the forward direction. - * @param track A pointer to the reflective track in the forward direction + * @param track_id the id of the reflective track in the forward direction */ void Track::setTrackNextFwd(long track_id) { _track_next_fwd = track_id; @@ -312,7 +312,7 @@ void Track::setTrackNextFwd(long track_id) { /** * @brief Set a pointer to the reflective Track in the backward direction. - * @param track A pointer to the reflective track in the backward direction + * @param track_id the id of the reflective track in the backward direction */ void Track::setTrackNextBwd(long track_id) { _track_next_bwd = track_id; @@ -321,7 +321,7 @@ void Track::setTrackNextBwd(long track_id) { /** * @brief Set a pointer to the periodic Track in the forward direction. - * @param track A pointer to the periodic track in the forward direction + * @param track_id the id of the periodic track in the forward direction */ void Track::setTrackPrdcFwd(long track_id) { _track_prdc_fwd = track_id; @@ -330,7 +330,7 @@ void Track::setTrackPrdcFwd(long track_id) { /** * @brief Set a pointer to the periodic Track in the backward direction. - * @param track A pointer to the periodic track in the backward direction + * @param track_id the id of the periodic track in the backward direction */ void Track::setTrackPrdcBwd(long track_id) { _track_prdc_bwd = track_id; @@ -339,7 +339,7 @@ void Track::setTrackPrdcBwd(long track_id) { /** * @brief Set a pointer to the reflective Track in the forward direction. - * @param track A pointer to the reflective track in the forward direction + * @param track_id the id of the reflective track in the forward direction */ void Track::setTrackReflFwd(long track_id) { _track_refl_fwd = track_id; @@ -348,7 +348,7 @@ void Track::setTrackReflFwd(long track_id) { /** * @brief Set a pointer to the reflective Track in the backward direction. - * @param track A pointer to the reflective track in the backward direction + * @param track_id the id of the reflective track in the backward direction */ void Track::setTrackReflBwd(long track_id) { _track_refl_bwd = track_id; @@ -357,7 +357,7 @@ void Track::setTrackReflBwd(long track_id) { /** * @brief Get a pointer to the reflective Track in the forward direction. - * @return A pointer to the reflective track in the forward direction + * @return the id of the reflective track in the forward direction */ long Track::getTrackNextFwd() { return _track_next_fwd; @@ -366,7 +366,7 @@ long Track::getTrackNextFwd() { /** * @brief Get a pointer to the reflective Track in the backward direction. - * @return A pointer to the reflective track in the backward direction + * @return the id of the reflective track in the backward direction */ long Track::getTrackNextBwd() { return _track_next_bwd; @@ -375,7 +375,7 @@ long Track::getTrackNextBwd() { /** * @brief Get a pointer to the periodic Track in the forward direction. - * @return A pointer to the periodic track in the forward direction + * @return the id of the periodic track in the forward direction */ long Track::getTrackPrdcFwd() { return _track_prdc_fwd; @@ -384,7 +384,7 @@ long Track::getTrackPrdcFwd() { /** * @brief Get a pointer to the periodic Track in the backward direction. - * @return A pointer to the periodic track in the backward direction + * @return the id of the periodic track in the backward direction */ long Track::getTrackPrdcBwd() { return _track_prdc_bwd; @@ -393,7 +393,7 @@ long Track::getTrackPrdcBwd() { /** * @brief Get a pointer to the reflective Track in the forward direction. - * @return A pointer to the reflective track in the forward direction + * @return the id of the reflective track in the forward direction */ long Track::getTrackReflFwd() { return _track_refl_fwd; @@ -402,7 +402,7 @@ long Track::getTrackReflFwd() { /** * @brief Get a pointer to the reflective Track in the backward direction. - * @return A pointer to the reflective track in the backward direction + * @return the id of the reflective track in the backward direction */ long Track::getTrackReflBwd() { return _track_refl_bwd; diff --git a/src/TrackGenerator.cpp b/src/TrackGenerator.cpp index 7c4060449..c76e6a9d7 100644 --- a/src/TrackGenerator.cpp +++ b/src/TrackGenerator.cpp @@ -890,8 +890,8 @@ void TrackGenerator::initializeDefaultQuadrature() { /** * @brief Calculates the least common multiple of two numbers a and b - * @param first number a - * @param second number b (order does not matter) + * @param a first number + * @param b second number (order does not matter) * @return the least common multiple of a and b */ double TrackGenerator::leastCommonMultiple(double a, double b) { diff --git a/src/TrackGenerator3D.cpp b/src/TrackGenerator3D.cpp index bbd14a0b0..cd8753b52 100644 --- a/src/TrackGenerator3D.cpp +++ b/src/TrackGenerator3D.cpp @@ -390,7 +390,7 @@ void TrackGenerator3D::setSegmentFormation(segmentationType segmentation_type) { /** * @brief Sets the z-planes over which 2D segmentation is performed for * on-the-fly calculations - * @param z_mesh the z-coordinates defining the height of the radial + * @param zones the z-coordinates defining the height of the radial * segmentation planes */ void TrackGenerator3D::setSegmentationZones(std::vector zones) { @@ -1857,7 +1857,7 @@ int TrackGenerator3D::getNum3DTrackChainLinks(TrackChainIndexes* tci) { * @brief Fills the provided 3D Track with its linking information. * @param tsi The stack indexes * @param tci The chain indexes - * @param tci outgoing A boolean indicating the direction of the Track + * @param outgoing A boolean indicating the direction of the Track * (True = forward, False = Backward) * @param track The 3D Track whose information is updated */ diff --git a/src/TrackTraversingAlgorithms.cpp b/src/TrackTraversingAlgorithms.cpp index 06bddfe51..3c05c8e8b 100644 --- a/src/TrackTraversingAlgorithms.cpp +++ b/src/TrackTraversingAlgorithms.cpp @@ -804,7 +804,7 @@ void LinearExpansionGenerator::onTrack(Track* track, segment* segments) { /** * @brief Constructor for TransportSweep calls the TraverseSegments * constructor and initializes the associated CPUSolver to NULL. - * @param track_generator The TrackGenerator to pull tracking information from + * @param cpu_solver The CPUSolver to use for propagating angular fluxes */ TransportSweep::TransportSweep(CPUSolver* cpu_solver) : TraverseSegments(cpu_solver->getTrackGenerator()) { @@ -1136,7 +1136,7 @@ void ReadSegments::execute() { /** * @brief Sets the input file to read in tracking information. - * @param in The input tracking file + * @param input the tracking file */ void ReadSegments::setInputFile(FILE* input) { _in = input; diff --git a/src/exponentials.h b/src/exponentials.h index c754b8b34..a853b228e 100644 --- a/src/exponentials.h +++ b/src/exponentials.h @@ -43,7 +43,7 @@ inline void expF1_poly(FP_PRECISION x, FP_PRECISION* expF1) { * polynomial approximation. It is accurate to 1e-5 over [0, 5]. It was * generated by Colin Josey using Remez's algorithm. * @param x the value at which to evaluate the function, usually tau - * @param expH a pointer to the exponential + * @param expF2 a pointer to the exponential */ inline void expF2_poly(FP_PRECISION x, FP_PRECISION* expF2) { @@ -105,7 +105,7 @@ inline void expH_poly(FP_PRECISION x, FP_PRECISION* expH) { * However, accuracy when reconstructing F1, F2 and H is lower. * It was generated by Colin Josey using Remez's algorithm. * @param x the value at which to evaluate the function, usually tau - * @param expH a pointer to the exponential + * @param expG a pointer to the exponential */ inline void expG_fractional(FP_PRECISION x, FP_PRECISION* expG) { @@ -151,7 +151,7 @@ inline void expG_fractional(FP_PRECISION x, FP_PRECISION* expG) { * rational approximation. It is accurate to 2e-6 over [0, 1e5]. * It was generated by Colin Josey using Remez's algorithm. * @param x the value at which to evaluate the function, usually tau - * @param expH a pointer to the exponential + * @param expF1 a pointer to the exponential */ inline void expF1_fractional(FP_PRECISION x, FP_PRECISION* expF1) { @@ -198,7 +198,7 @@ inline void expF1_fractional(FP_PRECISION x, FP_PRECISION* expF1) { * rational approximation. It is accurate to 2e-6 over [0, 1e5]. * It was generated by Colin Josey using Remez's algorithm. * @param x the value at which to evaluate the function, usually tau - * @param expH a pointer to the exponential + * @param expF2 a pointer to the exponential */ inline void expF2_fractional(FP_PRECISION x, FP_PRECISION* expF2) { diff --git a/src/linalg.cpp b/src/linalg.cpp index f3d71bd17..0801de4c0 100644 --- a/src/linalg.cpp +++ b/src/linalg.cpp @@ -15,6 +15,7 @@ * @param A the loss + streaming Matrix object * @param M the fission gain Matrix object * @param X the flux Vector object + * @param k_eff initial k_effective * @param tol the power method and linear solve source convergence threshold * @param SOR_factor the successive over-relaxation factor * @param convergence_data a summary of how to solver converged @@ -371,7 +372,7 @@ bool linearSolve(Matrix* A, Matrix* M, Vector* X, Vector* B, double tol, } - +#ifdef MPIx /** * @brief Get coupling fluxes and other information from neighbors. * The information are transfered by reference. @@ -387,7 +388,6 @@ bool linearSolve(Matrix* A, Matrix* M, Vector* X, Vector* B, double tol, * @param offset Sum of the starting CMFD global indexes of a domain, for * calculation of the color */ -#ifdef MPIx void getCouplingTerms(DomainCommunicator* comm, int color, int*& coupling_sizes, int**& coupling_indexes, CMFD_PRECISION**& coupling_coeffs, CMFD_PRECISION**& coupling_fluxes,