Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Jacobi Method

by Lucero (Novice)
on Sep 29, 2021 at 17:10 UTC ( #11137121=perlquestion: print w/replies, xml ) Need Help??

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

Hello. I wanted to know if is there a module or library in Perl that uses the Jacobi Method and if it is possible to use from Perl routines that have been created in C.

Replies are listed 'Best First'.
Re: Jacobi Method
by Fletch (Bishop) on Sep 29, 2021 at 17:16 UTC

    Searching for "jacobi method" finds passing mention in PDLA::MatrixOps, but if you perhaps asked a more specific question with sample code showing what you're attempting to do you might get a more germane (or possibly even useful) reply.

    As for your second question, yes; see perlxs or Inline::C for example. In general you'd want to search CPAN first because if you're wanting to use an open source C library there's a good chance someone's written a module wrapping it already.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Thank you. What I have to do is find eigenvalues and eigenvectors using that method but I have been asked to use certain routine from the book Numerical Recipes in C.
        An additional PDL module that uses Jacobians within a Levenberg-Marquardt approach is PDL::Fit::Levmar.
        FWIR, jacobi (and SOR, Gauss-Seidel) are basically just averaging values over time steps. How many dimensions are you dealing with and what is the PDE you're solving? PDL almost surely can help you out; but even if not it'd be pretty easy to implement this in pure Perltm.
Re: Jacobi Method
by bliako (Monsignor) on Sep 30, 2021 at 00:16 UTC
Re: Jacobi Method
by karlgoethebier (Abbot) on Sep 29, 2021 at 20:36 UTC

    Until tonight I didnít know anything about this issue - except that an old friend of mine is named Jacoby. I guess this is what you are looking for. Probably you find a solution in PDL. I donít know.

    But you might take a look at this. If Iím not totally wrong about what you want.

    If I guessed right you might take a look at Is this a way to Go Perl #1.

    And probably you find a "simple solution" for your problem or at least some further inspiration. And a serious use case to Go Perl.

    Best regards, Karl

    ęThe Crux of the Biscuit is the ApostropheĽ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11137121]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-07-02 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (102 votes). Check out past polls.

    Notices?