Skip to content

Commit

Permalink
Nodal kernel compute jacobian thread bug fix idaholab#10620
Browse files Browse the repository at this point in the history
  • Loading branch information
sveerara committed Jan 26, 2018
1 parent 5d3b47c commit 92327b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
32 changes: 16 additions & 16 deletions framework/src/base/ComputeNodalKernelBCJacobiansThread.C
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ ComputeNodalKernelBCJacobiansThread::onNode(ConstBndNodeRange::const_iterator &
const auto & objects = _nodal_kernels.getActiveBoundaryObjects(boundary_id, _tid);
for (const auto & nodal_kernel : objects)
{
// If this NodalKernel isn't operating on this ivar... skip it
if (nodal_kernel->variable().number() != ivar)
break;

// If this NodalKernel is acting on the jvar add it to the list and short-circuit the loop
if (nodal_kernel->variable().number() == jvar)
{
active_involved_kernels.push_back(nodal_kernel);
continue;
}

// See if this NodalKernel is coupled to the jvar
const std::vector<MooseVariable *> & coupled_vars = nodal_kernel->getCoupledMooseVars();
for (const auto & var : coupled_vars)
if (nodal_kernel->variable().number() == ivar)
{
if (var->number() == jvar)
// If this NodalKernel is acting on the jvar add it to the list and short-circuit the
// loop
if (nodal_kernel->variable().number() == jvar)
{
active_involved_kernels.push_back(nodal_kernel);
break; // It only takes one
continue;
}

// See if this NodalKernel is coupled to the jvar
const std::vector<MooseVariable *> & coupled_vars = nodal_kernel->getCoupledMooseVars();
for (const auto & var : coupled_vars)
{
if (var->number() == jvar)
{
active_involved_kernels.push_back(nodal_kernel);
break; // It only takes one
}
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions framework/src/base/ComputeNodalKernelJacobiansThread.C
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,25 @@ ComputeNodalKernelJacobiansThread::onNode(ConstNodeRange::const_iterator & node_
const auto & objects = _nodal_kernels.getActiveBlockObjects(block, _tid);
for (const auto & nodal_kernel : objects)
{
// If this NodalKernel isn't operating on this ivar... skip it
if (nodal_kernel->variable().number() != ivar)
break;

// If this NodalKernel is acting on the jvar add it to the list and short-circuit the loop
if (nodal_kernel->variable().number() == jvar)
if (nodal_kernel->variable().number() == ivar)
{
active_involved_kernels.push_back(nodal_kernel);
continue;
}

// See if this NodalKernel is coupled to the jvar
const std::vector<MooseVariable *> & coupled_vars = nodal_kernel->getCoupledMooseVars();
for (const auto & var : coupled_vars)
if (var->number() == jvar)
// If this NodalKernel is acting on the jvar add it to the list and short-circuit the
// loop
if (nodal_kernel->variable().number() == jvar)
{
active_involved_kernels.push_back(nodal_kernel);
break; // It only takes one
continue;
}

// See if this NodalKernel is coupled to the jvar
const std::vector<MooseVariable *> & coupled_vars = nodal_kernel->getCoupledMooseVars();
for (const auto & var : coupled_vars)
if (var->number() == jvar)
{
active_involved_kernels.push_back(nodal_kernel);
break; // It only takes one
}
}
}
}
}
Expand Down

0 comments on commit 92327b2

Please sign in to comment.