evaluate_base_tens_all Subroutine

public subroutine evaluate_base_tens_all(n_s, n_t, n_z, s, theta, zeta, Qsel, Q, dQ_ds, dQ_dthet, dQ_dzeta, dQ_dss, dQ_dst, dQ_dsz, dQ_dtt, dQ_dtz, dQ_dzz)

Uses

  • proc~~evaluate_base_tens_all~~UsesGraph proc~evaluate_base_tens_all evaluate_base_tens_all module~modgvec_base MODgvec_base proc~evaluate_base_tens_all->module~modgvec_base module~modgvec_fbase MODgvec_fBase module~modgvec_base->module~modgvec_fbase module~modgvec_globals MODgvec_Globals module~modgvec_base->module~modgvec_globals module~modgvec_sbase MODgvec_sBase module~modgvec_base->module~modgvec_sbase module~modgvec_sgrid MODgvec_sGrid module~modgvec_base->module~modgvec_sgrid module~modgvec_fbase->module~modgvec_globals iso_fortran_env iso_fortran_env module~modgvec_globals->iso_fortran_env module~modgvec_sbase->module~modgvec_globals module~modgvec_sbase->module~modgvec_sgrid module~sll_m_bsplines sll_m_bsplines module~modgvec_sbase->module~sll_m_bsplines module~sll_m_spline_interpolator_1d sll_m_spline_interpolator_1d module~modgvec_sbase->module~sll_m_spline_interpolator_1d module~sll_m_spline_matrix sll_m_spline_matrix module~modgvec_sbase->module~sll_m_spline_matrix module~modgvec_sgrid->module~modgvec_globals module~sll_m_assert sll_m_assert module~sll_m_bsplines->module~sll_m_assert module~sll_m_bsplines_base sll_m_bsplines_base module~sll_m_bsplines->module~sll_m_bsplines_base module~sll_m_bsplines_non_uniform sll_m_bsplines_non_uniform module~sll_m_bsplines->module~sll_m_bsplines_non_uniform module~sll_m_bsplines_uniform sll_m_bsplines_uniform module~sll_m_bsplines->module~sll_m_bsplines_uniform module~sll_m_errors sll_m_errors module~sll_m_bsplines->module~sll_m_errors module~sll_m_working_precision sll_m_working_precision module~sll_m_bsplines->module~sll_m_working_precision module~sll_m_spline_interpolator_1d->module~sll_m_spline_matrix module~sll_m_spline_interpolator_1d->module~sll_m_assert module~sll_m_boundary_condition_descriptors sll_m_boundary_condition_descriptors module~sll_m_spline_interpolator_1d->module~sll_m_boundary_condition_descriptors module~sll_m_spline_interpolator_1d->module~sll_m_bsplines_base module~sll_m_spline_interpolator_1d->module~sll_m_errors module~sll_m_spline_1d sll_m_spline_1d module~sll_m_spline_interpolator_1d->module~sll_m_spline_1d module~sll_m_spline_interpolator_1d->module~sll_m_working_precision module~sll_m_spline_matrix->module~sll_m_errors module~sll_m_spline_matrix_banded sll_m_spline_matrix_banded module~sll_m_spline_matrix->module~sll_m_spline_matrix_banded module~sll_m_spline_matrix_base sll_m_spline_matrix_base module~sll_m_spline_matrix->module~sll_m_spline_matrix_base module~sll_m_spline_matrix_dense sll_m_spline_matrix_dense module~sll_m_spline_matrix->module~sll_m_spline_matrix_dense module~sll_m_spline_matrix->module~sll_m_working_precision module~sll_m_boundary_condition_descriptors->module~sll_m_working_precision module~sll_m_bsplines_base->module~sll_m_assert module~sll_m_bsplines_base->module~sll_m_working_precision module~sll_m_bsplines_non_uniform->module~sll_m_assert module~sll_m_bsplines_non_uniform->module~sll_m_bsplines_base module~sll_m_bsplines_non_uniform->module~sll_m_working_precision module~sll_m_bsplines_uniform->module~sll_m_assert module~sll_m_bsplines_uniform->module~sll_m_bsplines_base module~sll_m_bsplines_uniform->module~sll_m_errors module~sll_m_bsplines_uniform->module~sll_m_working_precision module~sll_m_errors->iso_fortran_env module~sll_m_spline_1d->module~sll_m_assert module~sll_m_spline_1d->module~sll_m_bsplines_base module~sll_m_spline_1d->module~sll_m_working_precision module~sll_m_spline_matrix_banded->iso_fortran_env module~sll_m_spline_matrix_banded->module~sll_m_assert module~sll_m_spline_matrix_banded->module~sll_m_errors module~sll_m_spline_matrix_banded->module~sll_m_spline_matrix_base module~sll_m_spline_matrix_banded->module~sll_m_working_precision module~sll_m_spline_matrix_base->module~sll_m_working_precision module~sll_m_spline_matrix_dense->iso_fortran_env module~sll_m_spline_matrix_dense->module~sll_m_assert module~sll_m_spline_matrix_dense->module~sll_m_errors module~sll_m_spline_matrix_dense->module~sll_m_spline_matrix_base module~sll_m_spline_matrix_dense->module~sll_m_working_precision

Evaluate the basis with a tensorproduct for the given 1D (s, theta, zeta) values

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_s

number of evaluation points

integer, intent(in) :: n_t

number of evaluation points

integer, intent(in) :: n_z

number of evaluation points

real, intent(in) :: s(n_s)

evaluation points to construct a mesh

real, intent(in) :: theta(n_t)

evaluation points to construct a mesh

real, intent(in) :: zeta(n_z)

evaluation points to construct a mesh

character(len=2) :: Qsel

selection string: which variable to evaluate

real, intent(out), DIMENSION(n_s,n_t,n_z) :: Q

reference space position & derivatives

real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_ds

reference space position & derivatives

real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dthet

reference space position & derivatives

real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dzeta

reference space position & derivatives

real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dss
real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dst
real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dsz
real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dtt
real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dtz
real, intent(out), DIMENSION(n_s,n_t,n_z) :: dQ_dzz

Calls

proc~~evaluate_base_tens_all~~CallsGraph proc~evaluate_base_tens_all evaluate_base_tens_all proc~fbase_evaldof_xn_tens t_fBase%fBase_evalDOF_xn_tens proc~evaluate_base_tens_all->proc~fbase_evaldof_xn_tens proc~sbase_evaldof2d_s t_sBase%sBase_evalDOF2D_s proc~evaluate_base_tens_all->proc~sbase_evaldof2d_s proc~select_base_dofs select_base_dofs proc~evaluate_base_tens_all->proc~select_base_dofs dgemm dgemm proc~fbase_evaldof_xn_tens->dgemm proc~fbase_eval1d_thet fBase_eval1d_thet proc~fbase_evaldof_xn_tens->proc~fbase_eval1d_thet proc~fbase_eval1d_zeta fBase_eval1d_zeta proc~fbase_evaldof_xn_tens->proc~fbase_eval1d_zeta dgemv dgemv proc~sbase_evaldof2d_s->dgemv proc~sbase_eval t_sBase%sBase_eval proc~sbase_evaldof2d_s->proc~sbase_eval eval_basis eval_basis proc~sbase_eval->eval_basis eval_basis_and_n_derivs eval_basis_and_n_derivs proc~sbase_eval->eval_basis_and_n_derivs lagrangeinterpolationpolys lagrangeinterpolationpolys proc~sbase_eval->lagrangeinterpolationpolys proc~sgrid_find_elem t_sGrid%sGrid_find_elem proc~sbase_eval->proc~sgrid_find_elem

Source Code

SUBROUTINE evaluate_base_tens_all(n_s, n_t, n_z, s, theta, zeta, Qsel, Q, dQ_ds, dQ_dthet, dQ_dzeta, &
                                  dQ_dss, dQ_dst, dQ_dsz, dQ_dtt, dQ_dtz, dQ_dzz)
  ! MODULES
  USE MODgvec_base,           ONLY: t_base
  ! INPUT/OUTPUT VARIABLES ------------------------------------------------------------------------------------------------------!
  INTEGER, INTENT(IN) :: n_s, n_t, n_z                                            !! number of evaluation points
  REAL, INTENT(IN) :: s(n_s), theta(n_t), zeta(n_z)                               !! evaluation points to construct a mesh
  CHARACTER(LEN=2) :: Qsel                                                        !! selection string: which variable to evaluate
  REAL, INTENT(OUT), DIMENSION(n_s,n_t,n_z) :: Q, dQ_ds, dQ_dthet, dQ_dzeta       !! reference space position & derivatives
  REAL, INTENT(OUT), DIMENSION(n_s,n_t,n_z) :: dQ_dss, dQ_dst, dQ_dsz, dQ_dtt, dQ_dtz, dQ_dzz
  ! LOCAL VARIABLES -------------------------------------------------------------------------------------------------------------!
  INTEGER :: i                                                         ! loop variables
  CLASS(t_base), POINTER :: base                                       ! pointer to the base object (X1, X2, LA)
  REAL, POINTER :: solution_dofs(:,:)                                  ! pointer to the solution dofs (U(0)%X1, U(0)%X2, U(0)%LA)
  REAL, ALLOCATABLE, DIMENSION(:) :: Q_dofs, dQ_ds_dofs, dQ_dss_dofs   ! DOFs for the fourier series
  ! CODE ------------------------------------------------------------------------------------------------------------------------!
  CALL select_base_dofs(Qsel, base, solution_dofs)
  ALLOCATE(Q_dofs(     base%f%modes), &
           dQ_ds_dofs( base%f%modes), &
           dQ_dss_dofs(base%f%modes))
  !$OMP PARALLEL DO SCHEDULE(STATIC) DEFAULT(SHARED) &
  !$OMP PRIVATE(i,Q_dofs,dQ_ds_dofs,dQ_dss_dofs)
  DO i=1,n_s
    ! evaluate spline to get the fourier dofs
    Q_dofs = base%s%evalDOF2D_s(s(i), base%f%modes, 0, solution_dofs(:,:))
    dQ_ds_dofs = base%s%evalDOF2D_s(s(i), base%f%modes, DERIV_S, solution_dofs(:,:))
    dQ_dss_dofs = base%s%evalDOF2D_s(s(i), base%f%modes, DERIV_S_S, solution_dofs(:,:))
    ! use the tensorproduct for theta and zeta
    Q(       i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, 0, Q_dofs), (/n_t, n_z/))
    dQ_ds(   i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, 0, dQ_ds_dofs), (/n_t, n_z/))
    dQ_dthet(i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_THET, Q_dofs), (/n_t, n_z/))
    dQ_dzeta(i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_ZETA, Q_dofs), (/n_t, n_z/))
    dQ_dss(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, 0, dQ_dss_dofs), (/n_t, n_z/))
    dQ_dst(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_THET, dQ_ds_dofs), (/n_t, n_z/))
    dQ_dsz(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_ZETA, dQ_ds_dofs), (/n_t, n_z/))
    dQ_dtt(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_THET_THET, Q_dofs), (/n_t, n_z/))
    dQ_dtz(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_THET_ZETA, Q_dofs), (/n_t, n_z/))
    dQ_dzz(  i,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, DERIV_ZETA_ZETA, Q_dofs), (/n_t, n_z/))
  END DO
  !$OMP END PARALLEL DO
  DEALLOCATE(Q_dofs, dQ_ds_dofs, dQ_dss_dofs)
END SUBROUTINE evaluate_base_tens_all