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

IOdictionary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2021, 16:18
Default IOdictionary
  #1
New Member
 
Join Date: May 2019
Posts: 6
Rep Power: 7
ecles is on a distinguished road
Dear all,

Supposing I want to construct an object belonging to the IOdictionary class by calling this constructor:

IOdictionary(const IOobject&);

This routine constructs the baseIOdictionary through the object io:


Foam::baseIOdictionary::baseIOdictionary(const IOobject& io)
:
regIOobject(io)
{
dictionary::name() = IOobject:: objectPath();
}


Well, but I do not understand how dictionary has been instantiated. When was it constructed?

I first thought baseIOdictionary would call a dictionary constructor when it's being instantiated. Can anyone give me a help?
ecles is offline   Reply With Quote

Old   July 15, 2021, 17:36
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Pretty simple. IOdictionary derives from both dictionary (which has a null constructor) and regIOobject (which cannot be null-constructed). The initializer list forwards "io" to the regIOobject, and dictionary is simply null-constructed.

P.S: Which version of OpenFOAM is this? I don't see a "baseIOdictionary" anywhere.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue 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
Writing IOdictionary to user-defined folder Arnoldinho OpenFOAM Programming & Development 3 June 16, 2021 05:04
Add to a list in IOdictionary stosse OpenFOAM Programming & Development 3 March 17, 2021 06:11
writing values to IOdictionary subDict not generating expected output? massive_turbulence OpenFOAM Programming & Development 2 January 21, 2019 09:48
IOdictionary with READ_IF_PRESENT, default option CFDUser_ OpenFOAM Programming & Development 14 May 22, 2014 18:43
Read IOdictionary entries from within turbulence model Arnoldinho OpenFOAM Programming & Development 9 August 11, 2012 08:15


All times are GMT -4. The time now is 05:35.