the UpdateState function should copy the host data to the device before continuing the calculation.
Ideas
the UpdateState function may not exist in the Solve function at all and can be moved into the builder or solver function (a wrapper for all the miscellaneous items).
in the wrapper we iterate over all the members of State variable and copy them to the device for the GPU solver.
if state.lower_matrix_ and state.upper_matrix_ have to be initialized to zero somehow, it is better done in the UpdateState function or the solver wrapper.
After discussing with @mattldawson and @K20shores , the
UpdateState
function (https://github.com/NCAR/micm/blob/main/include/micm/solver/rosenbrock.inl#L287) may not work on the GPU.Acceptance criteria
UpdateState
function should copy the host data to the device before continuing the calculation.Ideas
UpdateState
function may not exist in theSolve
function at all and can be moved into thebuilder
orsolver
function (a wrapper for all the miscellaneous items).State
variable and copy them to the device for the GPU solver.state.lower_matrix_
andstate.upper_matrix_
have to be initialized to zero somehow, it is better done in theUpdateState
function or the solver wrapper.