CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Build up ones' own interpolation method (https://www.cfd-online.com/Forums/openfoam-programming-development/133071-build-up-ones-own-interpolation-method.html)

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!

Wei


All times are GMT -4. The time now is 16:08.