|
[Sponsors] |
February 24, 2016, 03:04 |
Memory consumption of an IOobject
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18 |
Hi guys,
I have a confusion, for example, I have 100 same volScalarField, T1, T2, ... T100. I can create them by: Code:
volScalarField T1 ( IOobject ( "T1", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0) ); Code:
volScalarField T2(T1); volScalarField T3(T1); ... Best, /*******************************************/ Okay, I got it, even with the second method, T2 is also registered from objectRegistry implicitly.
__________________
My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html |
|
February 24, 2016, 11:08 |
|
#2 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
You conclusion is right.
You are creating the same type using two different constructors. First one is more explicit and the second one is a typical copy constructor. Therefore all the copied instances are registered to the same mesh and have the same field size. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
viewfactors memory consumption | derekm | OpenFOAM Pre-Processing | 0 | April 26, 2015 18:53 |
Run-time memory allocation error | akalopsis | CFX | 0 | November 17, 2014 18:17 |
Lenovo C30 memory configuration and discussions with Lenovo | matthewe | Hardware | 3 | October 17, 2013 11:23 |
reconstructParMesh not working with an axisymetric case | francesco | OpenFOAM Bugs | 4 | May 8, 2009 06:49 |
CFX CPU time & real time | Nick Strantzias | CFX | 8 | July 23, 2006 18:50 |