to_spline_with_BC Subroutine

private subroutine to_spline_with_BC(q_base_out, q_m, q_out)

Helper routine to go from spline interpolation points to spline coefficients and apply smooth axis boundary condition.

Arguments

Type IntentOptional 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)

Calls

proc~~to_spline_with_bc~~CallsGraph proc~to_spline_with_bc to_spline_with_BC proc~sbase_applybctodof_lgm t_sBase%sBase_applyBCtoDOF_LGM proc~to_spline_with_bc->proc~sbase_applybctodof_lgm proc~sbase_initdof t_sBase%sBase_initDOF proc~to_spline_with_bc->proc~sbase_initdof proc~solve SOLVE proc~sbase_applybctodof_lgm->proc~solve compute_interpolant compute_interpolant proc~sbase_initdof->compute_interpolant dgetrf dgetrf proc~solve->dgetrf dgetrs dgetrs proc~solve->dgetrs

Called by

proc~~to_spline_with_bc~~CalledByGraph proc~to_spline_with_bc to_spline_with_BC proc~buildtransform_sfl t_transform_sfl%BuildTransform_SFL proc~buildtransform_sfl->proc~to_spline_with_bc proc~transform_angles_3d Transform_Angles_3d proc~buildtransform_sfl->proc~transform_angles_3d proc~transform_angles_sinterp Transform_Angles_sinterp proc~buildtransform_sfl->proc~transform_angles_sinterp proc~transform_angles_3d->proc~to_spline_with_bc proc~transform_angles_sinterp->proc~to_spline_with_bc

Source Code

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