proteus icon indicating copy to clipboard operation
proteus copied to clipboard

Generalize hack in SpatialTools for the SWFlow reflecting boundary conditions

Open ejtovar opened this issue 4 years ago • 6 comments

We should generalize the hack introduced in https://github.com/erdc/proteus/pull/1223 for the SWFlow reflecting boundary conditions. Currently, to use partial reflecting boundary conditions, the user sets the boundary flag to 99 and this requires a hack in proteus/SpatialTools.py.

ejtovar avatar Aug 27 '20 17:08 ejtovar

@zhang-alvin @cekees

ejtovar avatar Aug 27 '20 17:08 ejtovar

An example of how large boundary tags might affect memory usage in RANS2P:

https://github.com/erdc/proteus/blob/master/proteus/mprans/RANS2P.py#L663-L667

zhang-alvin avatar Aug 31 '20 20:08 zhang-alvin

Oops! I will try to fix this ASAP.

ejtovar avatar Aug 31 '20 20:08 ejtovar

@ejtovar, you should check if something similar is being done with SWFlow, but I don't think you need to rush to fix this as this is likely a very involved fix. But this is something that we have to keep in mind in terms of system design.

One way to resolve this would be to use a dictionary of numpy arrays with the key as the boundary tag and the value as the corresponding numpy array. @cekees mentioned that there used to be a difficulty in passing such a structure to the C++ backend, but it might be easier now since @JohanMabille's argdict-based refactoring for the backend function calls.

zhang-alvin avatar Aug 31 '20 20:08 zhang-alvin

@ejtovar do you recall if this was ever addressed? Might be something one of my students could work on.

cekees avatar Jun 29 '22 23:06 cekees

@cekees No, I believe this hack is still there.

ejtovar avatar Jun 30 '22 04:06 ejtovar