R-matrix solver¶
High-level R-matrix solver built on a Lagrange mesh.
- class jitr.rmatrix.rmatrix.Solver(nbasis, basis='Legendre', **args)[source]¶
Bases:
objectSolve coupled-channel Schrödinger equations with the R-matrix method.
- get_channel_block(matrix, i, j=None)[source]¶
Extract a channel block from a full block-structured matrix.
- free_matrix(a, l, E=None, mu=None, coupled=True)[source]¶
Precompute the free Hamiltonian matrix.
With
coupled=Truereturn the full block-diagonal matrix over every channel inl. Withcoupled=Falsethe channels are independent, so return onenbasis x nbasisblock per channel instead; each block owns its memory rather than viewing into the(nbasis * n_channels)**2coupled matrix.
- interaction_matrix(k0, E0, a, nch, local_potential=None, nonlocal_potential=None)[source]¶
Build the interaction matrix from pre-evaluated potential arrays.
- solve(channels, asymptotics, local_potential=None, nonlocal_potential=None, interaction_matrix=None, free_matrix=None, basis_boundary=None, weights=None, wavefunction=False)[source]¶
Solve the scattering problem for one coupled set of channels.
Channels may differ in wavenumber
k_i, reduced massmu_iand Sommerfeld parameter; they share one physical channel radius, and the interior problem is solved on the grids = k_0 rof channel 0. The asymptotics must be evaluated at each channel’s ownrho_i = k_i a(asProjectileTargetSystem.get_partial_wave_channels()does), with derivatives with respect torho_i.- Parameters:
channels (
Channels) – Channel data for one partial wave.asymptotics (
Asymptotics) – Coulomb-Hankel functions at each channel’s radius.local_potential (
TypeAliasType|None) – Local potential in MeV on the quadrature grid, shape(nbasis,)or(nch, nch, nbasis).nonlocal_potential (
TypeAliasType|None) – Nonlocal potential in MeV fm^-1 on the quadrature grid.interaction_matrix (
ndarray[tuple[Any,...],dtype[cdouble]] |None) – Precomputed interaction matrix; overrides the potentials.free_matrix (
ndarray[tuple[Any,...],dtype[cdouble]] |None) – Precomputed free matrix.basis_boundary (
ndarray[tuple[Any,...],dtype[cdouble]] |None) – Precomputed basis functions at the channel radius.weights (
ndarray[tuple[Any,...],dtype[double]] |None) – Amplitude of the incoming wave in each channel; defaults to channel 0 only.wavefunction (
bool) – If True, also return the interior expansion coefficients.
- Return type:
- Returns:
(R, S, uext_prime_boundary), or(R, S, coeffs, uext_prime_boundary)ifwavefunction.Sis the flux-normalized (unitary for real potentials) S-matrix,S[i, j]the amplitude for outgoing channeligiven incoming channelj.Rsatisfiesu_i(a) = sum_j R[i, j] rho_j du_j/drho_jat the channel radius.uext_prime_boundaryis the Bloch-surface source in the solver’s units. For a single channel, or channels with equalkandmu, these reduce to the usual single-grid quantities. Thecoeffscorrespond to raw (not flux-normalized) incoming amplitudesweights.