|
[Sponsors] |
Info(messageStream) - Specifying the Precision |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 4, 2013, 09:47 |
Info(messageStream) - Specifying the Precision
|
#1 | |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
Hi,
== 1 == Is it possible to specify the precision of an output number which is, say, a variable type of doubleScalar with Info in OpenFOAM? == 2 == For example: Code:
doubleScalar variable = 2.0000000001; Info << "variable: " << variable << endl; In another thread, the following was given once: Quote:
== 4 == Many thanks for any help. |
||
August 14, 2013, 15:25 |
|
#2 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13 |
The answer that I found is that:
Code:
#include "IOmanip.H" ... Info << setprecision(10); Info << " i " << xx << endl; ... |
|
August 14, 2013, 15:36 |
|
#3 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
google: format with cout
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] ICEM output precision | papis | ANSYS Meshing & Geometry | 4 | July 9, 2013 10:54 |
Double precision case open in single precision solver. | cinwendy | FLUENT | 6 | March 27, 2013 04:19 |
Switch from single precision to double precision | kk81 | OpenFOAM Bugs | 0 | March 11, 2010 07:14 |
Number of elements x double precision | matheusguzella | ANSYS Meshing & Geometry | 2 | October 7, 2009 11:15 |
what's wrong about my code for 2d burgers equation | morxio | Main CFD Forum | 3 | April 27, 2007 11:38 |