diff --git a/src/poet.cpp b/src/poet.cpp index 0c7e6b1c0..d70e51a9b 100644 --- a/src/poet.cpp +++ b/src/poet.cpp @@ -386,9 +386,9 @@ static Rcpp::List RunMasterLoop(RInsidePOET &R, const RuntimeParameters ¶ms, // data frame with elements that are used as ai outputs for the // retraining step. - if (params.ai || params.copy_non_reactive_regions) { + chem.getField().update(diffusion.getField()); - chem.getField().update(diffusion.getField()); + if (params.ai || params.copy_non_reactive_regions) { R["TMP"] = Rcpp::wrap(chem.getField().AsVector()); R.parseEval(