-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiFab: Overload +=
*=
/=
, etc.
#372
Comments
If have the feeling, if we implemented #370 guards via mf = MultiFab() # from somewhere
mf *= 2. # on valid cells
mf.with_guard_cells()
mf *= 2.0 # on valid and guard cells |
@roelof-groenewald mentioned today that including guard cells by default is sensible for all but depositions. |
We are looking to in-place update the value of each cell, in each component, including guard cells.
Example: .def("__iadd__",
[](MultiFab & self, amrex::Real v) { /* ... */ },
py::is_operator(),
"Adds in-place to the value of each cell, in each component, including guard cells."
) We need to implement scalar and other multifabs for |
For pyAMReX'
MultiFab
, we can overload the operators+=
*=
/=
, etc. to call the underlying optimized, element-wise AMReX functions.Similar for
[...]
and other set-all ellipsis, we should specialize to AMReX'setVal
.@RemiLehe @roelof-groenewald @dpgrote @atmyers et al.: should we always operate on valid and guard cells for those?
The text was updated successfully, but these errors were encountered: