50 type(output_t),
intent(out) :: outp
51 type(namespace_t),
intent(in) :: namespace
52 class(space_t),
intent(in) :: space
85 'LinearMediumOutput',
'OutputFormat',
'OutputInterval')
96 call parse_variable(namespace,
'LinearMediumOutputDir',
"static", outp%iter_dir)
97 if (any(outp%what) .and. maxval(outp%output_interval) > 0)
then
98 call io_mkdir(outp%iter_dir, namespace)
108 type(output_t),
intent(in) :: outp
109 type(namespace_t),
intent(in) :: namespace
110 class(space_t),
intent(in) :: space
111 class(mesh_t),
intent(in) :: mesh
112 character(len=*),
intent(in) :: dir
113 real(real64),
intent(in) :: ep(:)
114 real(real64),
intent(in) :: mu(:)
115 real(real64),
intent(in) :: cc(:)
116 integer,
intent(in) :: points_map(:)
119 real(real64),
allocatable :: dtmp(:), dtmp2(:)
120 character(len=MAX_PATH_LEN) :: fname
124 if (any(outp%what))
then
125 message(1) =
"Info: Writing output to " // trim(dir)
131 if (outp%what(option__linearmediumoutput__permittivity))
then
132 write(fname,
'(1a)')
'medium-permittivity'
133 safe_allocate(dtmp(1:mesh%np))
136 dtmp(:) = dtmp /
p_ep
137 call dio_function_output(outp%how(option__linearmediumoutput__permittivity), dir, fname, namespace, space, &
139 safe_deallocate_a(dtmp)
143 if (outp%what(option__linearmediumoutput__permeability))
then
144 write(fname,
'(1a)')
'medium-permeability'
145 safe_allocate(dtmp(1:mesh%np))
148 dtmp(:) = dtmp /
p_mu
149 call dio_function_output(outp%how(option__linearmediumoutput__permeability), dir, fname, namespace, space, &
151 safe_deallocate_a(dtmp)
155 if (outp%what(option__linearmediumoutput__speed_of_light))
then
156 write(fname,
'(1a)')
'medium-speed-of-light'
157 safe_allocate(dtmp(1:mesh%np))
160 call dio_function_output(outp%how(option__linearmediumoutput__speed_of_light), dir, fname, namespace, space, &
162 safe_deallocate_a(dtmp)
166 if (outp%what(option__linearmediumoutput__points))
then
167 write(fname,
'(1a)')
'medium-points'
168 safe_allocate(dtmp(1:mesh%np))
169 safe_allocate(dtmp2(1:mesh%np))
173 call dio_function_output(outp%how(option__linearmediumoutput__points), dir, fname, namespace, space, &
175 safe_deallocate_a(dtmp)
176 safe_deallocate_a(dtmp2)
185 real(real64),
intent(in) :: medium_func(:)
186 integer,
intent(in) :: points_map(:)
187 real(real64),
intent(out) :: io_func(:)
191 do ip_in = 1,
size(points_map)
192 ip = points_map(ip_in)
193 io_func(ip) = medium_func(ip_in)
real(real64), parameter, public m_zero
real(real64), parameter, public p_mu
real(real64), parameter, public p_ep
real(real64), parameter, public p_c
Electron gyromagnetic ratio, see Phys. Rev. Lett. 130, 071801 (2023)
real(real64), parameter, public m_one
This module implements the underlying real-space grid.
subroutine, public io_function_read_what_how_when(namespace, space, what, how, output_interval, what_tag_in, how_tag_in, output_interval_tag_in, ignore_error)
subroutine, public dio_function_output(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
Top-level IO routine for functions defined on the mesh.
subroutine, public io_mkdir(fname, namespace, parents)
This module defines the meshes, which are used in Octopus.
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
subroutine, public output_linear_medium(outp, namespace, space, mesh, dir, points_map, ep, mu, cc)
subroutine, public output_linear_medium_init(outp, namespace, space)
this module contains the low-level part of the output system
subroutine, public add_last_slash(str)
Adds a '/' in the end of the string, only if it missing. Useful for directories.
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
This module defines the unit system, used for input and output.
type(unit_t), public unit_one
some special units required for particular quantities
subroutine get_medium_property(medium_func, points_map, io_func)