project from any 2D set of interpolation points, at tensor-product of (theta,zeta) positions given by "xn", to all modes DOFs = addDOFs+ fac MATMUL(base_xn,yn)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_fBase), | intent(in) | :: | sf |
self |
||
| logical, | intent(in) | :: | add |
=F initialize DOFs , =T add to DOFs |
||
| real(kind=wp), | intent(in) | :: | factor |
scale result by factor, before adding to DOFs (should be =1.0_wp if not needed) |
||
| integer, | intent(in) | :: | deriv |
=0: base, =2: dthet , =3: dzeta |
||
| integer, | intent(in) | :: | np |
total number of 2D interpolation points |
||
| real(kind=wp), | intent(in) | :: | xn(2,1:np) |
(theta=1,zeta=2) position of tensor-product interpolation points, [0,2pi]x[0,2pi/nfp],size(2,mn_IP) |
||
| real(kind=wp), | intent(in) | :: | yn(1:np) |
value at interpolation points |
||
| real(kind=wp), | intent(inout) | :: | DOFs(1:sf%modes) |
array of all modes |
SUBROUTINE fBase_projectxntoDOF(sf,add,factor,deriv,np,xn,yn,DOFs) ! MODULES IMPLICIT NONE ! INPUT VARIABLES -------------------------! CLASS(t_fBase), INTENT(IN ) :: sf !! self LOGICAL , INTENT(IN ) :: add !! =F initialize DOFs , =T add to DOFs REAL(wp) , INTENT(IN ) :: factor !! scale result by factor, before adding to DOFs (should be =1.0_wp if not needed) INTEGER , INTENT(IN ) :: deriv !! =0: base, =2: dthet , =3: dzeta INTEGER , INTENT(IN ) :: np !! total number of 2D interpolation points REAL(wp) , INTENT(IN ) :: xn(2,1:np) !! (theta=1,zeta=2) position of tensor-product interpolation points, [0,2pi]x[0,2pi/nfp],size(2,mn_IP) REAL(wp) , INTENT(IN ) :: yn(1:np) !! value at interpolation points ! OUTPUT VARIABLES -------------------------! REAL(wp) , INTENT(INOUT) :: DOFs(1:sf%modes) !! array of all modes ! LOCAL VARIABLES -------------------------! REAL(wp) :: radd REAL(wp) :: base_xn(1:np,1:sf%modes) ! CODE --------------------------------------------------------------------------------------------------------------------------! base_xn=sf%eval_xn(deriv,np,xn) radd=MERGE(1.0_wp,0.0_wp,add) __PAMATVEC_T(radd,DOFs,factor,base_xn,yn) END SUBROUTINE fBase_projectxntoDOF