CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Retrieving Data (http://www.cfd-online.com/Forums/openfoam/95089-retrieving-data.html)

Argen December 5, 2011 21:01

Retrieving Data
 
I set up one function in a subfoam to feedback the calculated data to the main solver as,

Foam::tmp<Foam::volScalarField> Foam::xxxx::abcd::getSRC() const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"SRC",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
SRC_
)
);
}

Then I exported the data in the main foam by
UList<scalar> OF_SRC= xxxx->getSRC();

and found that the first two values are equal to zero (k=0 3.21677e-317, k=1 3.23275e-317) and the rest are the same to the values calculated in sub-foam. Any idea about this problem?


All times are GMT -4. The time now is 05:37.