@@ -14,7 +14,7 @@ namespace bulkGeneric
1414{
1515
1616/* *
17- * @brief This class implements components required to calculate equilibrium
17+ * @brief This class implements components required to calculate equilibrium
1818 * reactions for a given set of species. The class also proovides
1919 * device callable methods to enforce equilibrium pointwise and also
2020 * provides methods to launch batch processing of material points.
@@ -33,26 +33,25 @@ class EquilibriumReactions
3333
3434 // / alias for type of the integers used in the class.
3535 using IntType = INT_TYPE;
36-
36+
3737 // / alias for type of the indices used in the class.
3838 using IndexType = INDEX_TYPE;
3939
40- template < typename PARAMS_DATA,
41- typename ARRAY_1D,
42- typename ARRAY_1D_TO_CONST,
43- typename ARRAY_1D_TO_CONST2,
44- typename ARRAY_2D >
45- static HPCREACT_HOST_DEVICE void
46- computeResidualAndJacobian ( RealType const & temperature,
47- PARAMS_DATA const & params,
48- ARRAY_1D_TO_CONST const & speciesConcentration0,
49- ARRAY_1D_TO_CONST2 const & xi,
50- ARRAY_1D & residual,
51- ARRAY_2D & jacobian );
40+
5241
5342 /* *
54- * @brief This method enforces equilibrium for a given set of species using
43+ * @brief This method enforces equilibrium for a given set of species using
5544 * reaction extents.
45+ * @param temperature The temperature of the system.
46+ * @param params The parameters for the equilibrium reactions.
47+ * @param speciesConcentration0 The initial species concentrations.
48+ * @param speciesConcentration The species concentrations to be updated.
49+ * @details This method uses the reaction extents to enforce equilibrium
50+ * for a given set of species. It uses the computeResidualAndJacobian
51+ * method to compute the residual and jacobian for the system and
52+ * then uses a direct solver to solve the system. The solution is
53+ * then used to update the species concentrations.
54+ */
5655 template < typename PARAMS_DATA,
5756 typename ARRAY_1D,
5857 typename ARRAY_1D_TO_CONST >
@@ -63,6 +62,20 @@ class EquilibriumReactions
6362 ARRAY_1D_TO_CONST const & speciesConcentration0,
6463 ARRAY_1D & speciesConcentration );
6564
65+ /* *
66+ * @brief This method enforces equilibrium for a given set of species using
67+ * aggregate primary concentrations.
68+ * @param temperature The temperature of the system.
69+ * @param params The parameters for the equilibrium reactions.
70+ * @param speciesConcentration0 The initial species concentrations.
71+ * @param speciesConcentration The species concentrations to be updated.
72+ * @details This method uses the aggregate primary concentrations to enforce
73+ * equilibrium for a given set of species. It uses the
74+ * computeResidualAndJacobianAggregatePrimaryConcentrations method to
75+ * compute the residual and jacobian for the system and then uses a
76+ * direct solver to solve the system. The solution is then used to
77+ * update the species concentrations.
78+ */
6679 template < typename PARAMS_DATA,
6780 typename ARRAY_1D,
6881 typename ARRAY_1D_TO_CONST >
@@ -73,7 +86,21 @@ class EquilibriumReactions
7386 ARRAY_1D_TO_CONST const & speciesConcentration0,
7487 ARRAY_1D & speciesConcentration );
7588
76- private:
89+ /* *
90+ * @brief This method computes the residual and jacobian when using reaction extents to solve
91+ * for the equilibrium of a given set of species.
92+ * @tparam PARAMS_DATA The type of the parameters data.
93+ * @tparam ARRAY_1D The type of the array of species concentrations.
94+ * @tparam ARRAY_1D_TO_CONST The type of the array of species concentrations.
95+ * @tparam ARRAY_1D_TO_CONST2 The type of the array of reaction extents.
96+ * @tparam ARRAY_2D The type of the array of jacobian.
97+ * @param temperature The temperature of the system.
98+ * @param params The parameters for the equilibrium reactions.
99+ * @param speciesConcentration0 The initial species concentrations.
100+ * @param xi The reaction extents.
101+ * @param residual The residual.
102+ * @param jacobian The jacobian.
103+ */
77104 template < typename PARAMS_DATA,
78105 typename ARRAY_1D,
79106 typename ARRAY_1D_TO_CONST,
@@ -87,6 +114,21 @@ class EquilibriumReactions
87114 ARRAY_1D & residual,
88115 ARRAY_2D & jacobian );
89116
117+ /* *
118+ * @brief This method computes the residual and jacobian when using aggregate primary concentrations
119+ * to solve for the equilibrium of a given set of species.
120+ * @tparam PARAMS_DATA The type of the parameters data.
121+ * @tparam ARRAY_1D The type of the array of species concentrations.
122+ * @tparam ARRAY_1D_TO_CONST The type of the array of target aggregate primary concentrations.
123+ * @tparam ARRAY_1D_TO_CONST The type of the array of log primary species concentrations.
124+ * @tparam ARRAY_2D The type of the array of jacobian.
125+ * @param temperature The temperature of the system.
126+ * @param params The parameters for the equilibrium reactions.
127+ * @param targetAggregatePrimaryConcentrations The target aggregate primary concentrations.
128+ * @param logPrimarySpeciesConcentration The log of the primary species concentrations.
129+ * @param residual The residual.
130+ * @param jacobian The jacobian.
131+ */
90132 template < typename PARAMS_DATA,
91133 typename ARRAY_1D,
92134 typename ARRAY_1D_TO_CONST,
0 commit comments