Helper routine to go from spline interpolation points to spline coefficients and apply smooth axis boundary condition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_base), | intent(in) | :: | q_base_out | |||
| real(kind=wp), | intent(in) | :: | q_m(1:q_base_out%f%modes,1:q_base_out%s%nBase) | |||
| real(kind=wp), | intent(out) | :: | q_out(q_base_out%s%nBase,1:q_base_out%f%modes) |
SUBROUTINE to_spline_with_BC(q_base_out,q_m,q_out) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES CLASS(t_Base),INTENT(IN) :: q_base_out !< basis of function f REAL(wp) ,INTENT(IN) :: q_m(1:q_base_out%f%modes,1:q_base_out%s%nBase) !< coefficients of f, sampled at s_IP points !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES REAL(wp) ,INTENT(OUT) :: q_out(q_base_out%s%nBase,1:q_base_out%f%modes) !< spline/fourier coefficients of q in new angles !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: iMode INTEGER :: BCtype_axis REAL(wp) :: BCval_axis,BCval_edge !=================================================================================================================================== !transform back to corresponding representation of DOF in s !$OMP PARALLEL DO & !$OMP SCHEDULE(STATIC) DEFAULT(SHARED) PRIVATE(iMode,BCtype_axis,BCval_axis,BCval_edge) DO iMode=1,q_base_out%f%modes q_out(:,iMode)=q_base_out%s%initDOF( q_m(iMode,:) ) BCval_edge=q_m(iMode,q_base_out%s%nBase) !NEW m-dependent smooth BC at axis, for m>deg, switch off all DOF up to deg BCtype_axis=-1*MIN(q_base_out%s%deg+1,q_base_out%f%Xmn(1,iMode)) ! SELECT CASE(q_base_out%f%zero_odd_even(iMode)) CASE(MN_ZERO,M_ZERO) BCval_axis=q_m(iMode,1) CASE DEFAULT BCval_axis=0.0_wp END SELECT CALL q_base_out%s%applyBCtoDOF(q_out(:,iMode),(/BCtype_axis,BC_TYPE_DIRICHLET/),(/BCval_axis,BCval_edge/)) END DO !$OMP END PARALLEL DO END SUBROUTINE to_spline_with_BC