The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 A bug? blocked after parameter initialization code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

frankwagner

France
Posts

Posted - 03/10/2006 :  12:36:23 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

Is this a bug?

Using a particular function I stay blocked on the initialization code script tab every time I open it!!! I need to close the fitter, and reopen it in order to get to another tab. -- strange, it does not do this with other functions.

Thanks for your comments,

Frank

Details below:

I have a function (Origin C):
double u; // argument of arctan
const double z = pi*w^2*n/(lambda*M2); // raleigh length
u = sqrt(F/thresh - 1);
p = 1.0 - exp(-defden * 4.0/3.0*pi*w^2*z*(u^3/6.0 + u - atan(u)) );
parameters are: thresh,defden. Indepentent variable: F

and a parameter initialization code (origin C):
int i=1;
while (p_data[i]==0) {i++;};
thresh=F_data[i];
defden = 1e4; // defects / mm3 as general staring value
enable automatic... is checked (or unchecked)
and some constants:
n=1.5
lambda=1064.0e-6/*mm*/
w=15.0e-3/*mm*/
M2=2
entered on the same script tab.

Leo_Li

China
Posts

Posted - 03/13/2006 :  9:02:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi frankwagner,

We would like to know your Origin version number?



Leo
OriginLab Corp.
Go to Top of Page

frankwagner

France
Posts

Posted - 03/14/2006 :  03:12:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The Origin version is 7.5 SR4 (7.5853 B853), and I'm working on Windows XP (SP2) with automatic update function.
Go to Top of Page

frankwagner

France
Posts

Posted - 03/14/2006 :  03:26:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I found the problem. When I remove the unities from the constant field the tabs switch correctly. Could you change this please. It's quite useful to have the unities written as comment after the unities.

In "scripts" "parameter initialization"

"lambda=1064E-6" is ok
but
"lambda = 1064E-6 //mm;" blocks the tab.

Best regards,

Frank
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/14/2006 :  05:50:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Frank,

Comments belong after the semicolon...

lambda = 1064E-6; //mm

Mike Buess
Origin WebRing Member
Go to Top of Page

frankwagner

France
Posts

Posted - 03/14/2006 :  06:21:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

Hi Frank,

Comments belong after the semicolon...

lambda = 1064E-6; //mm

Mike Buess
Origin WebRing Member



I think Origin does not accept any comments in the "constants" field.

I tried it. In the C-file, a comment after the semicolon yields:
const double lambda=1064E-6;
const double //mm;

And the code does not compile
compiling...
_nlpcourbeSeuilVol3D2defauts.fit
FEEDBACK macros not defined
\OriginC\NLSF\_nlpcourbeSeuilVol3D2defauts.fit(42) :Error, invalid identifier, check using as name:

(I wrote the comments in a text file.. less elegant, but it works)

Frank
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/14/2006 :  09:41:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
(I wrote the comments in a text file.. less elegant, but it works)
You can also put them in the initialization script section at the bottom of that tab...

// comment about lambda

That way they're saved with the fdf file.

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000