Re: [petsc-users] Question about linking LAPACK library

2023-04-24 Thread ­권승리 / 학생 / 항공우주공학과
Dear all It depends on the problem. It can have hundreds of thousands of degrees of freedom. best, Seung Lee Kwon 2023년 4월 25일 (화) 오후 12:32, Barry Smith 님이 작성: > > How large are the dense matrices you would like to invert? > > On Apr 24, 2023, at 11:27 PM, ­권승리 / 학생 / 항공우주공학과 > wrote: > >

Re: [petsc-users] Question about linking LAPACK library

2023-04-24 Thread Barry Smith
How large are the dense matrices you would like to invert? > On Apr 24, 2023, at 11:27 PM, ­권승리 / 학생 / 항공우주공학과 wrote: > > Dear all > > Hello. > I want to make an inverse matrix like inv(A) in MATLAB. > > Are there some methods to inverse matrix in petsc? > > If not, I want to use the

[petsc-users] Question about linking LAPACK library

2023-04-24 Thread ­권승리 / 학생 / 항공우주공학과
Dear all Hello. I want to make an inverse matrix like inv(A) in MATLAB. Are there some methods to inverse matrix in petsc? If not, I want to use the inverse function in the LAPACK library. Then, how to use the LAPACK library in petsc? I use the C language. Best, Seung Lee Kwon -- Seung Lee

Re: [petsc-users] Fwd: Inquiry about the dual space (PetscFECreateTabulation_Basic)

2023-04-24 Thread Matthew Knepley
On Mon, Apr 24, 2023 at 4:00 PM neil liu wrote: > I try to find the source code, that transforms the scalar basis <1 x y> to > a vectors basis > > / 1 \ / 0 \ / x \ / 0 \ / y \ / 0 \ > \ 0 / \ 1 / \ 0 / \ x / \ 0 / \ y / > > It seems it is processed by line 856 > >

Re: [petsc-users] Fwd: Inquiry about the dual space (PetscFECreateTabulation_Basic)

2023-04-24 Thread neil liu
I try to find the source code, that transforms the scalar basis <1 x y> to a vectors basis / 1 \ / 0 \ / x \ / 0 \ / y \ / 0 \ \ 0 / \ 1 / \ 0 / \ x / \ 0 / \ y / It seems it is processed by line 856 https://gitlab.com/petsc/petsc/-/blob/main/include/petsc/private/petscimpl.h Could you

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Matthew Knepley
On Mon, Apr 24, 2023 at 1:58 PM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > Changing the names to NULL produced the same error. > This is just to make the code simpler. > Don’t I have to give the fields a name? > They get the default name, which is the

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Changing the names to NULL produced the same error. Don’t I have to give the fields a name? The problem solution didn’t change from one time step to the next. [1;31m[0]PETSC ERROR: - Error Message --

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Matthew Knepley
On Mon, Apr 24, 2023 at 1:37 PM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > Great to know there is an example now. > > > > Yes, -pc_fieldsplit_defect_saddle_point worked. > > > > But I would like to understand what I did wrong (and why it didn’t work). >

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Great to know there is an example now. Yes, -pc_fieldsplit_defect_saddle_point worked. But I would like to understand what I did wrong (and why it didn’t work). After reading many posted posts, I needed to create PCFieldSplitSetIS to split the fields. I set the first N indices to the field phi

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Matthew Knepley
On Mon, Apr 24, 2023 at 10:22 AM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > Hello, > > > > I was able to construct the below K matrix (using submatrices P and P^T), > which is of type MATAIJ > > K = [A P^T > >P 0] > > and solved them using a

Re: [petsc-users] Setting up a matrix for Lagrange multiplier

2023-04-24 Thread Karthikeyan Chockalingam - STFC UKRI via petsc-users
Hello, I was able to construct the below K matrix (using submatrices P and P^T), which is of type MATAIJ K = [A P^T P 0] and solved them using a direct solver. However, I was reading online that this is a saddle point problem and I should be employing PCFIELDSPLIT. Since I have one

Re: [petsc-users] Reading user generated Cartesian grid into DMXX

2023-04-24 Thread Matthew Knepley
On Mon, Apr 24, 2023 at 7:33 AM 吉兴洲 wrote: > Dear all, > > I'm solving a fluid problem and it has multiple square cylinders in the > flow area. Unfortunately, I have to use a Cartesian grid (nonuniform) which > can't generated by Gmsh. > > I have noticed that the object *DMDA* and *DMFOREST*

[petsc-users] Celebrate Supercomputing Successes! Nominate colleagues for SIAG/Supercomputing Awards

2023-04-24 Thread McInnes, Lois Curfman via petsc-users
Dear all -- Please consider nominating colleagues for these 3 SIAG/Supercomputing Awards … and spread the word about these opportunities. The nomination deadline is July 31. We especially seek candidates for the SIAG/Supercomputing Early Career Prize: Prize Description The SIAM Activity

[petsc-users] Reading user generated Cartesian grid into DMXX

2023-04-24 Thread 吉兴洲
Dear all, I'm solving a fluid problem and it has multiple square cylinders in the flow area. Unfortunately, I have to use a Cartesian grid (nonuniform) which can't generated by Gmsh. I have noticed that the object *DMDA* and *DMFOREST* typically have there own intrinsic methods such as