pycbg.postprocessing.ResultsReader¶
- class pycbg.postprocessing.ResultsReader(directory)¶
Load the result of a simulation. Can also load the
Simulation()
object used during preprocessing.- Parameters
directory (str) – Directory in which the input file of the simulation was saved.
- ppositions¶
Particles’ positions for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
ppositions[i]
is(npart,3)
.- Type
list of numpy arrays
- pvelocities¶
Particles’ velocities for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pvelocities[i]
is(npart,3)
.- Type
list of numpy arrays
- pstresses¶
Particles’ stresses for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pstresses[i]
is(npart,6)
. The columns respectively correspond to xx, yy, zz, xy, yz and xz components.- Type
list of numpy arrays
- pstrains¶
Particles’ strains for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pstrains[i]
is(npart,6)
. The columns respectively correspond to xx, yy, zz, xy, yz and xz components.- Type
list of numpy arrays
- ppressures¶
Particles’ pressures for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
ppressures[i]
is(npart,)
.- Type
list of numpy arrays
- pmasses¶
Particles’ masses for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pmasses[i]
is(npart,)
.- Type
list of numpy arrays
- pvolumes¶
Particles’ volumes for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pvolumes[i]
is(npart,)
.- Type
list of numpy arrays
- pmaterials¶
Particles’ material’s id for every saved steps. Noting npart the number of particles in the simulations at the ith step, the shape of
pmaterials[i]
is(npart,)
.- Type
list of numpy arrays
- raw_data¶
All data saved from the simulation. The data is stored for each time step as a dataframe.
- Type
list of pandas dataframes
- steps¶
All saved steps.
- Type
list of ints
- times¶
All times corresponding to saved steps.
- Type
list of floats
- __init__(directory)¶
Methods
Load the simulation object used to write the input files
- load_simulation()¶
Load the simulation object used to write the input files