Applies beam contribution to pressure field
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout) | :: | U |
SUBROUTINE ApplyContribution( U ) !! Applies beam contribution to pressure field COMPLEX, INTENT( INOUT ) :: U COMPLEX ( KIND=4 ) :: dfield SELECT CASE( Beam%RunType( 1 : 1 ) ) CASE ( 'E' ) ! eigenrays IF ( Title( 1 : 9 ) == 'BELLHOP- ' ) THEN ! BELLHOP run CALL WriteRay2D( SrcDeclAngle, iS ) ELSE ! BELLHOP3D run CALL WriteRay3D( DegRad * SrcDeclAngle, DegRad * SrcAzimAngle, is ) ! produces no output if NR=1 END IF CASE ( 'A', 'a' ) ! arrivals CALL AddArr( omega, iz, ir, Amp, phaseInt, delay, SrcDeclAngle, & & RcvrDeclAngle, ray2D( iS )%NumTopBnc, ray2D( iS )%NumBotBnc ) CASE ( 'C' ) ! coherent TL dfield = CMPLX( Amp * EXP( -i * ( omega * delay - phaseInt ) ) ) ! WRITE( PRTFile, * ) 'ApplyContribution dfield', dfield U = U + dfield ! omega * n * n / ( 2 * ray2d( iS )%c**2 * delay ) ) ) ) ! curvature correction CASE DEFAULT ! incoherent/semicoherent TL IF ( Beam%Type( 1 : 1 ) == 'B' ) THEN ! Gaussian beam U = U + SNGL( SQRT( 2. * pi ) * ( const * EXP( AIMAG( omega * delay ) ) ) ** 2 * W ) ELSE U = U + SNGL( ( const * EXP( AIMAG( omega * delay ) ) ) ** 2 * W ) END IF END SELECT END SUBROUTINE ApplyContribution