23 "Harmonic mean interpolation for finite-volume quantities using FaceInfo geometry weights.");
33 const Real elem_value,
34 const Real neighbor_value)
const
37 "Harmonic interpolation is intended for internal faces with a neighbor.");
40 (elem_value >= 0 && neighbor_value >= 0) || (elem_value <= 0 && neighbor_value <= 0),
41 "Harmonic interpolation requires the element and neighbor values to have the same sign.");
43 const Real gc = face.
gC();
44 const Real one_minus_gc = 1.0 - gc;
47 const auto safe = [](
const Real value)
50 const Real eps = std::numeric_limits<Real>::min();
51 return std::copysign(std::max(std::abs(value), eps), value);
55 const Real denom = gc / safe(elem_value) + one_minus_gc / safe(neighbor_value);
registerMooseObject("MooseApp", FVHarmonicAverage)
Harmonic-mean interpolation using the geometric weighting stored on FaceInfo.
Real interpolate(const FaceInfo &face, Real elem_value, Real neighbor_value) const override
Face interpolation operation for this method.
static InputParameters validParams()
FVHarmonicAverage(const InputParameters ¶ms)
Registered base class for linear FV interpolation objects.
static InputParameters validParams()
This data structure is used to store geometric and variable related metadata about each cell face in ...
const Elem * neighborPtr() const
Real gC() const
Return the geometric weighting factor.