Skip to content

Commit e06483a

Browse files
committed
setup doxygen
1 parent 7bc1f24 commit e06483a

File tree

7 files changed

+5337
-2
lines changed

7 files changed

+5337
-2
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ target_include_directories( hpcReact
5454
add_subdirectory( reactions/bulkDebyeHuckel/unitTests )
5555
add_subdirectory( reactions/bulkGeneric/unitTests )
5656
add_subdirectory( common/unitTests )
57-
57+
add_subdirectory( docs )
5858

5959
HPCReact_add_code_checks( PREFIX hpcReact
6060
UNCRUSTIFY_CFG_FILE ${PROJECT_SOURCE_DIR}/src/uncrustify.cfg
6161
EXCLUDES "blt/*" )
62+

src/docs/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if(DOXYGEN_FOUND)
2+
add_subdirectory(doxygen)
3+
endif()

src/docs/doxygen/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blt_add_doxygen_target( hpcreact_doxygen )
2+

src/docs/doxygen/Doxyfile.in

Lines changed: 2884 additions & 0 deletions
Large diffs are not rendered by default.

src/docs/doxygen/Doxyfile.in.geos

Lines changed: 2399 additions & 0 deletions
Large diffs are not rendered by default.

src/reactions/bulkGeneric/KineticReactions.hpp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
#include "common/macros.hpp"
44

5+
/** @file KineticReactions.hpp
6+
* @brief Header file for the KineticReactions class.
7+
* @author HPC-REACT Team
8+
* @date 2023
9+
*/
10+
511
namespace hpcReact
612
{
713
namespace bulkGeneric
@@ -21,6 +27,9 @@ class KineticReactions
2127
using IntType = INT_TYPE;
2228
using IndexType = INDEX_TYPE;
2329

30+
/**
31+
* @copydoc KineticReactions::computeReactionRates_impl()
32+
*/
2433
template< typename PARAMS_DATA,
2534
typename ARRAY_1D_TO_CONST,
2635
typename ARRAY_1D,
@@ -107,6 +116,36 @@ class KineticReactions
107116

108117

109118
private:
119+
120+
/**
121+
* @brief Compute the reaction rates for a given set of species concentrations.
122+
* @tparam PARAMS_DATA The type of the parameters data.
123+
* @tparam CALCULATE_DERIVATIVES Whether to calculate the derivatives of the reaction rates with respect to the species concentrations.
124+
* @tparam ARRAY_1D_TO_CONST The type of the array of species concentrations.
125+
* @tparam ARRAY_1D The type of the array of reaction rates.
126+
* @tparam ARRAY_2D The type of the array of reaction rates derivatives.
127+
* @param temperature The temperature of the system.
128+
* @param params The parameters data.
129+
* @param speciesConcentration The array of species concentrations.
130+
* @param reactionRates The array of reaction rates.
131+
* @param reactionRatesDerivatives The array of reaction rates derivatives.
132+
* @details
133+
* This function computes the reaction rates for a given set of reactions.
134+
* If CALCULATE_DERIVATIVES is true, it also computes the derivatives of the reaction rates with respect to the species concentrations.
135+
*
136+
* The expression for the reaction rate ( \f$ \dot{R}_r \f$ ) for reaction \f$ r \f$ is given by:
137+
* \f[
138+
\dot{R}_r = k^f_{r} \prod_{ \mathclap{ \substack{ i = 1,...,N_s \\ \nu_{ri} < 0 } } } [C_i]^{-\nu_{ri}}
139+
- k^r_{r} \prod_{ \mathclap{ \substack{ i = 1,...,N_s \\ \nu_{ri} > 0 } } } [C_i]^{\nu_{ri}}
140+
* \f]
141+
*
142+
* The expression for the derivative of the reaction rate ( \f$ \frac{d\dot{R}_r}{dC_i} \f$ ) for reaction \f$ r \f$ is given by:
143+
* \f[
144+
* \frac{\partial \dot{R}_r}{ \partial [C]_i } =
145+
* k^f_{r} \left( -\nu_{ri} [C_i]^{-\nu_{ri}-1 } \prod_{ \mathclap{ \substack{ j = 1,...,N_s \\ \nu_{rj} < 0, j \ne i } } } [C_j]^{-\nu_{rj}} \right )
146+
* - k^r_{r} \left( \nu_{ri} [C_i]^{ \nu_{ri}-1 } \prod_{ \mathclap{ \substack{ j = 1,...,N_s \\ \nu_{rj} > 0, j \ne i } } } [C_j]^{\nu_{rj}} \right )
147+
* \f]
148+
*/
110149
template< typename PARAMS_DATA,
111150
bool CALCULATE_DERIVATIVES,
112151
typename ARRAY_1D_TO_CONST,

src/reactions/bulkGeneric/KineticReactions_impl.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@
88
#include <string>
99
#include <iostream>
1010

11+
/** @file KineticReactions_impl.hpp
12+
* @brief Header file for the KineticReactions implementation.
13+
* @author HPC-REACT Team
14+
* @date 2023
15+
*/
16+
1117
namespace hpcReact
1218
{
1319
namespace bulkGeneric
1420
{
1521

22+
1623
template< typename REAL_TYPE,
1724
typename INT_TYPE,
1825
typename INDEX_TYPE >
@@ -37,7 +44,7 @@ KineticReactions< REAL_TYPE,
3744
HPCREACT_UNUSED_VAR( reactionRatesDerivatives );
3845
}
3946

40-
47+
// loop over each reaction
4148
for( IntType r=0; r<PARAMS_DATA::numReactions; ++r )
4249
{
4350
reactionRates[r] = 0.0;

0 commit comments

Comments
 (0)