SPH
Classes | Enumerations
Output.h File Reference

Saving and loading particle data. More...

#include "io/Path.h"
#include "objects/utility/EnumMap.h"
#include "objects/wrappers/Expected.h"
#include "objects/wrappers/Outcome.h"
#include "physics/Constants.h"
#include "quantities/Storage.h"

Go to the source code of this file.

Classes

class  OutputFile
 Helper file generating file names for output files. More...
 
class  IOutput
 Interface for saving quantities of SPH particles to a file. More...
 
class  IInput
 Interface for loading quantities of SPH particles from a file. More...
 
class  TextOutput
 Output saving data to text (human readable) file. More...
 
class  TextInput
 Input for the text file, generated by TextOutput or conforming to the same format. More...
 
class  GnuplotOutput
 Extension of text output that runs given gnuplot script on dumped text data. More...
 
class  BinaryOutput
 Output saving data to binary data without loss of precision. More...
 
class  BinaryInput
 Input for the binary file, generated by BinaryOutput. More...
 
struct  BinaryInput::Info
 
struct  BinaryInput::Info::QuantityInfo
 Information about stored quantities. More...
 
class  CompressedOutput
 
class  CompressedInput
 
struct  CompressedInput::Info
 
class  VtkOutput
 XML-based output format used by Visualization ToolKit (VTK) More...
 
class  Hdf5Input
 Reader of HDF5 files generated by the code miluphcuda. More...
 
class  MpcorpInput
 Reads data from Minor Planet Center Orbit Database exports. More...
 
struct  PkdgravParams
 
struct  PkdgravParams::Conversion
 Conversion factors for pkdgrav. More...
 
class  PkdgravOutput
 Dumps data into a file that can be used as an input for pkdgrav code by Richardson et al. More...
 
class  PkdgravInput
 Input for pkdgrav output files (ss.xxxxx.bt). More...
 
class  TabInput
 Simple text input file, having particle masses, positions and velocities on separate lines. More...
 
class  NullOutput
 

Enumerations

enum class  OutputQuantityFlag {
  POSITION = 1 << 0 , VELOCITY = 1 << 1 , SMOOTHING_LENGTH = 1 << 2 , MASS = 1 << 3 ,
  PRESSURE = 1 << 4 , DENSITY = 1 << 5 , ENERGY = 1 << 6 , DEVIATORIC_STRESS = 1 << 7 ,
  DAMAGE = 1 << 8 , ANGULAR_FREQUENCY = 1 << 9 , STRAIN_RATE_CORRECTION_TENSOR = 1 << 10 , MATERIAL_ID = 1 << 11 ,
  INDEX = 1 << 12
}
 List of quantities we can write to text output. More...
 
enum class  RunTypeEnum { SPH , STABILIZATION , RUBBLE_PILE , NBODY }
 Type of simulation, stored as metadata in the binary file. More...
 
enum class  BinaryIoVersion : int64_t {
  FIRST = 0 , V2018_04_07 = 20180407 , V2018_10_24 = 20181024 , V2021_03_20 = 20210320 ,
  LATEST = V2021_03_20
}
 
enum class  CompressedIoVersion : int { FIRST = 0 }
 
enum class  CompressionEnum { NONE , RLE }
 

Detailed Description

Saving and loading particle data.

Author
Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
Date
2016-2021

Definition in file Output.h.

Enumeration Type Documentation

◆ BinaryIoVersion

enum BinaryIoVersion : int64_t
strong
Enumerator
FIRST 
V2018_04_07 

serializing (incorrectly!!) enum type

V2018_10_24 

reverted enum (storing zero instead of hash), storing type of simulation

V2021_03_20 

added wallclock time and build date

LATEST 

Definition at line 258 of file Output.h.

◆ CompressedIoVersion

enum CompressedIoVersion : int
strong
Enumerator
FIRST 

Definition at line 408 of file Output.h.

◆ CompressionEnum

enum CompressionEnum
strong
Enumerator
NONE 
RLE 

Definition at line 412 of file Output.h.

◆ OutputQuantityFlag

enum OutputQuantityFlag
strong

List of quantities we can write to text output.

Unlike QuantityId, this includes derivatives of quantities (for example velocities) and 'virtual' quantities like smoothing lengths. It can be also stored as flags.

Enumerator
POSITION 

Positions of particles, always a vector quantity.

VELOCITY 

Current velocities of particles, always a vector quantity.

SMOOTHING_LENGTH 

Smoothing lenghts of particles.

MASS 

Particle masses, always a scalar quantity.

PRESSURE 

Pressure, reduced by yielding and fracture model (multiplied by 1-damage); always a scalar quantity.

DENSITY 

Density, always a scalar quantity.

ENERGY 

Specific internal energy, always a scalar quantity.

DEVIATORIC_STRESS 

Deviatoric stress tensor, always a traceless tensor stored in components xx, yy, xy, xz, yz.

DAMAGE 

Damage, reducing the pressure and deviatoric stress.

ANGULAR_FREQUENCY 

Angular frequency of particles, used in N-body simulations.

STRAIN_RATE_CORRECTION_TENSOR 

Symmetric tensor correcting kernel gradient for linear consistency.

MATERIAL_ID 

ID of material, indexed from 0 to (#bodies - 1).

INDEX 

Index of particle.

Definition at line 108 of file Output.h.

◆ RunTypeEnum

enum RunTypeEnum
strong

Type of simulation, stored as metadata in the binary file.

This value is used when reading the data in ssf player (to select proper visualization) and when resuming a simulation (to continue in correct phase). When a new type of simulation is added, either modify this enum or create and additional enum (with no conflicts with this one) and cast it.

Enumerator
SPH 

Main SPH simulation.

STABILIZATION 

Confergence phase using SPH solver, used to obtain stable initial conditions.

RUBBLE_PILE 

Pre-stabilization phase, using N-body solver to get a realistic rubble-pile body.

NBODY 

Main N-body simulation, using initial conditions either from SPH (handoff) or manually specified.

Definition at line 237 of file Output.h.