CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Number of patchToPatchInterpolation (http://www.cfd-online.com/Forums/openfoam/60922-number-patchtopatchinterpolation.html)

ariorus June 22, 2007 05:40

Hello Dear foamers! I have
 
Hello Dear foamers!

I have a pretty basic and unimportant problem but a suggestion would be very useful to me to better understand the c++ programming art.

I'd like to make a given number of interpolations between different patches, but I'd like also to choose interpolations number and boundaries names setting proper parameters in a dictionary.

Well this should be pretty simple, but my problem is that I don't know how to initialize interpolations and interpolations number.

I mean I should have something like:

List<patchtopatchinterpolation> interpolations(num);

but it would be wrong since after this I cannot initilize every interpolation separately.

I tried using pointers, but without success...


Can anybody suggest how to solve this?

Thank you.

Ros.

hjasak June 22, 2007 07:28

Make a PtrList of interpolatio
 
Make a PtrList of interpolations and add them with a .set(index, new patchToPatchInterpolation(args)) function (or .hook(...) in OF-1.3.

Enjoy,

Hrv

ariorus June 22, 2007 08:52

Thank you! I was close but
 
Thank you!

I was close but not enough to catch it.
Basically I was not using new...


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