Super late update, sorry.
Not sure
if I understood you correctly:
if(n) {
PetscValidScalarPointer(r,3);
ierr = PetscPrintf(PETSC_COMM_WORLD, --- n = %d nonzero if.\n,
n);CHKERRQ(ierr);
} else {
ierr = PetscPrintf(PETSC_COMM_WORLD, --- n = 0 else.\n);CHKERRQ(ierr);
}
I get
It does not look like you are in fact using the branch with this fix. The
branch code looks like:
if (n) PetscValidScalarPointer(r,3);
*and*
if (n) PetscValidScalarPointer(r,4);
So if you now put the check for argument 4 inside of your if statement then
you will have reimplemented my
Switched branch and now it works. No error and the solution is correct. I
guess i not that more inefficient since the times when the rhs is zero is not
that often, otherwise you wouldn't solve the system that way.
I'm stupid: somehow I was in master and didn't notice that. Sorry for the
Dear all,
I am writing a few variations on the PCG algorithm. Starting with my own PCG
implementation, I noticed that my routine is quite a bit slower (~20%). I think
I tracked it down to the MatSolve calls in PCApply. I am using BDDC as the
preconditioner.
In the Petsc PCG function, each
On Fri, Nov 7, 2014 at 11:04 AM, Lawrence Mitchell
lawrence.mitch...@imperial.ac.uk wrote:
Hi petsc-dev,
I'm solving a pure Neumann mixed Poisson-like problem, preconditioning
with a schur complement. The pressure space has a nullspace of the
constant functions and so I attach the
On 10 Nov 2014, at 21:48, Matthew Knepley knep...@gmail.com wrote:
On Fri, Nov 7, 2014 at 11:04 AM, Lawrence Mitchell
lawrence.mitch...@imperial.ac.ukwrote:
Hi petsc-dev,
I'm solving a pure Neumann mixed Poisson-like problem, preconditioning with a
schur complement. The pressure space
On Mon, Nov 10, 2014 at 5:34 PM, Lawrence Mitchell
lawrence.mitch...@imperial.ac.uk wrote:
On 10 Nov 2014, at 21:48, Matthew Knepley knep...@gmail.com wrote:
On Fri, Nov 7, 2014 at 11:04 AM, Lawrence Mitchell
lawrence.mitch...@imperial.ac.ukwrote:
Hi petsc-dev,
I'm solving a pure
Matthew Knepley knep...@gmail.com writes:
at which point the nullspace is not attached, no?
Crap, that is right. I think we should propagate the nullspace from pmat[1].
Uh, there is no reason pmat[1] can be expected to have the same null
space. pmat[1] is the zero matrix in some important
How can I model this kind of problem with petsc 3.5.2 and
petsc4py? The demo examples are unconstrained optimization ones
in all the petsc versions...
Please, I need any python scrip to deal with problems like:
minimize sum(x) subject to. x = 0 and Ax = b
It will be great.
Sorry about the