From dc527f60db54e1d3943dfdcdfbbcde39618e7029 Mon Sep 17 00:00:00 2001 From: Peter German Date: Wed, 27 Sep 2023 13:54:01 -0600 Subject: [PATCH] Remove unused variables, clean up source code. (#25599) --- framework/include/fviks/FVInterfaceKernel.h | 6 ------ framework/src/fviks/FVInterfaceKernel.C | 7 ------- framework/src/fviks/FVScalarLagrangeMultiplierInterface.C | 2 +- test/src/fviks/FVOnlyAddDiffusionToOneSideOfInterface.C | 2 +- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/framework/include/fviks/FVInterfaceKernel.h b/framework/include/fviks/FVInterfaceKernel.h index f27171f08905..ff6ad444a88b 100644 --- a/framework/include/fviks/FVInterfaceKernel.h +++ b/framework/include/fviks/FVInterfaceKernel.h @@ -99,12 +99,6 @@ class FVInterfaceKernel : public MooseObject, */ const std::set & sub2() const { return _subdomain2; } - /** - * @return The system associated with this object. Either an undisplaced or displaced nonlinear - * system - */ - const SystemBase & sys() const { return _var1.sys(); } - /** * @return Whether the \p FaceInfo element is on the 1st side of the interface */ diff --git a/framework/src/fviks/FVInterfaceKernel.C b/framework/src/fviks/FVInterfaceKernel.C index 206e2e2dbfcc..cf5c0ce883fc 100644 --- a/framework/src/fviks/FVInterfaceKernel.C +++ b/framework/src/fviks/FVInterfaceKernel.C @@ -204,13 +204,6 @@ FVInterfaceKernel::computeJacobian(const FaceInfo & fi) { setupData(fi); - const auto & elem_dof_indices = _elem_is_one ? _var1.dofIndices() : _var2.dofIndices(); - const auto & neigh_dof_indices = - _elem_is_one ? _var2.dofIndicesNeighbor() : _var1.dofIndicesNeighbor(); - - mooseAssert((elem_dof_indices.size() == 1) && (neigh_dof_indices.size() == 1), - "We're currently built to use CONSTANT MONOMIALS"); - const auto r = fi.faceArea() * fi.faceCoord() * computeQpResidual(); addResidualsAndJacobian(_assembly, diff --git a/framework/src/fviks/FVScalarLagrangeMultiplierInterface.C b/framework/src/fviks/FVScalarLagrangeMultiplierInterface.C index 5f66c6fe7c7b..63e7db8422d9 100644 --- a/framework/src/fviks/FVScalarLagrangeMultiplierInterface.C +++ b/framework/src/fviks/FVScalarLagrangeMultiplierInterface.C @@ -28,7 +28,7 @@ FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface( _lambda_var(*getScalarVar("lambda", 0)), _lambda(adCoupledScalarValue("lambda")) { - if (_var1.sys().number() != _var2.sys().number()) + if (var1().sys().number() != var2().sys().number()) mooseError(this->type(), " does not support multiple nonlinear systems!"); } diff --git a/test/src/fviks/FVOnlyAddDiffusionToOneSideOfInterface.C b/test/src/fviks/FVOnlyAddDiffusionToOneSideOfInterface.C index d40663c794f6..125c10a174f3 100644 --- a/test/src/fviks/FVOnlyAddDiffusionToOneSideOfInterface.C +++ b/test/src/fviks/FVOnlyAddDiffusionToOneSideOfInterface.C @@ -27,7 +27,7 @@ FVOnlyAddDiffusionToOneSideOfInterface::FVOnlyAddDiffusionToOneSideOfInterface( const InputParameters & params) : FVInterfaceKernel(params), _coeff2(getFunctor("coeff2")) { - if (_var1.sys().number() != _var2.sys().number()) + if (var1().sys().number() != var2().sys().number()) mooseError(this->type(), " does not support multiple nonlinear systems!"); }