# Exporting Matrices of AS method for Poisson Equation

**URL:** <https://community.freefem.org/t/exporting-matrices-of-as-method-for-poisson-equation/526>\
**Category:** General Discussion\
**Created:** [July 30, 2020, 8:02pm UTC](https://community.freefem.org/t/exporting-matrices-of-as-method-for-poisson-equation/526 "2020-07-30T20:02:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [July 31, 2020, 8:39am UTC](https://community.freefem.org/t/exporting-matrices-of-as-method-for-poisson-equation/526/7 "2020-07-31T08:39:33Z")

</div>

Here is what you can do:

1. replace `sym = 1` by `sym = 0`
2. replace the current `sparams` by:

```auto
set(A, sparams = "-pc_type gasm -pc_gasm_overlap 2 -pc_gasm_type basic -sub_pc_type cholesky -ksp_type cg -ksp_monitor -ksp_view -pc_gasm_view_subdomains -ksp_view_mat ascii:Poisson:ascii_matlab -ksp_view_rhs ascii:rhs:ascii_matlab -sub_ksp_view_mat ascii:Poisson_"+mpirank+":ascii_matlab");

```

This will export a `Poisson` file which is the global system, and `Poisson_rank` for each local subdomain matrices. In the KSP view, you’ll see each subdomain indices (inner means without overlap, outer means with overlap). It also saves the global right-hand side.

---

_[View the full topic](https://community.freefem.org/t/exporting-matrices-of-as-method-for-poisson-equation/526)._
