CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Reusing GeometricFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2015, 21:33
Default Reusing GeometricFields
  #1
New Member
 
Pekka Röyttä
Join Date: Nov 2010
Location: Singapore
Posts: 7
Rep Power: 15
PekkaRo is on a distinguished road
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
PekkaRo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:32.