34 #include "sll_errors.h"
35 #include "sll_memory.h"
36 #include "sll_working_precision.h"
59 sll_real64,
dimension(:),
pointer ::
data
60 sll_int32 :: data_position
61 character(len=64) :: name
65 function scalar_function_1d(eta1)
67 sll_real64 :: scalar_function_1d
68 sll_real64,
intent(in) :: eta1
69 end function scalar_function_1d
82 character(len=*),
intent(in) :: field_name
84 sll_int32,
intent(in) :: data_position
85 procedure(scalar_function_1d),
optional :: init_function
87 character(len=*),
parameter :: this_sub_name =
'initialize_scalar_field_1d'
90 sll_int32 :: num_cells1
96 sll_warning(this_sub_name,
'This scalar field 1d object is deprecated.')
99 this%name = trim(field_name)
100 num_cells1 = mesh%num_cells
101 num_pts1 = mesh%num_cells + 1
103 this%data_position = data_position
105 sll_allocate(this%data(num_pts1), ierr)
106 if (
present(init_function))
then
108 this%data(i1) = init_function(mesh%eta_min + (i1 - 1)*mesh%delta_eta)
114 sll_allocate(this%data(num_cells1), ierr)
115 if (
present(init_function))
then
116 delta1 = 1.0_f64/real(num_cells1, f64)
117 eta1 = 0.5_f64*delta1
118 do i1 = 1, num_cells1
119 this%data(i1) = init_function(eta1)
134 sll_deallocate(this%data, ierr)
139 multiply_by_jacobian, &
144 logical,
optional :: multiply_by_jacobian
145 sll_int32,
optional :: output_format
146 character(len=*),
optional :: output_file_name
147 character(len=64) :: file_name
149 if (
present(multiply_by_jacobian))
then
150 print *,
'multiply_by_jacobian option is not implemented'
153 if (
present(output_format))
then
154 print *,
'There is just gnuplot format available'
156 if (
present(output_file_name))
then
157 file_name = output_file_name
159 file_name = scalar_field%name
Cartesian mesh basic types.
Implements the functions to write data file plotable by GNUplot.
subroutine, public sll_s_gnuplot_write(array, array_name, iplot)
Write an array to display with gnuplot.
Implements the geometry and mesh descriptor types.
subroutine initialize_scalar_field_1d(this, field_name, mesh, data_position, init_function)
subroutine delete_scalar_field_1d(this)
subroutine write_scalar_field_1d(scalar_field, multiply_by_jacobian, output_file_name, output_format)
integer, parameter, public sll_p_node_centered_field
integer, parameter, public sll_p_cell_centered_field
Module to select the kind parameter.