You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@anderson2981 ran into an error in the wall-enabled prediction driver when using compiled_lsrk45:
File "emirge/mirgecom/mirgecom/steppers.py", line 425, in advance_state
_advance_state_stepper_func(
File "emirge/mirgecom/mirgecom/steppers.py", line 159, in _advance_state_stepper_func
state = timestepper(state=state, t=t, dt=dt, rhs=compiled_rhs)
File "prediction.py", line 1471, in _compiled_stepper_wrapper
return compiled_lsrk45_step(actx, state, t, dt, rhs)
File "emirge/grudge/grudge/shortcuts.py", line 58, in compiled_lsrk45_step
y, residual = update(y, a, b, h, rhs_val)
File "emirge/arraycontext/arraycontext/impl/pytato/compile.py", line 336, in __call__
output_template = self.f(
File "emirge/grudge/grudge/shortcuts.py", line 38, in _lsrk45_update
residual = a*residual + h*rhs_val
TypeError: unsupported operand type(s) for *: 'Placeholder' and 'WallVars'
Here WallVars is a dataclass defined in a similar manner to ConservedVars, with (at least) one distinction: it does not define an array_context method (and does not set _cls_has_array_context_attr=True) (code).
The above error doesn't occur with the regular rk4_step, and it also goes away if I define an array_context method in WallVars. Is this a bug, or is there a reason that it needs to define an array_context method in order to work?
The text was updated successfully, but these errors were encountered:
For this behavior of broadcasting ArrayContext.array_types across a container, _bcast_actx_array_type needs to be set. The behavior observed here agrees with the docs (see the default values of _bcast_actx_array_type).
For this feature, we require array_context to be an attribute to figure out which array types could be legally broadcasted.
@anderson2981 ran into an error in the wall-enabled prediction driver when using
compiled_lsrk45
:Here
WallVars
is a dataclass defined in a similar manner toConservedVars
, with (at least) one distinction: it does not define anarray_context
method (and does not set_cls_has_array_context_attr=True
) (code).The above error doesn't occur with the regular
rk4_step
, and it also goes away if I define anarray_context
method inWallVars
. Is this a bug, or is there a reason that it needs to define anarray_context
method in order to work?The text was updated successfully, but these errors were encountered: