|
[Sponsors] |
November 12, 2015, 21:33 |
Reusing GeometricFields
|
#1 |
New Member
Pekka Röyttä
Join Date: Nov 2010
Location: Singapore
Posts: 7
Rep Power: 15 |
Dear all,
I am wondering what would be the best practice to declare fields that I will need to reuse, but which are not part of the output? What I wonder is that in the parts, that are likely well optimized, some of the fields seem to be reallocated on each function call. For example, in the kEpsilon-model's correct() function, generation term G seems to be allocated at each time step. Most other fields are data members allocated at the initializer list. The latter seems better programming practice, but maybe there is a hidden catch I don't see? I have inherited some models where the temporary allocation is used heavily, and I suspect that this might cause performance damage. Would this be the case? I am especially interested in large models, say >10^9 cells. Last edited by PekkaRo; November 13, 2015 at 09:06. Reason: Clarifications, typos |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Understanding memory handling of GeometricFields / posible bug in | chriss85 | OpenFOAM Programming & Development | 1 | May 7, 2015 10:57 |
Reusing the inlet time directories in timeVaryingMappedFixedValue | ngj_22 | OpenFOAM Running, Solving & CFD | 0 | January 24, 2013 10:22 |
Multiplying elements of geometricFields | sepp | OpenFOAM | 0 | February 9, 2011 05:18 |
Saving and reusing velocity profiles | Tim | FLUENT | 1 | March 30, 2009 07:18 |