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

Transfer elements of dictionary into List<dimensionedScalar>

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 25, 2014, 12:07
Default Transfer elements of dictionary into List<dimensionedScalar>
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
maybee is on a distinguished road
hi,

in one of my files, let s call the file "properties" I have a subdict like

Code:
ValueV1
{
V1S1   [0 1 1 0 0 0 0] 888888;    
V1S2   [0 1 1 0 0 0 0] 7777;   
.                                //no constant number of entries
.
.
}
This subdict consists of dimensioned scalars where the number is not constant and can change. I need to transfer the dimensioned scalars into a list of dimensioned scalars -> "List<dimensionedScalar>"
I tried something like

Code:
List<dimensionedScalar> List_V1 = properties.subDict("ValueV1");
Unfortunately this does not work since

Code:
error: no match for ‘operator=’
Later on in my code I need to access the dimensioned scalars of the list by their element position - therefore I need the list.

I know that I can stream the subdict into an object of class dictionary or create a reference to it like

Code:
const dictionary& subDict = properties.subDict("Value1");
but how can I transfer the dimensioned scalars into a list afterwards?

greetings
maybee

Last edited by maybee; February 27, 2014 at 04:57.
maybee is offline   Reply With Quote

 


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
Heat transfer coefficient - what is waht Stan FLUENT 28 December 29, 2021 16:29
Fluent Tutorial on Heat transfer Far FLUENT 15 July 29, 2017 15:31
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55
additional variable mass transfer in CFX5.6 john CFX 1 February 14, 2004 00:30


All times are GMT -4. The time now is 09:21.