Skip to content

Commit

Permalink
addressing guiallaume's code-reviewer comments Refs #28891
Browse files Browse the repository at this point in the history
  • Loading branch information
tanoret committed Nov 13, 2024
1 parent a4d9c2c commit 62c7796
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 89 deletions.
15 changes: 2 additions & 13 deletions framework/include/limiters/Limiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ class Limiter
* @brief Functor for applying simplified slope limiting.
*
* This function applies the limiter by invoking the `limit` method with the provided parameters.
* It acts as a functor, enabling objects of the `VanLeerLimiter` class to be used as if they were
* functions.
* It acts as a functor, enabling objects of the derived `Limiter` class to be used as if they
* were functions.
*
* @tparam T The data type of the scalar values and the return type.
* @param phi_upwind The scalar value at the upwind location.
Expand Down Expand Up @@ -307,17 +307,6 @@ class Limiter
*
* @note The small epsilon value `1e-10` is added to the delta max and delta min values to
* avoid division by zero and numerical instability.
*
* @example
* @code
* Real phi_upwind = 2.0;
* VectorValue<Real> grad_upwind(0.1, 0.2, 0.3);
* Real max_value = 5.0;
* Real min_value = 1.0;
* FaceInfo * fi = ... // Assume this is properly initialized
* bool is_upwind = true;
* Real ratio = rf_minmax(phi_upwind, &grad_upwind, max_value, min_value, fi, is_upwind);
* @endcode
*/
T rf_minmax(const T & phi_upwind,
const VectorValue<T> * grad_phi_upwind,
Expand Down
14 changes: 0 additions & 14 deletions framework/include/limiters/MinModLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,8 @@ class MinModLimiter : public Limiter<T>
return 0 * r_f + std::max(T(0), std::min(T(1), r_f));
}

/**
* @brief Indicates whether the Min-Mod limiter is constant.
*
* This method always returns `false` as the Min-Mod limiter is not a constant limiter.
*
* @return `false` indicating the Min-Mod limiter is not constant.
*/
bool constant() const override final { return false; }

/**
* @brief Returns the interpolation method used by the Min-Mod limiter.
*
* This method returns `InterpMethod::MinMod`, indicating the interpolation method used.
*
* @return The interpolation method `InterpMethod::MinMod`.
*/
InterpMethod interpMethod() const override final { return InterpMethod::MinMod; }

/**
Expand Down
14 changes: 0 additions & 14 deletions framework/include/limiters/QUICKLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,8 @@ class QUICKLimiter : public Limiter<T>
return limiter;
}

/**
* @brief Indicates whether the QUICK limiter is constant.
*
* This method always returns `false` as the QUICK limiter is not a constant limiter.
*
* @return `false` indicating the QUICK limiter is not constant.
*/
bool constant() const override final { return false; }

/**
* @brief Returns the interpolation method used by the QUICK limiter.
*
* This method returns `InterpMethod::QUICK`, indicating the interpolation method used.
*
* @return The interpolation method `InterpMethod::QUICK`.
*/
InterpMethod interpMethod() const override final { return InterpMethod::QUICK; }

/**
Expand Down
14 changes: 0 additions & 14 deletions framework/include/limiters/SOULimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,8 @@ class SOULimiter : public Limiter<T>
return limiter;
}

/**
* @brief Indicates whether the SOU limiter is constant.
*
* This method always returns `false` as the SOU limiter is not a constant limiter.
*
* @return `false` indicating the SOU limiter is not constant.
*/
bool constant() const override final { return false; }

/**
* @brief Returns the interpolation method used by the SOU limiter.
*
* This method returns `InterpMethod::SOU`, indicating the interpolation method used.
*
* @return The interpolation method `InterpMethod::SOU`.
*/
InterpMethod interpMethod() const override final { return InterpMethod::SOU; }

/**
Expand Down
14 changes: 0 additions & 14 deletions framework/include/limiters/VanLeerLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,8 @@ class VanLeerLimiter : public Limiter<T>
return (r_f + std::abs(r_f)) / (1.0 + std::abs(r_f));
}

/**
* @brief Indicates whether the Van Leer limiter is constant.
*
* This method always returns `false` as the Van Leer limiter is not a constant limiter.
*
* @return `false` indicating the Van Leer limiter is not constant.
*/
bool constant() const override final { return false; }

/**
* @brief Returns the interpolation method used by the Van Leer limiter.
*
* This method returns `InterpMethod::VanLeer`, indicating the interpolation method used.
*
* @return The interpolation method `InterpMethod::VanLeer`.
*/
InterpMethod interpMethod() const override final { return InterpMethod::VanLeer; }

/**
Expand Down
16 changes: 1 addition & 15 deletions framework/include/limiters/VenkatakrishnanLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace FV
* \end{cases}
* \f]
*
* 4. Venkatakrishnan limiter formula:
* 4. Venkatakrishnan limiter formula (Venkatakrishnan, 1993):
* \f[
* \beta(r_f) = \frac{2 r_f + 1.0}{r_f (2 r_f + 1.0) + 1.0}
* \f]
Expand Down Expand Up @@ -113,22 +113,8 @@ class VenkatakrishnanLimiter : public Limiter<T>
return (2 * rf + 1.0) / (rf * (2 * rf + 1.0) + 1.0);
}

/**
* @brief Indicates whether the Venkatakrishnan limiter is constant.
*
* This method always returns `false` as the Venkatakrishnan limiter is not a constant limiter.
*
* @return `false` indicating the Venkatakrishnan limiter is not constant.
*/
bool constant() const override final { return false; }

/**
* @brief Returns the interpolation method used by the Venkatakrishnan limiter.
*
* This method returns `InterpMethod::SOU`, indicating the interpolation method used.
*
* @return The interpolation method `InterpMethod::SOU`.
*/
InterpMethod interpMethod() const override final { return InterpMethod::SOU; }

/**
Expand Down
8 changes: 4 additions & 4 deletions framework/include/utils/MathFVUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ computeMinMaxValue(const FunctorBase<T> & functor, const FaceArg & face, const S
Real max_value(std::numeric_limits<Real>::min()), min_value(std::numeric_limits<Real>::max());

// Iterate over the direct neighbors of the element associated with the face
for (auto neighbor : (*face.fi).elem().neighbor_ptr_range())
for (const auto neighbor : (*face.fi).elem().neighbor_ptr_range())
{
// If not a valid neighbor, skip to the next one
if (neighbor == nullptr)
Expand All @@ -694,7 +694,7 @@ computeMinMaxValue(const FunctorBase<T> & functor, const FaceArg & face, const S
}

// Iterate over the neighbors of the neighbor
for (auto neighbor : (*face.fi).neighbor().neighbor_ptr_range())
for (const auto neighbor : (*face.fi).neighbor().neighbor_ptr_range())
{
// If not a valid neighbor, skip to the next one
if (neighbor == nullptr)
Expand Down Expand Up @@ -761,7 +761,7 @@ computeMinMaxValue(const FunctorBase<VectorValue<T>> & functor,
Real max_value(std::numeric_limits<Real>::min()), min_value(std::numeric_limits<Real>::max());

// Iterate over the direct neighbors of the element associated with the face
for (auto neighbor : (*face.fi).elem().neighbor_ptr_range())
for (const auto neighbor : (*face.fi).elem().neighbor_ptr_range())
{
// If not a valid neighbor, skip to the next one
if (neighbor == nullptr)
Expand All @@ -776,7 +776,7 @@ computeMinMaxValue(const FunctorBase<VectorValue<T>> & functor,
}

// Iterate over the neighbors of the neighbor associated with the face
for (auto neighbor : (*face.fi).neighbor().neighbor_ptr_range())
for (const auto neighbor : (*face.fi).neighbor().neighbor_ptr_range())
{
// If not a valid neighbor, skip to the next one
if (neighbor == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion framework/include/variables/MooseVariableFV.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class MooseVariableFV : public MooseVariableField<OutputType>
const Elem * elem_side_to_extrapolate_from,
const StateArg & state) const;

/// Function to get the two term boundary expansion for the variable
/// Function to get wether two term boundary expansion is used for the variable
const bool & getTwoTermBoundaryExpansion() const { return _two_term_boundary_expansion; }

protected:
Expand Down

0 comments on commit 62c7796

Please sign in to comment.