Skip to content

Commit

Permalink
Fix CUDE compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dkachuma committed Aug 16, 2024
1 parent 04feb3e commit 87f92ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,16 @@ The flash calculation process is as follows:
#. These phase compositions are then used to calculate the component fugacities :math:`\phi_{iL}` and :math:`\phi_{iV}` in the liquid and vapor phases using the equation of state.

#. Convergence is reached when the fugacities are equal for all components. The convergence criterion is defined as:
.. math::
\sum_{i=1}^{N_c} \left( \phi_{iL} - \phi_{iV} \right)^2 < \varepsilon

.. math::
\sum_{i=1}^{N_c} \left( \phi_{iL} - \phi_{iV} \right)^2 < \varepsilon
where :math:`\varepsilon` is the convergence tolerance.

#. If convergence is not achieved, successive substitution is used to update the set of K-values for the next iteration. The new K-values at iteration :math:`t+1` are given by:
.. math::
K_i^{(t+1)} = K_i^{(t)} \frac{\phi_{iL}}{\phi_{iV}}

.. math::
K_i^{(t+1)} = K_i^{(t)} \frac{\phi_{iL}}{\phi_{iV}}
Parameters
=========================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct StabilityTest
* @param[out] kValues the k-values estimated from the stationary points
* @return a flag indicating that 2 stationary points have been found
*/
template< integer USD1 >
template< integer USD1, integer USD2 >
GEOS_HOST_DEVICE
static bool compute( integer const numComps,
real64 const pressure,
Expand All @@ -61,7 +61,7 @@ struct StabilityTest
ComponentProperties::KernelWrapper const & componentProperties,
EquationOfStateType const & equationOfState,
real64 & tangentPlaneDistance,
arraySlice1d< real64 > const & kValues )
arraySlice1d< real64, USD2 > const & kValues )
{
constexpr integer numTrials = 2; // Trial compositions
stackArray2d< real64, 4*maxNumComps > workSpace( 4, numComps );
Expand Down

0 comments on commit 87f92ee

Please sign in to comment.