My main concern is why does the integrator return 0 instead of OUT_OF_DOMAIN?

Because the (current position inside domain + computed velocity * time) is returned - this final result is out of domain as you noticed, but until you pass that new position value back in and ask for the next point, it doesn't check that the value is in/out.

It checks that the start point, and all intermediate computed points are inside the domain, but if the final result pops out - then it means that the final step was too big (or the data was a bit rubbish - typically when every Nth time step is saved - the courant condition is no longer satisfied etc etc).

does that help?

JB


Regards



Date: Mon, 17 Aug 2009 10:45:31 -0400
Subject: Re: [Paraview] RungeKutta4 implementation issue
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]

Hi Fred:
 
    As JB suggested, please try using RK45, which employs an adaptive step size that is insensitive to the velocity magnitude and hence is capable of capturing accurate shape of the curve (flow line). Using RK4 (still adopting a fixed step size) does not guarantee a sufficient / desired acurracy of numerical integration (though certainly it is better than RK2) since it is stil sensitive to the velocity magnitude.
 
    Recently we improved the flow line integration accuracy issue. For any problems, please feel free to let us know.
 
    Thanks.
 
    -Zhanping
   --
Zhanping Liu, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x 138
http://www.zhanpingliu.org

On Mon, Aug 17, 2009 at 5:06 AM, John Biddiscombe <[email protected]> wrote:
I suggest you attach a debugger to the code and step through. Then you'll be able to answer your question.

Since the velocity field of your data may be high, it is entirely possible that the computed next position is outside of the bounds. Perhaps reducing the step size will help. Try even Rk4.5 with adaptive steps, this may help if the velocity gradient at the edge of the domain is very large..

JB

How is it possible???

  double *bds = reader->GetOutput()->GetBounds();
  printf("%lf %lf %lf %lf\n", bds[0], bds[1], bds[2], bds[3]);

-> 0.000000 69.000000 0.000000 69.000000

  printf("point1[0]=%f point1[1]=%f point1[2]=%f\n", point1[0], point1[1], point1[2]);

-> point1[0]=58.196274 point1[1]=68.862898 point1[2]=0.000000

  if (integrator->ComputeNextStep(point1, point2, 0, delT.Interval, stepTaken, minStep, maxStep, this->MaximumError, error) != 0)
    break;
  printf("point2[0]=%f point2[1]=%f point2[2]=%f\n", point2[0], point2[1], point2[2]);

-> point2[0]=59.002164 point2[1]=69.454414 point2[2]=0.000000

PS: This message should probably be sent to the VTK mailing list but it seems that it is no longer so active...



Découvrez toutes les possibilités de communication avec vos proches

_______________________________________________ Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview
  


-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview






Vous voulez savoir ce que vous pouvez faire avec le nouveau Windows Live ? Lancez-vous !

_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to