CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   question about pointScalarField. (http://www.cfd-online.com/Forums/openfoam-programming-development/110610-question-about-pointscalarfield.html)

alundilong December 16, 2012 01:51

question about pointScalarField.
 
volScalarField can do this work successfully.
//- pesudo code
volScalarField T;
Info << T.boundaryField()[patchID][i] << endl;

but, for pointScalarField, it failed
volScalarField T;
fvMesh bMesh(mesh);
volPointInterpolation pT(bMesh);
pointScalarField ppT(pT.interpolate(T)());

Info << ppT.boundaryField()[patchID][i] << endl;

I wonder why it failed. why OpenFOAM don't make pointScalarField has the same feature that volScalarField has.

Any suggestion is welcome!

Lieven December 16, 2012 16:37

Can you post the error you get so we can see what's going wrong exactly?

Regards,


L

alundilong December 16, 2012 20:39

Quote:

Originally Posted by Lieven (Post 397815)
Can you post the error you get so we can see what's going wrong exactly?

Regards,


L

such as,

error: invalid types <unresolved overloaded function type>[int] for array subscript

It seems pointScalarField does not support this feature, but for volScalarField work fine.


All times are GMT -4. The time now is 22:39.