On Mon, Sep 9, 2024 at 4:32 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> Great. Thank you for letting me know.
>
> I got the reference to KSP as well from libmesh and I am not creating a
> new KSP.
>
> This time around, I didn’t have to set the PC type an
Great. Thank you for letting me know.
I got the reference to KSP as well from libmesh and I am not creating a new KSP.
This time around, I didn’t have to set the PC type and it seems to work.
petscErr = PetscOptionsSetValue(NULL,"-ksp_type", "gmres");
petscErr = PetscOptionsSetValue(NULL,"-pc_
On Mon, Sep 9, 2024 at 4:03 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> I never explicitly called KSPGetPC(). I am embedding AMS in a libmesh
> (fem) example. So, I only got the reference to pc from libmesh and set
> petscErr
> = PCHYPRESetDiscreteGra
I never explicitly called KSPGetPC(). I am embedding AMS in a libmesh (fem)
example. So, I only got the reference to pc from libmesh and set petscErr =
PCHYPRESetDiscreteGradient(pc, par_G);
From: Matthew Knepley
Date: Monday, 9 September 2024 at 20:57
To: Chockalingam, Karthikeyan (STFC,DL,H
On Mon, Sep 9, 2024 at 3:38 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> I didn’t know how to check the pc type but adding
>
> petscErr = PCSetType(pc, "hypre");
>
> before the two functions made it to work.
>
>
>
> But how does it work from the command l
I didn’t know how to check the pc type but adding
petscErr = PCSetType(pc, "hypre");
before the two functions made it to work.
But how does it work from the command line?
For summary:
KSPCreate(mesh.comm().get(), &ksp);
petscErr = PetscOptionsSetValue(NULL,"-ksp_type", "gmres");
petscErr =
On Mon, Sep 9, 2024 at 2:18 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> Calling the two functions after KSPSetFromOptions() did not work either.
>
Can you check that the PC has the correct type when you call it?
Thanks,
Matt
> Everything work
Calling the two functions after KSPSetFromOptions() did not work either.
Everything works from the command line.
I haven’t set KSPSetOperators, not sure if that is an issue.
From: Matthew Knepley
Date: Monday, 9 September 2024 at 19:09
To: Chockalingam, Karthikeyan (STFC,DL,HC)
Cc: Stefano Zampi
On Mon, Sep 9, 2024 at 1:21 PM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> Hi Stefano,
>
>
>
> Thank you. That was helpful. I tried the following:
>
>
>
> petscErr = PetscOptionsSetValue(NULL,"-ksp_type", "gmres");
>
> petscErr = PetscOptionsSetValue(NU
Hi Stefano,
Thank you. That was helpful. I tried the following:
petscErr = PetscOptionsSetValue(NULL,"-ksp_type", "gmres");
petscErr = PetscOptionsSetValue(NULL,"-pc_type", "hypre");
petscErr = PetscOptionsSetValue(NULL,"-pc_hypre_type", "ams");
// Set discrete gradient
petscErr = PCHY
I would say the best way is to look at the source code
https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/blob/main/src/ksp/pc/impls/hypre/hypre.c?ref_type=heads*L2061__;Iw!!G_uCfscf7eWS!b8Tv_XEoRSSehhvrYTELfhg0W08IjaDPGx3gkioYVRlIia4rZz7XLH7GXmXmEbathoNXMMfFaU8hWftak1IUQLf7BSgg7vg$
htt
On Mon, Sep 9, 2024 at 10:17 AM Karthikeyan Chockalingam - STFC UKRI <
karthikeyan.chockalin...@stfc.ac.uk> wrote:
> Hi Matt,
>
>
>
> You mentioned it doesn’t hurt to set the smoothing flags
>
>
>
>
> https://urldefense.us/v3/__https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27
Hi Matt,
You mentioned it doesn’t hurt to set the smoothing flags
https://urldefense.us/v3/__https://github.com/hypre-space/hypre/blob/3caa81955eb8d1b4e35d9b450e27cf6d07b50f6e/src/examples/ex15.c*L965__;Iw!!G_uCfscf7eWS!ab7xBNMnurfBQihWzSOZdJKuuhPObxZolYSuACYpW4-NN7L84moQXv7vO962vvaVT3soXUhcCaNH6
13 matches
Mail list logo