|
[Sponsors] |
June 2, 2009, 14:42 |
reading a list of lists from a dictionary
|
#1 |
New Member
Kian Mehravaran
Join Date: Mar 2009
Location: London, U.K
Posts: 22
Rep Power: 17 |
Hello,
I can read a list of points from a dictionary by: List<vector> pnts(pointsDict.lookup("objects")); how can I read more than one list? Please note that I don't want to have multiple Lists, I want a List of Lists or something similar that holds the individual lists. Thanks, Kian Mehravaran |
|
June 2, 2009, 16:19 |
|
#2 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Did not try it for vectors, but is this what you ask for? Simply lookup a List<List<vector> >
Code:
int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" # include "createMesh.H" IOobject dictHdr ( "listListTestDict", runTime.system(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ); IOdictionary dict(dictHdr); List<List<scalar> > v(dict.lookup("listan")); Info << v << endl; Info<< "End\n" << endl; return(0); } |
|
June 3, 2009, 11:44 |
|
#3 |
New Member
Kian Mehravaran
Join Date: Mar 2009
Location: London, U.K
Posts: 22
Rep Power: 17 |
Thanks Niklas!
|
|
Tags |
dictionary, lists |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Problem converting fluent mesh | vinz | OpenFOAM Meshing & Mesh Conversion | 28 | October 12, 2015 07:37 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |