|
[Sponsors] |
July 12, 2013, 14:18 |
Dynamic .lookup("keyword") function
|
#1 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Hi,
== 1 == Is it possible to have an array type, dynamically changing "keyword" entry for the "Dictionary lookup"? e.g. Code:
class object(dict.lookup("keyword")); I would like to look up multiple keywords in a dictionary. So, I made the following: Code:
const label arraySizeName = 1000; word names[arraySizeName]; const word fileName = "radius"; for (label k = 0; k < 10; k++) { names[k] = fileName+name(k); const scalar a(readScalar(dict.lookup(names[k]))); } == 3 == I compiled it and it did not give any errors. But, for some arbitrary reason, I cannot test it whether it works well or not. I appreciate any comment. Many thanks in advance. |
|
July 12, 2013, 15:56 |
|
#2 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Revealed that it is possible. :]
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 14:07 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 05:42 |
dynamic viskosity field function | jarry | STAR-CCM+ | 2 | August 18, 2010 04:53 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 10:23 |
[OpenFOAM] LibvtkFoamso | fred | ParaView | 2 | November 18, 2005 19:01 |