libpspio-developers team mailing list archive
-
libpspio-developers team
-
Mailing list archive
-
Message #00037
[Bug 1348524] Re: Weird test_meshfunc behavior
This is not a bug, but a typo in the test. This is the fix:
DEBUG_PRINT("test_meshfunc: setting f2 with explicit derivative\n");
- CHECK_STAT(pspio_meshfunc_set(&f1, m1, f, fp, NULL), PSPIO_SUCCESS);
- DEBUG_PRINT("\n");
+ CHECK_STAT(pspio_meshfunc_set(&f2, m1, f, fp, NULL), PSPIO_SUCCESS);
+ DEBUG_PRINT("\n");
** Changed in: libpspio
Status: New => Fix Committed
--
You received this bug notification because you are a member of Libpspio
Developers, which is subscribed to Libpspio.
https://bugs.launchpad.net/bugs/1348524
Title:
Weird test_meshfunc behavior
Status in Libpspio pseudopotential I/O library:
Fix Committed
Bug description:
When I move tests around I get different values for the f1 and f1' and
f1'' in test_meshfunc.
Fragment from the diff:
eid = pspio_meshfunc_set(&f1, m1, f, NULL, NULL);
eid = pspio_error_flush();
+ //
+ DEBUG_PRINT("test_meshfunc: evaluating f1 at r=%f\n", r[6]);
+ pspio_meshfunc_eval(f1, 1, &r[6], &feval);
+ DEBUG_PRINT("test_meshfunc: result=%f\n", feval);
+ DEBUG_PRINT("test_meshfunc: evaluating first derivative of f1 at r=%f\n", r[6]);
+ pspio_meshfunc_eval_deriv(f1, 1, &r[6], &feval);
+ DEBUG_PRINT("test_meshfunc: result=%f\n", feval);
+ DEBUG_PRINT("test_meshfunc: evaluating second derivative of f1 at r=%f\n", r[6]);
+ pspio_meshfunc_eval_deriv2(f1, 1, &r[6], &feval);
+ DEBUG_PRINT("test_meshfunc: result=%f\n", feval);
+ //
Output:
test_meshfunc: setting f1
test_meshfunc: evaluating f1 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating first derivative of f1 at r=0.850000
test_meshfunc: result=690.797296
test_meshfunc: evaluating second derivative of f1 at r=0.850000
test_meshfunc: result=677.545347
test_meshfunc: setting f2 with explicit derivative
test_meshfunc: copying f1 to a NULL f3
test_meshfunc: copying f1 to a non-empty f3
test_meshfunc: evaluating f1 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating f2 at r=0.850000
test_meshfunc: result=289.000000
test_meshfunc: evaluating first derivative of f1 at r=0.850000
test_meshfunc: result=340.000000
test_meshfunc: evaluating first derivative of f2 at r=0.850000
test_meshfunc: result=340.000000
test_meshfunc: evaluating second derivative of f1 at r=0.850000
test_meshfunc: result=400.000000
test_meshfunc: evaluating second derivative of f2 at r=0.850000
test_meshfunc: result=400.000000
Is it a bug or am I missing something?
Attaching bzr diff.
Thanks.
To manage notifications about this bug go to:
https://bugs.launchpad.net/libpspio/+bug/1348524/+subscriptions
References