![]() |
Octopus
|
Data Types | |
interface | io_function_output_global_bz |
interface | io_function_output_supercell |
interface | io_function_output_vector |
interface | io_function_output_vector_bz |
Functions/Subroutines | |
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) |
integer(int64) function, public | io_function_fill_how (where) |
Use this function to quickly plot functions for debugging purposes: call dio_function_output(io_function_fill_how("AxisX_and_PlaneX_and_DX"), &. More... | |
subroutine, public | write_standard_xyz_file (namespace, fname, pos, species, header) |
Write a standard xyz file with atom labels and positions (in Angstrom). More... | |
subroutine, public | write_canonicalized_xyz_file (dir, fname, space, latt, pos, atoms, box, namespace) |
Write canonicalized xyz file with atom labels and positions in Angstroms. More... | |
subroutine, public | write_xsf_geometry_file (dir, fname, space, latt, pos, atoms, mesh, namespace, total_forces) |
subroutine, public | write_xsf_geometry (iunit, space, latt, pos, atoms, mesh, forces, index) |
for format specification see: http: More... | |
subroutine | write_xsf_geometry_supercell (iunit, space, latt, pos, atoms, mesh, centers, supercell, extra_atom) |
for format specification see: http: More... | |
subroutine | ncdf_error (func, status, filename, namespace, ierr) |
subroutine | transpose3 (in, out) |
subroutine, public | dio_function_input (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed, the subroutine will reorder the values in the file according to it, missing values will be filled with zeros. (For the moment this is only implemented for the obf format.) More... | |
subroutine | dio_function_input_ncdf (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from a NetCDF file filename, and puts it into ff. More... | |
subroutine | dio_function_input_obf (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from a obf file filename, and puts it into ff. More... | |
subroutine | dio_function_input_csv (filename, namespace, space, mesh, ff, ierr) |
Reads a mesh function from a csv file filename, and puts it into ff. More... | |
subroutine | dio_function_output_vector (how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root) |
subroutine | dio_function_output_vector_bz (how, dir, fname, namespace, space, kpt, kpoints, ff, unit, ierr, grp, root) |
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. More... | |
subroutine, public | dio_function_output_global (how, dir, fname, namespace, space, mesh, ff, unit, ierr) |
subroutine | dio_cf_output_global (how, dir, fname, namespace, space, mesh, cube, cf, unit, ierr, pos, atoms) |
subroutine | dio_function_output_global_bz (how, dir, fname, namespace, kpoints, ff, unit, ierr) |
subroutine, public | dout_cf_netcdf (filename, ierr, cf, cube, space, spacing, transpose, unit, namespace) |
Writes a cube_function in netcdf format. More... | |
subroutine | dio_function_output_supercell (how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, grp, root, is_global, extra_atom) |
subroutine | dio_function_output_global_supercell (how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, extra_atom) |
subroutine, public | zio_function_input (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed, the subroutine will reorder the values in the file according to it, missing values will be filled with zeros. (For the moment this is only implemented for the obf format.) More... | |
subroutine | zio_function_input_ncdf (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from a NetCDF file filename, and puts it into ff. More... | |
subroutine | zio_function_input_obf (filename, namespace, space, mesh, ff, ierr, map) |
Reads a mesh function from a obf file filename, and puts it into ff. More... | |
subroutine | zio_function_input_csv (filename, namespace, space, mesh, ff, ierr) |
Reads a mesh function from a csv file filename, and puts it into ff. More... | |
subroutine | zio_function_output_vector (how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root) |
subroutine | zio_function_output_vector_bz (how, dir, fname, namespace, space, kpt, kpoints, ff, unit, ierr, grp, root) |
subroutine, public | zio_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. More... | |
subroutine, public | zio_function_output_global (how, dir, fname, namespace, space, mesh, ff, unit, ierr) |
subroutine | zio_cf_output_global (how, dir, fname, namespace, space, mesh, cube, cf, unit, ierr, pos, atoms) |
subroutine | zio_function_output_global_bz (how, dir, fname, namespace, kpoints, ff, unit, ierr) |
subroutine, public | zout_cf_netcdf (filename, ierr, cf, cube, space, spacing, transpose, unit, namespace) |
Writes a cube_function in netcdf format. More... | |
subroutine | zio_function_output_supercell (how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, grp, root, is_global, extra_atom) |
subroutine | zio_function_output_global_supercell (how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, extra_atom) |
Variables | |
integer, parameter, private | doutput_kind = 1 |
doutput_kind => real variables; zoutput_kind => complex variables. More... | |
integer, parameter, private | zoutput_kind = -1 |
character(len=3), dimension(3), parameter | index2label = (/ 're ', 'im ', 'abs' /) |
index to label mapping More... | |
subroutine, public io_function_oct_m::io_function_read_what_how_when | ( | type(namespace_t), intent(in) | namespace, |
class(space_t), intent(in) | space, | ||
logical, dimension(max_output_types), intent(inout) | what, | ||
integer(int64), dimension(0:max_output_types), intent(out) | how, | ||
integer, dimension(0:max_output_types), intent(out) | output_interval, | ||
character(len=*), intent(in), optional | what_tag_in, | ||
character(len=*), intent(in), optional | how_tag_in, | ||
character(len=*), intent(in), optional | output_interval_tag_in, | ||
logical, intent(in), optional | ignore_error | ||
) |
Definition at line 211 of file io_function.F90.
integer(int64) function, public io_function_oct_m::io_function_fill_how | ( | character(len=*), intent(in) | where | ) |
Use this function to quickly plot functions for debugging purposes: call dio_function_output(io_function_fill_how("AxisX_and_PlaneX_and_DX"), &.
Definition at line 796 of file io_function.F90.
subroutine, public io_function_oct_m::write_standard_xyz_file | ( | type(namespace_t), intent(in) | namespace, |
character(len=*), intent(in) | fname, | ||
real(real64), dimension(:,:), intent(in) | pos, | ||
character(len=*), dimension(:), intent(in) | species, | ||
character(len=*), intent(in), optional | header | ||
) |
Write a standard xyz file with atom labels and positions (in Angstrom).
Periodic systems can be handled by passing the appropriate information in the header or directly calling write_canonicalized_xyz_file.
[in] | fname | File name, prepended with the path |
[in] | pos | Atomic positions |
[in] | species | Atomic species labels |
[in] | header | Optional header |
Definition at line 830 of file io_function.F90.
subroutine, public io_function_oct_m::write_canonicalized_xyz_file | ( | character(len=*), intent(in) | dir, |
character(len=*), intent(in) | fname, | ||
class(space_t), intent(in) | space, | ||
type(lattice_vectors_t), intent(in) | latt, | ||
real(real64), dimension(:,:), intent(in) | pos, | ||
type(atom_t), dimension(:), intent(in) | atoms, | ||
class(box_t), intent(in) | box, | ||
type(namespace_t), intent(in) | namespace | ||
) |
Write canonicalized xyz file with atom labels and positions in Angstroms.
Includes information about simulation box and periodicity when applicable. This differs from a normal xyz file by including information about box shape and always using Angstroms.
Definition at line 876 of file io_function.F90.
subroutine, public io_function_oct_m::write_xsf_geometry_file | ( | character(len=*), intent(in) | dir, |
character(len=*), intent(in) | fname, | ||
class(space_t), intent(in) | space, | ||
type(lattice_vectors_t), intent(in) | latt, | ||
real(real64), dimension(:,:), intent(in) | pos, | ||
type(atom_t), dimension(:), intent(in) | atoms, | ||
class(mesh_t), intent(in) | mesh, | ||
type(namespace_t), intent(in) | namespace, | ||
real(real64), dimension(:,:), intent(in), optional | total_forces | ||
) |
Definition at line 913 of file io_function.F90.
subroutine, public io_function_oct_m::write_xsf_geometry | ( | integer, intent(in) | iunit, |
class(space_t), intent(in) | space, | ||
type(lattice_vectors_t), intent(in) | latt, | ||
real(real64), dimension(:,:), intent(in) | pos, | ||
type(atom_t), dimension(:), intent(in) | atoms, | ||
class(mesh_t), intent(in) | mesh, | ||
real(real64), dimension(:, :), intent(in), optional | forces, | ||
integer, intent(in), optional | index | ||
) |
for format specification see: http:
[in] | index | for use in writing animated files |
Definition at line 950 of file io_function.F90.
|
private |
for format specification see: http:
[in] | extra_atom | An extra atom, with ther symbol 'X' |
Definition at line 1032 of file io_function.F90.
|
private |
Definition at line 1114 of file io_function.F90.
|
private |
Definition at line 1139 of file io_function.F90.
subroutine, public io_function_oct_m::dio_function_input | ( | character(len=*), intent(in) | filename, |
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
type(mesh_t), intent(in) | mesh, | ||
real(real64), dimension(:), intent(inout) | ff, | ||
integer, intent(out) | ierr, | ||
integer(int64), dimension(:), intent(in), optional | map | ||
) |
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed, the subroutine will reorder the values in the file according to it, missing values will be filled with zeros. (For the moment this is only implemented for the obf format.)
On output, ierr signals how everything went: ierr > 0 => Error. The function ff was not read:
1 : illegal filename (must have ".obf" or ".ncdf" extension).
2 : file could not be successfully opened.
3 : file opened, but error reading.
4 : The number of points/mesh dimensions do not coincide.
5 : Format or NetCDF error (one or several warnings are written)
ierr = 0 => Success.
ierr < 0 => Success, but some kind of type conversion was necessary. The value of ierr is then:
-1 : function in file is real, sp.
-2 : function in file is complex, sp.
-3 : function in file is real, dp.
-4 : function in file is complex, dp.
Definition at line 1247 of file io_function.F90.
|
private |
Reads a mesh function from a NetCDF file filename, and puts it into ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
[in] | map | Optional: Map to reorder the function |
Definition at line 1313 of file io_function.F90.
|
private |
Reads a mesh function from a obf file filename, and puts it into ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
[in] | map | Optional: Map to reorder the function |
Definition at line 1465 of file io_function.F90.
|
private |
Reads a mesh function from a csv file filename, and puts it into ff.
Note that this function can only read real-valued CSV files. If the function is complex, the real part will be read and the imaginary part will be set to zero.
For parallel calculations, using domain decomposition, the whole function is read on all nodes, but only the part corresponding to the local domain is copied to ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
Definition at line 1516 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 1667 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 1746 of file io_function.F90.
subroutine, public io_function_oct_m::dio_function_output | ( | integer(int64), intent(in) | how, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | fname, | ||
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
class(mesh_t), intent(in) | mesh, | ||
real(real64), dimension(:), intent(in), target, contiguous | ff, | ||
type(unit_t), intent(in) | unit, | ||
integer, intent(out) | ierr, | ||
real(real64), dimension(:,:), intent(in), optional | pos, | ||
type(atom_t), dimension(:), intent(in), optional | atoms, | ||
type(mpi_grp_t), intent(in), optional | grp, | ||
integer, intent(in), optional | root | ||
) |
Top-level IO routine for functions defined on the mesh.
Outputs functions defined on the mesh to several file and output formats:
Distinguishes between output formats that require a whole cube grid, and those that need a whole mesh.
[in] | how | Defines the output format in bitwise representation |
[in] | dir | Output directory |
[in] | fname | Output file, minus extension |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 1833 of file io_function.F90.
subroutine, public io_function_oct_m::dio_function_output_global | ( | integer(int64), intent(in) | how, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | fname, | ||
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
type(mesh_t), intent(in) | mesh, | ||
real(real64), dimension(:), intent(in) | ff, | ||
type(unit_t), intent(in) | unit, | ||
integer, intent(out) | ierr | ||
) |
[in] | ff | (meshnp_global or meshnp_part_global) |
Definition at line 1951 of file io_function.F90.
|
private |
Definition at line 2324 of file io_function.F90.
|
private |
[in] | ff | (stnik) |
Definition at line 2642 of file io_function.F90.
subroutine, public io_function_oct_m::dout_cf_netcdf | ( | character(len=*), intent(in) | filename, |
integer, intent(out) | ierr, | ||
type(cube_function_t), intent(in) | cf, | ||
type(cube_t), intent(in) | cube, | ||
class(space_t), intent(in) | space, | ||
real(real64), dimension(:), intent(in) | spacing, | ||
logical, intent(in) | transpose, | ||
type(unit_t), intent(in) | unit, | ||
type(namespace_t), intent(in) | namespace | ||
) |
Writes a cube_function in netcdf format.
[in] | filename | the file name |
[out] | ierr | error message |
[in] | cf | the cube_function to be written |
[in] | cube | the underlying cube mesh |
[in] | space | the spatial dimensions |
[in] | spacing | the mesh spacing already converted to units_out |
[in] | transpose | whether we want the function cf(x,y,z) to be saved as cf(z,y,x) |
[in] | unit | unit of data in cf |
Definition at line 2781 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
[in] | is_global | Input data is meshnp_global? And, thus, it has not be gathered |
Definition at line 2929 of file io_function.F90.
|
private |
[in] | ff | (meshnp_global or meshnp_part_global) |
Definition at line 3022 of file io_function.F90.
subroutine, public io_function_oct_m::zio_function_input | ( | character(len=*), intent(in) | filename, |
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
type(mesh_t), intent(in) | mesh, | ||
complex(real64), dimension(:), intent(inout) | ff, | ||
integer, intent(out) | ierr, | ||
integer(int64), dimension(:), intent(in), optional | map | ||
) |
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed, the subroutine will reorder the values in the file according to it, missing values will be filled with zeros. (For the moment this is only implemented for the obf format.)
On output, ierr signals how everything went: ierr > 0 => Error. The function ff was not read:
1 : illegal filename (must have ".obf" or ".ncdf" extension).
2 : file could not be successfully opened.
3 : file opened, but error reading.
4 : The number of points/mesh dimensions do not coincide.
5 : Format or NetCDF error (one or several warnings are written)
ierr = 0 => Success.
ierr < 0 => Success, but some kind of type conversion was necessary. The value of ierr is then:
-1 : function in file is real, sp.
-2 : function in file is complex, sp.
-3 : function in file is real, dp.
-4 : function in file is complex, dp.
Definition at line 3430 of file io_function.F90.
|
private |
Reads a mesh function from a NetCDF file filename, and puts it into ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
[in] | map | Optional: Map to reorder the function |
Definition at line 3496 of file io_function.F90.
|
private |
Reads a mesh function from a obf file filename, and puts it into ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
[in] | map | Optional: Map to reorder the function |
Definition at line 3672 of file io_function.F90.
|
private |
Reads a mesh function from a csv file filename, and puts it into ff.
Note that this function can only read real-valued CSV files. If the function is complex, the real part will be read and the imaginary part will be set to zero.
For parallel calculations, using domain decomposition, the whole function is read on all nodes, but only the part corresponding to the local domain is copied to ff.
[in] | filename | Name of the file to read |
[in] | space | Space definition |
[in] | mesh | The mesh |
[in,out] | ff | The function to read |
[out] | ierr | Error code |
Definition at line 3723 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 3874 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 3953 of file io_function.F90.
subroutine, public io_function_oct_m::zio_function_output | ( | integer(int64), intent(in) | how, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | fname, | ||
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
class(mesh_t), intent(in) | mesh, | ||
complex(real64), dimension(:), intent(in), target, contiguous | ff, | ||
type(unit_t), intent(in) | unit, | ||
integer, intent(out) | ierr, | ||
real(real64), dimension(:,:), intent(in), optional | pos, | ||
type(atom_t), dimension(:), intent(in), optional | atoms, | ||
type(mpi_grp_t), intent(in), optional | grp, | ||
integer, intent(in), optional | root | ||
) |
Top-level IO routine for functions defined on the mesh.
Outputs functions defined on the mesh to several file and output formats:
Distinguishes between output formats that require a whole cube grid, and those that need a whole mesh.
[in] | how | Defines the output format in bitwise representation |
[in] | dir | Output directory |
[in] | fname | Output file, minus extension |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
Definition at line 4040 of file io_function.F90.
subroutine, public io_function_oct_m::zio_function_output_global | ( | integer(int64), intent(in) | how, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | fname, | ||
type(namespace_t), intent(in) | namespace, | ||
class(space_t), intent(in) | space, | ||
type(mesh_t), intent(in) | mesh, | ||
complex(real64), dimension(:), intent(in) | ff, | ||
type(unit_t), intent(in) | unit, | ||
integer, intent(out) | ierr | ||
) |
[in] | ff | (meshnp_global or meshnp_part_global) |
Definition at line 4158 of file io_function.F90.
|
private |
Definition at line 4531 of file io_function.F90.
|
private |
[in] | ff | (stnik) |
Definition at line 4863 of file io_function.F90.
subroutine, public io_function_oct_m::zout_cf_netcdf | ( | character(len=*), intent(in) | filename, |
integer, intent(out) | ierr, | ||
type(cube_function_t), intent(in) | cf, | ||
type(cube_t), intent(in) | cube, | ||
class(space_t), intent(in) | space, | ||
real(real64), dimension(:), intent(in) | spacing, | ||
logical, intent(in) | transpose, | ||
type(unit_t), intent(in) | unit, | ||
type(namespace_t), intent(in) | namespace | ||
) |
Writes a cube_function in netcdf format.
[in] | filename | the file name |
[out] | ierr | error message |
[in] | cf | the cube_function to be written |
[in] | cube | the underlying cube mesh |
[in] | space | the spatial dimensions |
[in] | spacing | the mesh spacing already converted to units_out |
[in] | transpose | whether we want the function cf(x,y,z) to be saved as cf(z,y,x) |
[in] | unit | unit of data in cf |
Definition at line 5002 of file io_function.F90.
|
private |
[in] | grp | the group that shares the same data, must contain the domains group |
[in] | root | which process is going to write the data |
[in] | is_global | Input data is meshnp_global? And, thus, it has not be gathered |
Definition at line 5170 of file io_function.F90.
|
private |
[in] | ff | (meshnp_global or meshnp_part_global) |
Definition at line 5263 of file io_function.F90.
|
private |
doutput_kind => real variables; zoutput_kind => complex variables.
Definition at line 182 of file io_function.F90.
|
private |
Definition at line 182 of file io_function.F90.
|
private |
index to label mapping
Definition at line 187 of file io_function.F90.