Skip to content

Commit df47b20

Browse files
committed
Don't try to reinit non-SCALAR FE without an Elem
In the past this was probably a bit of a waste, but ever since the FE refactoring it's been an outright bug. This fixes a GRINS test for me ... and is additional motivation to just get that code back into our CI recipes, since a proper unit test here that wasn't a full-fledged simulation would be a bit challenging to add.
1 parent 6232e98 commit df47b20

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/systems/fem_context.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,9 @@ void FEMContext::elem_fe_reinit(const std::vector<Point> * const pts)
14881488
{
14891489
if (this->has_elem())
14901490
pr.second->reinit(&(this->get_elem()), pts);
1491-
else
1492-
// If !this->has_elem(), then we assume we are dealing with a SCALAR variable
1491+
// If !this->has_elem(), then still might need to reinit for a
1492+
// SCALAR variable; everything else will depend on an elem
1493+
else if (pr.first.family == SCALAR)
14931494
pr.second->reinit(nullptr);
14941495
}
14951496
}

0 commit comments

Comments
 (0)