Skip to content

Commit

Permalink
Fix min gcc, clang and rocky issues. (#25722)
Browse files Browse the repository at this point in the history
  • Loading branch information
grmnptr committed Jan 29, 2024
1 parent 8d6ca03 commit f815da4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions framework/include/variables/MooseLinearVariableFV.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ template <typename OutputType>
typename MooseLinearVariableFV<OutputType>::ValueType
MooseLinearVariableFV<OutputType>::evaluate(const ElemArg & elem_arg, const StateArg & state) const
{
const auto elem_info = &_mesh.elemInfo(elem_arg.elem->id());
const auto elem_info = &this->_mesh.elemInfo(elem_arg.elem->id());
return getElemValue(elem_info, state);
}

Expand All @@ -626,15 +626,15 @@ typename MooseLinearVariableFV<OutputType>::ValueType
MooseLinearVariableFV<OutputType>::evaluate(const ElemPointArg & elem_point,
const StateArg & state) const
{
const auto elem_info = &_mesh.elemInfo(elem_point.elem->id());
const auto elem_info = &this->_mesh.elemInfo(elem_point.elem->id());
return getElemValue(elem_info, state);
}

template <typename OutputType>
typename MooseLinearVariableFV<OutputType>::ValueType
MooseLinearVariableFV<OutputType>::evaluate(const ElemQpArg & elem_qp, const StateArg & state) const
{
const auto elem_info = &_mesh.elemInfo(elem_qp.elem->id());
const auto elem_info = &this->_mesh.elemInfo(elem_qp.elem->id());
return getElemValue(elem_info, state);
}

Expand All @@ -651,7 +651,7 @@ typename MooseLinearVariableFV<OutputType>::GradientType
MooseLinearVariableFV<OutputType>::evaluateGradient(const ElemQpArg & qp_arg,
const StateArg & /*state*/) const
{
const auto & elem_info = &_mesh.elemInfo(qp_arg.elem->id());
const auto & elem_info = &this->_mesh.elemInfo(qp_arg.elem->id());
return gradSln(elem_info);
}

Expand All @@ -660,7 +660,7 @@ typename MooseLinearVariableFV<OutputType>::GradientType
MooseLinearVariableFV<OutputType>::evaluateGradient(const ElemArg & elem_arg,
const StateArg & /*state*/) const
{
const auto & elem_info = &_mesh.elemInfo(elem_arg.elem->id());
const auto & elem_info = &this->_mesh.elemInfo(elem_arg.elem->id());
return gradSln(elem_info);
}

Expand Down
5 changes: 2 additions & 3 deletions framework/src/loops/ComputeLinearFVElementalThread.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ComputeLinearFVElementalThread::operator()(const ElemInfoRange & range)
ParallelUniqueId puid;
_tid = puid.id;

_subdomain = Moose::INVALID_BLOCK_ID;
_old_subdomain = Moose::INVALID_BLOCK_ID;

// Iterate over all the elements in the range
for (const auto & elem_info : range)
Expand All @@ -63,8 +63,6 @@ ComputeLinearFVElementalThread::operator()(const ElemInfoRange & range)
kernel->addRightHandSideContribution();
}
}

_old_subdomain = _subdomain;
}

void
Expand All @@ -89,6 +87,7 @@ ComputeLinearFVElementalThread::fetchSystemContributionObjects()
base_query.condition<AttribMatrixTags>(_tags).queryInto(kernels);
else
base_query.condition<AttribVectorTags>(_tags).queryInto(kernels);
_old_subdomain = _subdomain;

_fv_kernels = std::set<LinearFVElementalKernel *>(kernels.begin(), kernels.end());
}
4 changes: 2 additions & 2 deletions framework/src/loops/ComputeLinearFVFaceThread.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ ComputeLinearFVFaceThread::operator()(const FaceInfoRange & range)
ParallelUniqueId puid;
_tid = puid.id;

_subdomain = Moose::INVALID_BLOCK_ID;
_neighbor_subdomain = Moose::INVALID_BLOCK_ID;
_old_subdomain = Moose::INVALID_BLOCK_ID;
_old_neighbor_subdomain = Moose::INVALID_BLOCK_ID;

// Iterate over all the elements in the range
for (const auto & face_info : range)
Expand Down
11 changes: 6 additions & 5 deletions framework/src/variables/MooseLinearVariableFV.C
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ MooseLinearVariableFV<OutputType>::getElemValue(const ElemInfo * const elem_info
? *this->_sys.currentSolution()
: this->_sys.solutionState(state.state, state.iteration_type);

return global_soln(elem_info->dofIndices()[_sys.number()][this->number()]);
return global_soln(elem_info->dofIndices()[this->_sys.number()][this->number()]);
}

template <typename OutputType>
Expand All @@ -130,8 +130,9 @@ MooseLinearVariableFV<OutputType>::gradSln(const ElemInfo * const elem_info) con
if (_needs_cell_gradients)
{
_cell_gradient.zero();
for (const auto i : make_range(_mesh.dimension()))
_cell_gradient(i) = (*_grad_cache[i])(elem_info->dofIndices()[_sys.number()][this->number()]);
for (const auto i : make_range(this->_mesh.dimension()))
_cell_gradient(i) =
(*_grad_cache[i])(elem_info->dofIndices()[this->_sys.number()][this->number()]);
}

return _cell_gradient;
Expand Down Expand Up @@ -162,10 +163,10 @@ MooseLinearVariableFV<OutputType>::initialSetup()
if (_needs_cell_gradients)
{
_grad_cache.clear();
for (const auto i : make_range(_mesh.dimension()))
for (const auto i : make_range(this->_mesh.dimension()))
{
(void)i;
_grad_cache.push_back(_sys.currentSolution()->zero_clone());
_grad_cache.push_back(this->_sys.currentSolution()->zero_clone());
}
}

Expand Down
2 changes: 1 addition & 1 deletion unit/src/MooseServerTest.C
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ TEST_F(MooseServerTest, CompletionDocumentRootLevel)

EXPECT_EQ(request_id, response_id);

EXPECT_EQ(48u, completions_array.size());
EXPECT_EQ(50u, completions_array.size());

std::ostringstream completions_actual;

Expand Down

0 comments on commit f815da4

Please sign in to comment.