CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

Question regarding objectRegistry and related subjects.

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2020, 13:01
Default Question regarding objectRegistry and related subjects.
Join Date: Apr 2016
Posts: 65
Rep Power: 5
granzer is on a distinguished road
I am trying to understand subjects like objectRegistry, IOobject, regIOobject, etc and have already gone through the wiki pages and many posts here and they have cleared some of the doubts but not all.

Questions regarding objectRegistry:
So, what I understand is that objectRegistry is exactly what it sounds like, a registry for different 'objects' or entities (like dictionaries, fields, etc) which are to be read in or written out. It is hierarchical database that is implemented as a hash-table (def: Hash-Table is a data structure that stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its own unique index value. Access of data becomes very fast if we know the index of the desired data. Ref:

1) Is objectRegistry a class, from which an object is created also named objectRegistry?

Questions regarding IOobject:
What I understand about IOobject is that it is a class that is used to provide input/output support and also defines certain attributes of an object (example: the objects created from ceratin class like volScalarFiled etc) for which "implicit objectRegistry management is supported".

2) Is IOobject a class, from which an object is created also named IOobject?

3)Is the input/output support that IOobject is providing support for inputting to and outputting from the objectRegistry?

4)What does "defines attributes of an object for which implicit objectRegistry management is supported" mean?

I know that IOobject is given as an input parameter when creating certain objects of some class, say an object of volVectorField class like:

code snippet #1:

volVectorField U

Here the IOobject is a parameter when creating an instance of a volVectorField class called U.

5) Is the IOobject given as an anonymous object ie object of class IOobject is created without any name? (ref:

6) What is the function of the IOobject here? Is it creating an entry in the objectRegistry called "U" when creating the volVectorField object U?

I have read that IOobject is constructed with an object name, a class name, an instance path, a reference to an objectRegistry, and parameters determining its storage status.

7)In the code-snippet#1 the object name is "U" which is the object that we are creating of type volVectorField, right?

8)What is the class name in code-snipper#1?

9) Is Times[i].name() the instance path here and also what does instance path mean?

10)I understand that the reference to the objectRegistry is runTime here, which is an object of class Time.(Sometimes instead of we can use mesh as the reference depending on what is required.). How can runTime be an objectRegistry as is already an object of the class Time? Also, what does a "reference" to an objectRegistry mean?

Questions regarding regIOobject:
I did not understand much about regIOobject. I read regIOobject automatically manages the registration and deregistration of objects to the objectRegistry.

11)If IOobject is used to do input and output from objectRegisry what does regIOobject do? how is input/output different from registration/deregistration.

Sorry about the long question. I just want something which has most of the info at one spot for someone like me who is learning programming, C++, and OpenFOAM.

[2] _the_IOobject_class
granzer is offline   Reply With Quote


ioobject, objectregistry, regioobject

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
objectRegistry related problems burt OpenFOAM Programming & Development 4 April 14, 2014 22:31

All times are GMT -4. The time now is 23:11.