Interpolation from several volscalarfield named Y[i]
Dear friends
I have defined several volScalarField as below; Code:
label N = 2; Code:
UInterp_ Thanks, Farzad |
I think you can try and make a PtrList of your interpolators which can be recalled for each element by [] operator.
|
Thank you for your response dear Daniel. So what are you saying is this(could you please confirm that);
Code:
YiInterp_[1] Code:
YiInterp_[2] Quote:
|
Well I'm writing this on the fly without knowing what your trying to do exactly, it seems that you are trying to implement this at constructor level:
1- You can create a PtrList without knowing its size and elements by using the null constructor provided by class PtrList. step #1 Initialize your list with null constructor at initializer list level as follow: Code:
YiInterp_() Code:
YiInterp_(list_size_here) Now inside the constructor body just loop over the element, but if you have used the null constructor you need to set a size before starting to access elements: Code:
YiInterp_.setSize(list_size_here); // skip this if you have set the size before |
Thanks Daniel. I will try the way you suggested and let you know.
Farzad |
Quote:
|
All times are GMT -4. The time now is 02:13. |