Skip to content

Commit

Permalink
style changes required by code pre-check and removing wasp Refs #28891
Browse files Browse the repository at this point in the history
  • Loading branch information
tanoret committed Oct 28, 2024
1 parent 05c8cfe commit 149d840
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion framework/contrib/wasp
Submodule wasp updated from 42b77e to c8c9ce
2 changes: 1 addition & 1 deletion framework/include/limiters/Limiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Limiter
virtual InterpMethod interpMethod() const = 0;

/**
* @brief Functor for applying tsimplified slope limiting.
* @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
Expand Down
19 changes: 10 additions & 9 deletions framework/include/utils/MathFVUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,16 @@ interpolate(const Limiter<Scalar> & limiter,
const FaceInfo & fi,
const bool fi_elem_is_upwind)
{
auto pr = interpCoeffs(limiter,
phi_upwind,
phi_downwind,
grad_phi_upwind,
/*grad_phi_face*/ static_cast<const libMesh::VectorValue<Scalar>*>(nullptr),
/* max_value */ Scalar(0.0),
/* min_value */ Scalar(0.0),
fi,
fi_elem_is_upwind);
auto pr =
interpCoeffs(limiter,
phi_upwind,
phi_downwind,
grad_phi_upwind,
/*grad_phi_face*/ static_cast<const libMesh::VectorValue<Scalar> *>(nullptr),
/* max_value */ Scalar(0.0),
/* min_value */ Scalar(0.0),
fi,
fi_elem_is_upwind);
return pr.first * phi_upwind + pr.second * phi_downwind;
}

Expand Down
10 changes: 6 additions & 4 deletions framework/src/fvbcs/FVFunctorDirichletBC.C
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ FVFunctorDirichletBCTempl<is_ad>::boundaryValue(const FaceInfo & fi) const
if (!_use_other_side)
return _functor(sfa, determineState());
else if (fi.elemPtr() == sfa.face_side)
return _functor({&fi, Moose::FV::LimiterType::CentralDifference, true, false, fi.neighborPtr(), nullptr},
determineState());
return _functor(
{&fi, Moose::FV::LimiterType::CentralDifference, true, false, fi.neighborPtr(), nullptr},
determineState());
else
return _functor({&fi, Moose::FV::LimiterType::CentralDifference, true, false, fi.elemPtr(), nullptr},
determineState());
return _functor(
{&fi, Moose::FV::LimiterType::CentralDifference, true, false, fi.elemPtr(), nullptr},
determineState());
}

template class FVFunctorDirichletBCTempl<false>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ WCNSFV2PMomentumAdvectionSlip::computeResidualsAndAData(const FaceInfo & fi)
if (on_boundary)
face_arg = singleSidedFaceArg();
else
face_arg = Moose::FaceArg{&fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};
face_arg = Moose::FaceArg{
&fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};

ADRealVectorValue u_slip_vel_vec;
if (_dim == 1)
Expand Down Expand Up @@ -118,8 +119,12 @@ WCNSFV2PMomentumAdvectionSlip::computeResidualsAndAData(const FaceInfo & fi)
else // we are an internal fluid flow face
{
const bool elem_is_upwind = MetaPhysicL::raw_value(u_slip_vel_vec) * _normal > 0;
const Moose::FaceArg advected_face_arg{
&fi, limiterType(_advected_interp_method), elem_is_upwind, correct_skewness, nullptr, nullptr};
const Moose::FaceArg advected_face_arg{&fi,
limiterType(_advected_interp_method),
elem_is_upwind,
correct_skewness,
nullptr,
nullptr};
if (const auto [is_jump, eps_elem_face, eps_neighbor_face] =
NS::isPorosityJumpFace(epsilon(), fi, state);
is_jump)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ IntegralDirectedSurfaceForce::computeFaceInfoIntegral(const FaceInfo * fi)
mooseAssert(fi, "We should have a face info in " + name());

const auto state = determineState();
const auto face_arg =
Moose::FaceArg({fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr});
const auto face_arg = Moose::FaceArg(
{fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr});
const auto elem_arg = Moose::ElemArg({fi->elemPtr(), false});

RealTensorValue pressure_term;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,12 @@ INSFVRhieChowInterpolator::getVelocity(const Moose::FV::InterpMethod m,
if (Moose::FV::onBoundary(*this, fi))
{
const Elem * const boundary_elem = hasBlocks(elem->subdomain_id()) ? elem : neighbor;
const Moose::FaceArg boundary_face{
&fi, Moose::FV::LimiterType::CentralDifference, true, correct_skewness, boundary_elem, nullptr};
const Moose::FaceArg boundary_face{&fi,
Moose::FV::LimiterType::CentralDifference,
true,
correct_skewness,
boundary_elem,
nullptr};
auto velocity = vel(boundary_face, time);
incorporate_mesh_velocity(boundary_face, velocity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ BernoulliPressureVariable::elemIsUpwind(const Elem & elem,
const FaceInfo & fi,
const Moose::StateArg & time) const
{
const Moose::FaceArg face{&fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};
const Moose::FaceArg face{
&fi, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};

const VectorValue<ADReal> vel_face{(*_u)(face, time), (*_v)(face, time), (*_w)(face, time)};
const bool fi_elem_is_upwind = vel_face * fi.normal() > 0;
Expand Down

0 comments on commit 149d840

Please sign in to comment.