[mesa-users] Simple matrix inversion function?
Warrick Ball
wball at astro.physik.uni-goettingen.de
Thu Jun 2 11:27:12 EDT 2016
Hi again, fellow MESA users,
I'm busy modifying the part of the astero module that computes the
separation ratios (currently r_010 and r_02) so that it will (a) correctly
incorporate the covariance matrix and (b) also use r_13.
Once this is up and running, I'll post again, but for now, can someone
tell me how to use the existing MESA subroutines to invert a matrix?
I've computed the covariance matrix but I need it's inverse to compute the
chi^2.
I've had a look around the mtx module but, though I can find routines to
solve matrix equations like A*x=B, I can't seem to find a subroutine to
invert. I found the subroutine DGETRI in mtx/lapack_src/dgetri.f and,
under the impression that this was linked in mtx_lib, I tried adding
use mtx_lib, only: dgetri
(or DGETRI) in star/astero/src/astero_support.f, but I get a compiler
error that seems to say that dgetri isn't in mtx_lib.
use mtx_lib, only: dgetri
1
Error: Symbol 'dgetri' referenced at (1) not found in module 'mtx_lib'
I'm pretty sure a relevant routine should be in the MESA or the MESA SDK
somewhere...
Alternatively, if there's a simple (even if inefficient) way to invert a
(positive definite) matrix, I can just implement that in the astero
module. The inverse only needs to be computed once and only has
dimensions slightly less than the total number of observed modes (up to
about 50x50).
Cheers,
Warrick
------------
Warrick Ball
Postdoc, Institut für Astrophysik Göttingen
wball at astro.physik.uni-goettingen.de
+49 (0) 551 39 5069
More information about the Mesa-users
mailing list