Target field for Part B: a smooth angular Gaussian bump with slight
modulation (carries and content, on
top of effectively unbounded content from the Gaussian
profile in ). Purely radial, for simplicity.
Note
The modulation is weighted by so the
field stays single-valued at the poles: at (or
), every maps to the same physical point, so any
legitimate smooth field must be -independent there. An
earlier version of this field used a bare term with no
such weighting -- it was multi-valued at the pole (1.5 approaching
along , 0.5 along ), and no finite
spherical harmonic series can converge to a discontinuous function;
the reconstruction error plateaued at exactly 0.5 (the size of the
discontinuity) instead of shrinking with . Caught by
comparing this driver's convergence curve against an isolated,
single- reconstruction check, which did not show the
plateau.
Returns: The target vector field , complex
3-vector (purely radial).
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
FUNCTION FIELD_GAUSSIAN(THETA,PHI)RESULT(F)IMPLICIT NONEREAL(KIND=dp),INTENT(IN)::THETAREAL(KIND=dp),INTENT(IN)::PHICOMPLEX(KIND=dp),DIMENSION(3)::FREAL(KIND=dp)::BUMPBUMP=DEXP(-THETA**2/(2.d0*SIGMA_B**2))*&(1.d0+0.5d0*DSIN(THETA)*DCOS(PHI))F(1)=DCMPLX(BUMP,0.d0)F(2)=DCMPLX(0.d0,0.d0)F(3)=DCMPLX(0.d0,0.d0)END FUNCTION FIELD_GAUSSIAN