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

read scalarListList from a subDictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By hk318i

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2015, 09:38
Default read scalarListList from a subDictionary
  #1
New Member
 
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11
huyidao is on a distinguished road
Hello,everyone!
I want to read a scalarListList from a subDictionary of a dictionary ,it looks like this:
m1
{
a1
(
(1.0 2.0 3.0)
(2.0 4.0 5.0)
)
}

m2
{
a2
(
(7.0 8.0 9.0)
(9.0 2.0 6.0)
)
}
In which,m1 and m2 are the subdictionary and a1 a2 are the scalarListList.how can I do this,can anyone give me some advice?Thanks..
huyidao is offline   Reply With Quote

Old   July 14, 2015, 10:31
Default
  #2
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
Try something like that,

Code:
a1 = List<scalarField> (dict.subDict("m1").lookup("a1"))
a2= List<scalarField> (dict.subDict("m2").lookup("a2"))
gaza, sharonyue and joshwilliams like this.
hk318i 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
[General] Read multiple solution of a cgns file with paraview cbarmpar ParaView 15 December 7, 2017 04:09
Read sample tool data (foamfile) Arnoldinho OpenFOAM Programming & Development 2 May 14, 2013 07:04
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52
999999 (../../src/mpsystem.c@1123):mpt_read: failed:errno = 11 UDS_rambler FLUENT 2 November 22, 2011 09:46
Cannot Read Case Nora FLUENT 0 February 27, 2008 11:20


All times are GMT -4. The time now is 13:31.