AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

Right-hand-side of Poisson examples should be changed

Open halpernf opened this issue 7 years ago • 4 comments

AMGX ships with many nice sample programs, including simple implementation of Poisson-like equations. Currently, the charge function (e.g. in A x = b, the array b) is set to 1.d0 everywhere.

This is a poor choice, since integrating a constant over larger and large volumes gives you an exponentially growing solution. As a consequence, the sample cases have terrible convergence rates and do not scale as the problem size is increased.

I suggest a better choice: set b = sin( 2 * pi * x / Lx ) * sin( 2 * pi * y / Ly ) * sin( 2 * pi * z / Lz ), which satisfies either periodic or Dirichlet boundary conditions. This is more representative of the use of a Poisson solver.

halpernf avatar May 31 '18 16:05 halpernf

Thanks for your comment, sounds like a good addition!

marsaev avatar Jun 19 '18 21:06 marsaev

8R(ZE(L$Y9IU`5KHCKUM8WW

pyramidpoint avatar May 12 '19 13:05 pyramidpoint

@halpernf @swarren I wanna know the reason

pyramidpoint avatar May 12 '19 13:05 pyramidpoint

@pyramidpoint please, create separate issues for your questions. As to errors you are seeing - you should add "store_res_history=1" parameter your solver's config

marsaev avatar May 17 '19 11:05 marsaev