phorgue / porousMultiphaseFoam

A porous multiphase toolbox for OpenFOAM
Other
124 stars 64 forks source link

unnecessary fields allocated both in solvers and in the porous models #19

Open matteoicardi opened 3 years ago

matteoicardi commented 3 years ago

hi @phorgue , I have run into memory problems and noticed in all your porous models you allocate all fields inside the class but then also inside the solvers. is there a reason for that? I have tested some modifications using only references to the fields with allocation happening only in the solver and it seems to work well. if you are interested I am happy to submit a pull request

phorgue commented 3 years ago

Hi @matteoicardi, I do not see where the problem is and it seems that most of the field are allocated inside the "porous model" class such kra/krb in relativePermeabilityModel Class for example. However, I may be doing something wrong and I do not see any reason for double allocation instead of references to the fields. So you can send your pull request and I will take a look at your developments. Thanks for your work and your contributions to the toolbox.

matteoicardi commented 3 years ago

sure, happy to help, will gather some changes and submit it. and thank you @phorgue for the great tool you have developed!