maybee |
April 3, 2014 06:07 |
Comparison: volScalarField in phaseModel and within main()
hi,
I just tried to implement a new volScalarField in main() of my solver.
I also implemented some fields within phaseModel.H/phaseModel.C and intitialized them with the constructor like
Code:
ONE
(
IOobject
(
"One" + name,
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar
(
"OneValueOfTheField",
dimensionSet(0,0,0,0,0,0,0)
),
zeroGradient
),
When I tried something similar in main() I had to remove the zeroGradient (I guess the required file to add this inputparameter was not included in main) but also I had to change
Code:
dimensionedScalar
(
"OneValueOfTheField",
dimensionSet(0,0,0,0,0,0,0)
)
to
Code:
dimensionedScalar
(
"OneValueOfTheField",
dimensionSet(0,0,0,0,0,0,0),
0
)
Otherwise I got the error
Quote:
/home/USER/SolverNEW/NEW_TransportEqns.H:32: error: no matching function for call to ‘Foam::dimensioned<double>::dimensioned(const char [20], Foam::dimensionSet)’
|
Why is the first definition of dimensionedScalar working fine in the constructor of phaseModel, but not in main() ?
|