sorry to have to say this, but turning positions into doubles
is an almost impossible idea. almost every dx module
opens the positions and reads through them, using floating
point local variables. it would touch thousands of lines
of code.
but it is possible to make your own components. you could
make a field with a "double positions" component in your
input file, and use it for saving/starting/restarting your simulations.
nancy
Date: Mon, 23 Jul 2001 16:56:38 +0200
From: Marco Morandini <[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
Subject: [opendx-users] Positions and double
I know taht positions can't be defined with doubles.
However, this would allow
to use opendx data to restart a simulation.
I'd like to get rid of the problem and to understand were
OpenDx has to be modified in oredr to accept double positions.
Is this an affordable work (one or two subroutines) or will require
too much work (I'm a simple Dx user)?
I begun the work by modifiying box.c, from
if (type!=TYPE_FLOAT || category!=CATEGORY_REAL || (rank!=0 && rank!=1))
to
if ((type!=TYPE_FLOAT && type!=TYPE_DOUBLE) || category!=CATEGORY_REAL
|| (rank!=0 && rank!=1))
After the patch Dx gives this error:
ERROR: Image: AutoCamera: Bad parameter: zero length direction vector
I think the error raised by
if (fabs(DXLength(DXSub(p->f, p->t))) < FUZZ) {
if (p->isauto)
DXSetError(ERROR_BAD_PARAMETER, "#11822", "direction");
......
in camera.c, line 768 (dx 4.1.0)
Could somone explain me what Dx is doing
(which routines are used to set-up the camera),
were I need to write/modify code and how
much work would this require?
Thanks in advance,
Marco Morandini