read_particles_formatted_file Interface

interface


Calls

interface~~read_particles_formatted_file~~CallsGraph interface~read_particles_formatted_file read_particles_formatted_file proc~read_particles_formatted_file read_particles_formatted_file interface~read_particles_formatted_file->proc~read_particles_formatted_file

public module subroutine read_particles_formatted_file(this, parts_pos_unit, nline_in, nline_fin, xmin, xmax, ymin, ymax, zmin, zmax, pos, pvol, nu, h)

Arguments

Type IntentOptional Attributes Name
class(particles), intent(inout) :: this

particles object which this PROCEDURE is a member of

String containing the name of the formatted file containing the particle positions and, optionally, nu

integer :: parts_pos_unit

Unit number of the formatted file containing the particle positions and, optionally, nu

integer :: nline_in

First line containing the relevant data

integer :: nline_fin

Last line containing the relevant data

double precision, intent(in) :: xmin

Left boundary of the lattice

double precision, intent(in) :: xmax

Right boundary of the lattice

double precision, intent(in) :: ymin

Left boundary of the lattice

double precision, intent(in) :: ymax

Right boundary of the lattice

double precision, intent(in) :: zmin

Left boundary of the lattice

double precision, intent(in) :: zmax

Right boundary of the lattice

double precision, intent(inout), DIMENSION(:,:), ALLOCATABLE :: pos
double precision, intent(inout), DIMENSION(:), ALLOCATABLE :: pvol

Array storing the particle positions Array storing the particle volumes

double precision, intent(inout), DIMENSION(:), ALLOCATABLE :: nu

Array storing the particle baryon masses

double precision, intent(inout), DIMENSION(:), ALLOCATABLE :: h

Array storing the initial guess for the particle smoothing lengths

Description

Read particle positions and nu from a formatted file with the following format:

  1. The first line must contain the integer number of objects for the system, and the particle numbers on each object; each column separated by one tab.
  2. The other lines must contain at least 3 columns with the x, y, z coordinates of the particle positions. An optional 4th column can contain the values of nu on the particles. If the 4th column is not present, nu will be roughly estimated using the density read from the ID and the average volume per particle; the latter is computed by computing the average particle separation along the z direction.