Transfer elements of dictionary into List<dimensionedScalar>
hi,
in one of my files, let s call the file "properties" I have a subdict like Code:
ValueV1 I tried something like Code:
List<dimensionedScalar> List_V1 = properties.subDict("ValueV1"); Code:
error: no match for ‘operator=’ 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"); greetings maybee |
I would think that this is not possible since the subDict type has some other properties compared to the List type. Maybe you should try to run a forAll loop over the entries of the subDict and then assign them to a List<dimensioned scalar>. But are these really all entries of type dimensionedScalar?
If that is not possible then you can maybe just read the scalar values out of the subDict with the readScalar() function. Can't guarantee that this works, but maybe something like this: Code:
//Get name of dictionary before |
hi,
thx for the help. Unfortunately I can t use your code since the number of elements/entries within the subdict is not constant. Therefore I can t write the code using the list entries. I edited my intitial quesiton now. Edit: I guess I have found a solution that works like this: Code:
wordList VALUES greetings maybee |
All times are GMT -4. The time now is 05:10. |