dimensionedScalar Dimension setting in lookup
In creatFields.H i want to specify dimensions of a specific variable which i am getting from controlDict using lookupOrDefault. But i am unable to set proper dimensions to the variable. what i did is
dimensionedScalar heightOfOrigin ( runTime.controlDict().lookup("heightOfOrigin"), dimensionSet( 0, 1, 0, 0, 0, 0, 0), ); But it gives me error. Please help me |
Hi,
Since you are constructing dimensionedScalar, use one of the constructors of the class (http://foam.sourceforge.net/docs/cpp/a00525.html) instead random attempts to guess the syntax: Code:
dimensionedScalar heightOfOrigin Code:
dimensionedScalar heightOfOrigin Code:
dimensionedScalar heightOfOrigin(runTime.controlDict().lookup("heightOfOrigin")); |
Sir thank you i understand now. But please guide me how you get help from sourceforge???? the link you sent.
|
I am sorry i am a new member........ Learning......
|
Error compiling lookup
Dear foamers,
We have a problem compiling a solver in v2006 that was previously compiled in v1806 version. This is the problem shown: Code:
createFields.H:247:1 warning 'Foam::dimensioned<Type>::dimensioned(Foam::Istream&) [with Type = double]' is depracted (declared at 7share/apps/OpenFOAM-v2006/src/OpenFOAM/lnInclude/dimensionedType.C:305): Since 2018-11 [-Wdeprecated-declarations] ); Code:
IOdictionary diffusionProperties |
Quote:
As the message states it is a deprecation, which means that it not a compilation error, but a suggestion. The message furthermore states "deprecated since 2018-11", which is a clear indication why it compiled without warnings in v1806 but now starts emitting warnings with a new version. From the docs (https://www.openfoam.com/documentati...d.html#details) it states Quote:
Which further information should we provide??? |
Thanks olesen for your quick reply. I thought it was wrong in my code so it is enough to know that it is just a suggestion.
rarnaunot |
All times are GMT -4. The time now is 21:37. |