CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Array transfer (http://www.cfd-online.com/Forums/openfoam/96187-array-transfer.html)

Argen January 15, 2012 20:45

Array transfer
 
I construct one volScalarField a_ as
a_
(
IOobject
(
"a",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("a", dimless/dimLength, 0.0)
),

and passArry() as
void Foam::XXXX::XXX::passArry(const volScalarField k)
{
a_=k;

forAll(a_.boundaryField(),patchi)
{

forAll(a_.boundaryField()[patchi],facei)
{
a_.boundaryField()[patchi][facei]=k.boundaryField()[patchi][facei];
}
}


}

I test all the values (say k=0.005) passed to a_ and found that max(a_)=0.05 while min(a_)=0.

Any idea about this weired results?


All times are GMT -4. The time now is 07:52.