Ivonnita has asked for the wisdom of the Perl Monks concerning the following question:

I am getting the following warning for a perl script to generate a volume: 1234surface 6900 surface WARNING:Your grid dimensions are mutually prime. Convergence is very unlikely. I understand this is not an error, but what does it mean? How much this warning can affect the accuracy or reliability of my results? Thank you!

Replies are listed 'Best First'.
Re: learning about warnings
by LanX (Saint) on Jul 08, 2025 at 21:56 UTC
    This is not a Perl language error.

    It belongs to the domain of the app you are using, which you haven't disclosed to us.

    I googled the error and landed on the github page of a Python/C project.

    Anyway further search revealed that this seems connected to simulation tasks with ever finer grids of cells.

    A grid is said to "converge" if results stay roughly the same even with finer grids. More cells mean more computation needed, something one wants to possibly avoid.

    Now if you use a grid which is not mutually prime, you are wasting resources, because you are effectively falling back onto an underlying rougher grid available by dividing both dimensions of the grid by a common factor.

    I.o.W. you don't wanna see 3x3 tic-tac-toe effects returning on a 9x9 chessboard.

    But if the grid was something like 6x7 or 9x11 it's not possible to have a superimposed rougher grid of the same proportion.*

    Disclaimer: I'm new to this field, my explanation comes from pure mathematical intuition.

    But hey, it's also totally off topic here anyway, so why not guessing :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

    update

    *) improved "same proportion"

Re: learning about warnings
by marto (Cardinal) on Jul 08, 2025 at 21:27 UTC
      Also, 1234 and 6900 aren't mutually prime ("coprime"). They're both divisible by 2.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]