autoPtr doesn't create a "new"
Hello everyone,
I've a noticed a strange behavior in my code, I'm sure it is my mistake or my lack of understanding but I could understand it: I have a field that I want to interpolate. I've coded something like Code:
autoPtr<interpolation<vector>> interpV Code:
return autoPtr<interpolation<Type>>(cstrIter()(psi)); Code:
template<class Type> My guess is the new srcV is so close (~10^-3) from the previous one that autoPtr does not actually recompute the volPointInterpolation needed : psip_ is not recomputed inside interpolationCellPoint.H. The problem is I need to and the final results are really sensitive to that! should I manually destroy the interpV at the end? (and how do I do that?) Am I doing something wrong? Edit: The same behavior is obtained when I tried to define interpV as a const reference of directly interpolationCellPoint Code:
const interpolationCellPoint<vector> & interpV (srcV); Thanks a lot for your inputs! Sincerely, Fabien |
Well, after a lot of print and research everywhere, I've found the culprit!!!
The problem was in Code:
psip_ Now, I do it manually Code:
sourceV.evenNo()=sourceV.eventNo()+1 // this is wrong, see edits EDIT: I was wrong, it does not run well. I forgot to recompile the "true".. Inside the volPointInterpolation::New(psi.mesh()).interpolate the eventNo is way to important. +1 does not help matching it... EDIT2: Well I was an idiot, I found out that -If this time I'm right- the eventNo is more of a global number counting all occurence. To set a n object as updated, used myObject.setUpToDate() instead (it sets myObject.eventNo_= db().getEvent() ) |
All times are GMT -4. The time now is 08:18. |