Evaluate the basis with a tensorproduct for the given 1D (s, theta, zeta) values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | s(:) |
evaluation points to construct a mesh |
||
| real, | intent(in) | :: | theta(:) |
evaluation points to construct a mesh |
||
| real, | intent(in) | :: | zeta(:) |
evaluation points to construct a mesh |
||
| character(len=2) | :: | var |
selection string: which variable to evaluate |
|||
| character(len=2) | :: | sel_deriv_s |
selection string: which derivative to evaluate for the spline |
|||
| character(len=2) | :: | sel_deriv_f |
selection string: which derivative to evaluate for the fourier series |
|||
| real, | intent(out) | :: | result(:,:,:) |
output array |
SUBROUTINE evaluate_base_tens(s, theta, zeta, var, sel_deriv_s, sel_deriv_f, result) ! MODULES USE MODgvec_base, ONLY: t_base ! INPUT/OUTPUT VARIABLES ------------------------------------------------------------------------------------------------------! REAL, INTENT(IN) :: s(:), theta(:), zeta(:) !! evaluation points to construct a mesh CHARACTER(LEN=2) :: var !! selection string: which variable to evaluate CHARACTER(LEN=2) :: sel_deriv_s !! selection string: which derivative to evaluate for the spline CHARACTER(LEN=2) :: sel_deriv_f !! selection string: which derivative to evaluate for the fourier series REAL, INTENT(OUT) :: result(:,:,:) !! output array ! LOCAL VARIABLES -------------------------------------------------------------------------------------------------------------! INTEGER :: i_s,n_s,n_t,n_z ! loop variables INTEGER :: seli_deriv_s, seli_deriv_f ! integer values for the derivative selection 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 :: fourier_dofs(:) ! DOFs for the fourier series, calculated from the spline ! CODE ------------------------------------------------------------------------------------------------------------------------! CALL evaluate_base_select(var, sel_deriv_s, sel_deriv_f, base, solution_dofs, seli_deriv_s, seli_deriv_f) n_s=SIZE(s) n_t=SIZE(theta) n_z=SIZE(zeta) ALLOCATE(fourier_dofs(base%f%modes)) !$OMP PARALLEL DO SCHEDULE(STATIC) DEFAULT(SHARED) & !$OMP PRIVATE(i_s,fourier_dofs) DO i_s=1,n_s ! evaluate spline to get the fourier dofs fourier_dofs = base%s%evalDOF2D_s(s(i_s), base%f%modes, seli_deriv_s, solution_dofs(:,:)) ! use the tensorproduct for theta and zeta result(i_s,:,:) = RESHAPE(base%f%evalDOF_xn_tens(n_t, n_z, theta, zeta, seli_deriv_f, fourier_dofs), (/n_t, n_z/)) END DO !$OMP END PARALLEL DO DEALLOCATE(fourier_dofs) END SUBROUTINE evaluate_base_tens