3 #include "sll_assert.h"
4 #include "sll_working_precision.h"
32 sll_int32 :: is_delta_f
44 sll_int32 :: data_position
45 sll_real64,
intent(in),
optional :: eps_val
46 sll_real64,
intent(in),
optional :: kx_val
47 sll_int32,
intent(in),
optional :: is_delta_f
49 init_obj%data_position = data_position
50 if (
present(eps_val))
then
51 init_obj%eps = eps_val
53 init_obj%eps = 0.01_f64
55 if (
present(kx_val))
then
60 if (
present(is_delta_f))
then
61 init_obj%is_delta_f = is_delta_f
63 init_obj%is_delta_f = 1
65 init_obj%transf => transf
72 sll_real64,
dimension(:, :),
intent(out) :: data_out
83 transf => init_obj%transf
86 num_pts1 = transf%mesh%num_cells1 + 1
87 num_pts2 = transf%mesh%num_cells2 + 1
89 num_pts1 = transf%mesh%num_cells1
90 num_pts2 = transf%mesh%num_cells2
93 sll_assert(
size(data_out, 1) .ge. num_pts1)
94 sll_assert(
size(data_out, 2) .ge. num_pts2)
98 v = transf%x2_at_node(i, j)
99 x = transf%x1_at_node(i, j)
101 v = transf%x2_at_cell(i, j)
102 x = transf%x1_at_cell(i, j)
104 print *,
'f_x1x2_landau_2d:', init_obj%data_position,
'not defined'
106 if (init_obj%is_delta_f == 0)
then
107 data_out(i, j) = eps*cos(kx*x)/sqrt(2*
sll_p_pi)*exp(-0.5_f64*v*v)
110 (1.0_f64 + eps*cos(kx*x))/sqrt(2*
sll_p_pi)*exp(-0.5_f64*v*v)
Cartesian mesh basic types.
Fortran module where set some physical and mathematical constants.
real(kind=f64), parameter, public sll_p_pi
subroutine initialize_landau_2d(init_obj, transf, data_position, eps_val, kx_val, is_delta_f)
subroutine f_x1x2_landau_2d(init_obj, data_out)
integer, parameter, public sll_p_node_centered_field
integer, parameter, public sll_p_cell_centered_field