> On Feb 18, 2020, at 8:26 AM, Yuyun Yang wrote:
>
> Thanks. Also, when using KSP, would the syntax be KSPSetOperators(ksp,A,A)?
> Since you mentioned preconditioners are not generally used for matrix-free
> operators, I wasn’t sure whether I should still put “A” in the Pmat field.
>
> Is i
Thanks a lot for the example!
From: "Zhang, Hong"
Date: Tuesday, February 18, 2020 at 11:32 PM
To: Yuyun Yang
Cc: Matthew Knepley , "petsc-users@mcs.anl.gov"
Subject: Re: [petsc-users] Matrix-free method in PETSc
Here is an TS example using DMDA and matrix-free Jacobians. Though the
matrix-f
Hector E Barrios Molano writes:
> Dear PETSc Experts!
>
> Do you know if there is an efficient way to move a matrix from a single
> processor (MatCreateSeqBAIJ) to a matrix contained in all processors?
How did you create the original SeqBAIJ? Could you just call
MatSetValues on a parallel matr
Dear PETSc Experts!
Do you know if there is an efficient way to move a matrix from a single
processor (MatCreateSeqBAIJ) to a matrix contained in all processors?
As a little bit of context, I have a code in which only one processor
creates a matrix and a vector for a linear system of equation
Thanks for the answer.
Finally I generate a submatrix and It worked.
Kind regards.
El mar., 18 de feb. de 2020 a la(s) 03:51, Jose E. Roman (jro...@dsic.upv.es)
escribió:
> You put alpha on the diagonal of A and beta on the diagonal of B to get an
> eigenvalue lambda=alpha/beta. If you set beta
Ok, thank you!
Kind regards.
El mar., 18 de feb. de 2020 a la(s) 03:17, Jose E. Roman (jro...@dsic.upv.es)
escribió:
>
>
> El 17 feb 2020, a las 19:19, Emmanuel Ayala escribió:
>
> Thank you very much for the answer.
>
> This error appears when computing the B-norm of a vector x, as
>> sqrt(x'*
Here is an TS example using DMDA and matrix-free Jacobians. Though the
matrix-free part is faked, it demonstrates the workflow.
https://gitlab.com/petsc/petsc/-/blob/hongzh/ts-matshell-example/src/ts/examples/tutorials/advection-diffusion-reaction/ex5_mf.c
Hong (Mr.)
On Feb 18, 2020, at 8:26 A
Thanks. Also, when using KSP, would the syntax be KSPSetOperators(ksp,A,A)?
Since you mentioned preconditioners are not generally used for matrix-free
operators, I wasn’t sure whether I should still put “A” in the Pmat field.
Is it still possible to use TS in conjunction with the matrix-free ope
On Tue, Feb 18, 2020 at 8:20 AM Yuyun Yang wrote:
> Thanks for the clarification.
>
> Got one more question: if I have variable coefficients, my stencil will be
> updated at every time step, so will the coefficients in myMatMult. In that
> case, is it necessary to destroy the shell matrix and cre
Thanks for the clarification.
Got one more question: if I have variable coefficients, my stencil will be
updated at every time step, so will the coefficients in myMatMult. In that
case, is it necessary to destroy the shell matrix and create it all over again,
or can I use it as it is, only call
On Tue, Feb 18, 2020 at 6:03 AM David Scott wrote:
> Hello,
>
> I wish to solve a channel flow problem with different boundary
> conditions. In the streamwise direction I may have periodic or
> inlet/outlet BCs. I would like to make my code for the two cases as
> similar as possible. If I use DM_
Hello,
I wish to solve a channel flow problem with different boundary
conditions. In the streamwise direction I may have periodic or
inlet/outlet BCs. I would like to make my code for the two cases as
similar as possible. If I use DM_BOUNDARY_PERIODIC then when performing
a linear solve the ghost
You put alpha on the diagonal of A and beta on the diagonal of B to get an
eigenvalue lambda=alpha/beta. If you set beta=0 then lambda=Inf. The choice
depends on where your wanted eigenvalues are and how you are solving the
eigenproblem. The choice of lambda=Inf suggested by Jeremy avoids insert
> El 17 feb 2020, a las 19:19, Emmanuel Ayala escribió:
>
> Thank you very much for the answer.
>
> This error appears when computing the B-norm of a vector x, as sqrt(x'*B*x).
> Probably your B matrix is semi-definite, and due to floating-point error the
> value x'*B*x becomes negative for
14 matches
Mail list logo