square root of matrix
Dear all, For weird reasons I'd like to solve Ux = y where U is the Cholesky square root of a given symmetric positive definite matrix A. Is there a way to abuse the PETSc solver interface into doing this? all the best --cjc -- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916
Hello Colin, I don't have an answer to your question but I am very curious to know if someone else. In the Surface QG model, to determine the streamfunction from the buoyancy you need to solve an equation that looks like b = - (Laplacian)^1/2 \psi What people typically do is to transform everything into spectral space where it then becomes \hat b = - K \hat \psi It requires using FFT's, which are easily accessible, but I'm not sure if this is relevant to the problem you want to solve. If someone figures out how to do this in Firedrake I would be happy to add another SQG demo, since it would only require a minor change from the existing QG code. Cheers, Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Colin Cotter [colin.cotter@imperial.ac.uk] Sent: Tuesday, February 14, 2017 3:21 AM To: firedrake Subject: [firedrake] square root of matrix Dear all, For weird reasons I'd like to solve Ux = y where U is the Cholesky square root of a given symmetric positive definite matrix A. Is there a way to abuse the PETSc solver interface into doing this? all the best --cjc -- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916<http://www.cambridge.org/9781107663916> [http://assets.cambridge.org/97811076/63916/cover/9781107663916.jpg]
On 14/02/17 08:21, Colin Cotter wrote:
Dear all, For weird reasons I'd like to solve Ux = y where U is the Cholesky square root of a given symmetric positive definite matrix A. Is there a way to abuse the PETSc solver interface into doing this?
Hi Colin, I have partial information about your question. I need to access the Cholesky factorisation data to verify the second-order sufficiency conditions for constrained minimisation problems. (I'm using dolfin, but it shouldn't matter very much for your purposes.) My petsc4py code looks like pc = PETSc.PC().create(comm) pc.setOperators(A.mat()) pc.setType("cholesky") pc.setFactorSolverPackage("mumps") pc.setUp() to calculate the Cholesky factorisation, then F = pc.getFactorMatrix() (neg, zero, pos) = F.getInertia() to compute the inertia of the matrix. (I also need some MUMPS options, but I presume you don't care about these, since you're not asking it to compute the inertia.) Maybe you can get the sparse matrix representation out of F and solve a linear system with it, who knows. Cheerio, Patrick
participants (3)
- 
                
                Colin Cotter
- 
                
                Francis Poulin
- 
                
                Patrick Farrell