CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Build up ones' own interpolation method (

mathslw April 9, 2014 17:30

Build up ones' own interpolation method
Dear Foamers,

As I know, if I want to interpolate the value at an arbitrary point inside a cell, I can use:

dictionary interpolationDict = mesh.solutionDict().subDict("interpolationSchemes" );
autoPtr<interpolation<vector> > Uinterp = interpolation<vector>::New(interpolationDict, U);
vector UU = Uinterp->interpolate(pos, cellindex)

where pos is the position of the point and cellindex is cell index.
To do this, we can define the interpolation method such as cellPoint, cellPointFace in the fvSolution file.

My question is, can I build up my own interpolation method and make it usable in OpneFOAM?

Thanks in advance!


All times are GMT -4. The time now is 02:14.