[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63860] bicg fails with flag=2 starting with v
From: |
Johannes |
Subject: |
[Octave-bug-tracker] [bug #63860] bicg fails with flag=2 starting with version 7.1.0 |
Date: |
Thu, 2 Mar 2023 05:16:47 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63860>
Summary: bicg fails with flag=2 starting with version 7.1.0
Group: GNU Octave
Submitter: johannes
Submitted: Thu 02 Mar 2023 10:16:44 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name: Johannes
Originator Email:
Open/Closed: Open
Release: 7.1.0
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 02 Mar 2023 10:16:44 AM UTC By: Johannes <johannes>
The following code worked until 6.4.0:
Afn = @(x, type, qdyn) Amat(x, type, qdyn, Qlh, Shl);
for n = 1 : nconf
qdyn = cmp.aero.config.qdyn(n);
u0 = qdyn * uQ(:, n);
[disp(dofl, n), flag, ~, niter] = ...
bicg(Afn, u0, opts.tol, opts.maxit, [], [],
u0, qdyn);
...
end
It fails in 7.1.0 and higher versions returning flag=2. The reason is the
anonymous function for the preconditioners built by __alltohandles__.m if no
preconditioner is supplied. It always has two input arguments, but the bigc
code also supplies the parameters, in this case qdyn, so there are three input
arguments.
A workaround is to modify the code as follows:
Afn = @(x, type, qdyn) Amat(x, type, qdyn, Qlh, Shl);
idn = @(x, y, z) x; % avoid bug in 7.1.0
for n = 1 : nconf
qdyn = cmp.aero.config.qdyn(n);
u0 = qdyn * uQ(:, n);
[disp(dofl, n), flag, ~, niter] = ...
bicg(Afn, u0, opts.tol, opts.maxit, idn, idn,
u0, qdyn);
...
end
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63860>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63860] bicg fails with flag=2 starting with version 7.1.0,
Johannes <=