Boundary conditions...

80 views
Skip to first unread message

Steve Spicklemire

unread,
Sep 27, 2012, 8:14:36 PM9/27/12
to pyamg...@googlegroups.com
Hi Folks,

I'm totally new to pyamg, and really to pysparse. Is there a general/gentle introduction to handling various types of boundary conditions in pyamg? I see some hints (for example in the diffusion example) but I was hoping for some more general discussion. In my experience with relaxation I've usually enforced BCs on each iteration. Is there an easy way to do that with pyamg?

thanks!
-steve

Oren Livne

unread,
Sep 27, 2012, 9:31:54 PM9/27/12
to pyamg...@googlegroups.com

Oren Livne

unread,
Sep 27, 2012, 9:35:38 PM9/27/12
to pyamg...@googlegroups.com
Dear Steve,

I don't know the answer to the pyamg question, but note that in some cases it is not desirable to enforce the B.C.s as part of/after a relaxation sweep. It works for Dirichlet B.C., but for Neumann B.C., for instance, it is better to smooth along the boundary, otherwise large localized residuals will be produced next to boundary, and degrade the global asymptotic convergence factors unless additional local relaxation sweeps are added near that boundary. So either smooth along the boundary or add local sweeps.

Oren


On Thursday, September 27, 2012 7:14:36 PM UTC-5, Steve Spicklemire wrote:

Jacob Schroder

unread,
Oct 8, 2012, 10:33:18 AM10/8/12
to pyamg...@googlegroups.com
Hi Steve,

I'm sorry for the delayed response. PyAMG does have the routine
pyamg.relaxation.gauss_seidel_indexed(...).
This routine works just like gauss_seidel, except that you pass it the
list of indices to relax. Note that you can repeat indices in the
list, so that you can actually do multiple sweeps with
gauss_seidel_indexed. You could use this routine to do local sweeps
near the boundary, in addition to one or two global sweeps.

More broadly, after you've formed your multilevel solver, you can
change the solver.levels[k].presmoother|postsmoother attributes to
make the relaxation method at each level k whatever you want.

Hope this helps,

Jacob
> --
> You received this message because you are subscribed to the Google Groups
> "pyamg-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyamg-user/-/MdpHhdhQm08J.
>
> To post to this group, send email to pyamg...@googlegroups.com.
> To unsubscribe from this group, send email to
> pyamg-user+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pyamg-user?hl=en.

Steve Spicklemire

unread,
Oct 9, 2012, 5:57:30 PM10/9/12
to pyamg...@googlegroups.com
Thanks Jacob! A delayed response is 10x better than no response at
all. I'll try to absorb this and get back. Perhaps I could cook up a
simple example of what I'm trying to do and post it so that the
details could be discussed. ;-)

thanks,
-steve

On Mon, Oct 8, 2012 at 8:33 AM, Jacob Schroder
<jacob.b....@gmail.com> wrote:
> Hi Steve,
>
> I'm sorry for the delayed response. PyAMG does have the routine
> pyamg.relaxation.gauss_seidel_indexed(...).
...

Jacob Schroder

unread,
Oct 24, 2012, 11:00:15 PM10/24/12
to pyamg...@googlegroups.com
Hi Steve,

Feel free to post a code fragment, and we'll take a look.

- Jacob
> --
> You received this message because you are subscribed to the Google Groups "pyamg-user" group.
Reply all
Reply to author
Forward
0 new messages