Project

General

Profile

getData method()

Here is a complete description of getData() method used to get data from snapshot.

getData() method belong to uns::Cunsin class.

return value

All getData() method, return a boolean "true" in case of success, "false" otherwise.

getData, an overloaded method

Method getData is overloaded and can have different number of arguments

  1. getData(comp, tag, n, array) see arguments description below
  2. getData( tag, n, array) see arguments description below
  3. getData( tag, value) see arguments description below

Arguments description

argument type description
comp input c++ string or char * specify requested component (see table below)
tag input c++ string or char * specify requested data type (see table below)
n int * return number of particles for the requested data
array float** or int** return an array fulfilled with the requested data
value float* or int* return one value fulfilled with the requested data

Components (comp)

From argument comp , we select the component to be treated.

component value description
gas Gas particles
halo Dark matter particles
dm Dark matter particles
disk Old stars particles
stars Stars particles
bulge Bulge particles
bndry bndry particles

Data (tag)

From argument tag , we specify which data we want to get. If comp is specified in getData() method, then retrieved data will belong to the component "comp". If comp is not specified, then retrieved data will belong to all the components selected during the object instantiation.

tag value n array description
pos #particles float ** return array of particles position (size=n*3)
vel #particles float ** return array of particles velocitie (size=n*3)
mass #particles float ** return array of particles velocitie (size=n)
acc #particles float ** return array of particles acceleration (size=n*3)
pot #particles float ** return array of particles potential (size=n)
rho #particles float ** return array of particles density (size=n)
hsml #particles float ** return array of particles hydro smooth length (size=n)
temp #particles float ** return array of particles temperature (size=n)
age #particles float ** return array of particles age (size=n)
metal #particles float ** return array of particles metallicity (size=n)
u #particles float ** return array of particles internal energy (size=n)
id #particles int ** return array of particles index (size=n)
aux #particles float ** return auxiliary array (size=n)
keys #particles float ** return keys array (size=n)
tag value value description
ngas int * #gas particles
nhalo int * #dark matter particles
ndisk int * #old stars particles
nstars int * #stars particles
nbulge int * #bulge particles
nbndry int * #bndry particles
nsel int * #selected particles
time float * snapshot time