Geppert-Wiebicke non-axisymmetric coupling coefficient (Geppert & Wiebicke, 1991), the
companion to GWI encoding the amplitude of a two-mode Hall-MHD
interaction that generates or amplifies a non-axisymmetric component:
Cross-validated against an independent VSH-dot-product expansion in
TEST2_GW (src/tests.f90).
Warning
Unlike GWI, the extra square-root factor above is not
internally selection-rule-guarded by CGCOEFF alone -- it can go
negative for out-of-range (J1,J2,L) triples. This routine guards it
explicitly (returning 0, matching the mathematically correct value)
so it is still safe to call with any integer sextuple.
Returns: , complex.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | J1 |
First coupled degree, . |
||
| integer(kind=i4), | intent(in) | :: | M1 |
First coupled order, . |
||
| integer(kind=i4), | intent(in) | :: | J2 |
Second coupled degree, . |
||
| integer(kind=i4), | intent(in) | :: | M2 |
Second coupled order, . |
||
| integer(kind=i4), | intent(in) | :: | L |
Resulting degree, . |
||
| integer(kind=i4), | intent(in) | :: | M |
Resulting order, . |
FUNCTION GWJ_DP(J1,M1,J2,M2,L,M) RESULT(GWJ) IMPLICIT NONE INTEGER(KIND=i4), INTENT(IN) :: J1 INTEGER(KIND=i4), INTENT(IN) :: M1 INTEGER(KIND=i4), INTENT(IN) :: J2 INTEGER(KIND=i4), INTENT(IN) :: M2 INTEGER(KIND=i4), INTENT(IN) :: L INTEGER(KIND=i4), INTENT(IN) :: M REAL(KIND=dp) :: TRIANGLE_ARG COMPLEX(KIND=dp) :: GWJ ! Guard the sqrt() argument below the same way CGCOEFF guards its own ! triangle inequality: this product is negative outside the valid ! (J1+1,J2,L) triangle range, which would otherwise silently produce ! NaN (or trap under -ffpe-trap builds) instead of the correct zero. TRIANGLE_ARG = (J1+J2+L+2.d0)*(J2+L-J1)* & (J1+J2-L+1.d0)*(J1-J2+L+1.d0) IF (TRIANGLE_ARG < 0.d0) THEN GWJ = DCMPLX(0.d0, 0.d0) RETURN END IF GWJ=-DSQRT((2.d0*J1+1.d0)*(2.d0*J2+1.d0)/(2.d0*L+1.d0)/4.d0/pi)* & CGCOEFF(J1+1,0,J2,0,L,0)*CGCOEFF(J1,M1,J2,M2,L,M)* & DCMPLX(0.d0, 1.d0)*DSQRT(TRIANGLE_ARG)/2.d0 RETURN END FUNCTION GWJ_DP