|
[Sponsors] |
February 2, 2011, 13:26 |
float or scalar for runTime.tinename() ??
|
#1 |
Member
Fábio César Canesin
Join Date: Mar 2010
Location: Florianópolis
Posts: 67
Rep Power: 16 |
I had look around but I'm not finding a method to call to provide the time the simulation is on.. I wan't to make a change when time = changetime..
I have tried to do casting like: float(runTime.timeName()) but it do not work.... I'm starting to believe I will have to implement the casting.. |
|
February 2, 2011, 14:12 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi Fábio,
Type casting only works when the variables are similar, for example between pointers and between double/int/float and so on. To convert a string to float, you can use atof. But I think that runTime.value() will get you the value already in scalar (float or double) format, without the need to convert the value. Best regards, Bruno
__________________
|
|
February 2, 2011, 15:36 |
|
#3 |
Member
Fábio César Canesin
Join Date: Mar 2010
Location: Florianópolis
Posts: 67
Rep Power: 16 |
LOL ...
Thanks Bruno, I had looked at the doxygen but the method "value()" was not there, I believe it's because it is from inheritance.. |
|
February 2, 2011, 17:13 |
|
#4 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Quote:
Quote:
__________________
|
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Solving for an additional species CO in coalChemistryFoam | N. A. | OpenFOAM Programming & Development | 3 | February 18, 2019 05:58 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 23, 2014 23:48 |
OpenFOAM and gpgpu | dewald | OpenFOAM | 37 | August 29, 2014 09:32 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |
to correct me an udf program | farida hamadi | FLUENT | 0 | December 18, 2004 05:54 |