[petsc-users] Blocked matrix storage
Matthew Knepley
knepley at gmail.com
Fri Feb 26 11:13:10 CST 2016
On Fri, Feb 26, 2016 at 11:01 AM, Manav Bhatia <bhatiamanav at gmail.com>
wrote:
> Hi,
>
> I am working on a problem with system of equations in complex numbers,
> and am splitting it up to solve it with petsc compiled for real number
> support:
>
> (J_R + i J_I) (x_R + i x_I) + (r_R + i r_I) = 0
>
> is then defined as
>
> [ J_R -J_I] {x_R} + {r_R} = {0}
> [ J_I J_R] {x_I} + {r_I} = {0}
>
> I have tried block-Schur solver with the Jacobian defined using the nested
> matrix format with a separate matrix for each quadrant of the Jacobian.
> This works well for diagonally dominant cases, but for high-frequency
> problems (J_I scales with frequency), the solver convergence is very slow.
>
> Now, I am attempting to create a single matrix so that I can use the other
> ksp+pc combinations for this system of equations.
>
> I am wondering if there is a natural way to create an mpiaij or an mpibaij
> matrix from the nested matrix defined above.
>
You can use this
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html
to have the same assembly code insert into a global matrix. That way you
can use Fieldsplit or other preconditioners.
Also, a full Schur complement would converge in 1 iteration with exact
solves. I always start there and then back off.
Matt
> I would appreciate any guidance on this.
>
> Regards,
> Manav
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160226/49a8420d/attachment.html>
More information about the petsc-users
mailing list