NetDEM v1.0
Loading...
Searching...
No Matches
netdem::DataDumper Class Reference

A class used to dump particle data into vtk files. This is a post-modifier, which will be executed at the end of a DEM cycle. More...

#include <data_dumper.hpp>

Inheritance diagram for netdem::DataDumper:
netdem::Modifier

Public Member Functions

 DataDumper ()
 Default constructor for DataDumper class.
 
void Init (Simulation *sim) override
 Initializes the DataDumper instance.
 
void SetRootPath (std::string const &root_path)
 Sets the root directory path for the output file.
 
void SetDataType (std::string const &data_type)
 Sets the data type of the output file (vtk or dump format).
 
void SetSaveByTime (double interval)
 Sets the interval for saving data by time.
 
void SetSaveByCycles (double interval)
 Sets the interval for saving data by cycles.
 
void SetSaveReadRestartByTime (double interval)
 Sets the interval for saving data by time.
 
void SetSaveReadRestartByCycles (double interval)
 Sets the interval for saving data by cycles.
 
void ClearHistories ()
 Clears the history of when data was last saved.
 
void SaveParticleInfoAsVTK ()
 Saves particle information to VTK format.
 
void SaveParticleInfoAsDump ()
 Saves particle information to dump format.
 
void SaveParticleMeshAsVTK ()
 Saves particle mesh in VTK format.
 
void SaveParticleVTKSeries ()
 Saves particle information as a VTK series.
 
void SaveParticleMeshVTKSeries ()
 Saves particle mesh as a VTK series.
 
void SaveParticleInfoAsVTKWithProxy ()
 Saves particle information as VTK with proxy (for MPI debug use).
 
void SaveWallInfoAsVTK ()
 Saves wall information to VTK format.
 
void SaveWallInfoAsDump ()
 Saves wall information to dump format.
 
void SaveWallMeshAsVTK ()
 Saves wall mesh in VTK format.
 
void SaveWallVTKSeries ()
 Saves wall information as a VTK series.
 
void SaveWallMeshVTKSeries ()
 Saves wall mesh as a VTK series.
 
void SaveCollisionInfoAsVTK ()
 Saves collision information to VTK format.
 
void SaveCollisionInfoAsDump ()
 Saves collision information to dump format.
 
void SaveCollisionVTKSeries ()
 Saves collision information as a VTK series.
 
void SaveBondInfoAsVTK ()
 Saves bond information to VTK format.
 
void SaveBondInfoAsDump ()
 Saves bond information to dump format.
 
void SaveBondVTKSeries ()
 Saves bond information as a VTK series.
 
void SaveShapeInfoAsSTL ()
 Saves shape information as an STL file.
 
void SaveShapeInfoAsVTK ()
 Saves shape information to VTK format.
 
void SaveShapeInfoAsJson (bool all_in_one=false)
 Saves shape information as a JSON file.
 
void SaveReadRestart ()
 Saves all information as JSON files for read restart.
 
void SaveShapeReadRestart ()
 Saves shape information as a JSON file for read restart.
 
void SaveParticleReadRestart ()
 Saves particle information as a JSON file for read restart.
 
void SaveContactReadRestart ()
 Saves contact information as a JSON file for read restart.
 
void SaveWallReadRestart ()
 Saves wall information as a JSON file for read restart.
 
ModifierClone () const override
 Clones the current DataDumper instance.
 
void Execute () override
 Executes the DataDumper instance.
 
void Print ()
 Prints the current state of the DataDumper instance.
 
- Public Member Functions inherited from netdem::Modifier
 Modifier ()
 Default constructor for Modifier class.
 
virtual void Enable ()
 Enables the Modifier instance.
 
virtual void Disable ()
 Disables the Modifier instance.
 
virtual void Update ()
 Updates the Modifier instance.
 
virtual ~Modifier ()
 Destructor for Modifier class.
 

Static Public Member Functions

static void SaveParticleInfoAsVTK (VecXT< Particle * > const &p_list, std::string const &filename)
 Saves particle information to VTK format at a given filename.
 
static void SaveParticleMeshAsVTK (VecXT< Particle * > const &p_list, std::string const &filename)
 Saves particle mesh in VTK format at a given filename.
 

Public Attributes

bool dump_particle_info {true}
 A flag that determines whether to dump particle information.
 
bool dump_wall_info {false}
 A flag that determines whether to dump wall information.
 
bool dump_contact_info {false}
 A flag that determines whether to dump contact information.
 
bool dump_shape_info {false}
 A flag that determines whether to dump shape information.
 
bool dump_mesh {false}
 A flag that determines whether to dump mesh information.
 
bool dump_read_restart {false}
 A flag that determines whether to dump read restart information.
 
bool time_stamp_adjustable {true}
 A flag that determines if time stamp is adjustable.
 
bool dump_reconstructed {true}
 A flag that determines whether to dump reconstructed information.
 
- Public Attributes inherited from netdem::Modifier
std::string label {"default"}
 
DEMSolver::CyclePoint cycle_point {DEMSolver::CyclePoint::pre}
 
Simulationsim {nullptr}
 
Scenescene {nullptr}
 
bool update_with_scene {false}
 
bool enable_logging {true}
 

Detailed Description

Constructor & Destructor Documentation

◆ DataDumper()

netdem::DataDumper::DataDumper ( )

Default constructor for DataDumper class.

Member Function Documentation

◆ ClearHistories()

void netdem::DataDumper::ClearHistories ( )

Clears the history of when data was last saved.

◆ Clone()

Modifier * netdem::DataDumper::Clone ( ) const
overridevirtual

Clones the current DataDumper instance.

Returns
A pointer to the cloned DataDumper instance.

Reimplemented from netdem::Modifier.

◆ Execute()

void netdem::DataDumper::Execute ( )
overridevirtual

Executes the DataDumper instance.

Reimplemented from netdem::Modifier.

◆ Init()

◆ Print()

void netdem::DataDumper::Print ( )

Prints the current state of the DataDumper instance.

◆ SaveBondInfoAsDump()

void netdem::DataDumper::SaveBondInfoAsDump ( )

Saves bond information to dump format.

◆ SaveBondInfoAsVTK()

void netdem::DataDumper::SaveBondInfoAsVTK ( )

Saves bond information to VTK format.

◆ SaveBondVTKSeries()

void netdem::DataDumper::SaveBondVTKSeries ( )

Saves bond information as a VTK series.

◆ SaveCollisionInfoAsDump()

void netdem::DataDumper::SaveCollisionInfoAsDump ( )

Saves collision information to dump format.

◆ SaveCollisionInfoAsVTK()

void netdem::DataDumper::SaveCollisionInfoAsVTK ( )

Saves collision information to VTK format.

◆ SaveCollisionVTKSeries()

void netdem::DataDumper::SaveCollisionVTKSeries ( )

Saves collision information as a VTK series.

◆ SaveContactReadRestart()

void netdem::DataDumper::SaveContactReadRestart ( )

Saves contact information as a JSON file for read restart.

◆ SaveParticleInfoAsDump()

void netdem::DataDumper::SaveParticleInfoAsDump ( )

Saves particle information to dump format.

◆ SaveParticleInfoAsVTK() [1/2]

void netdem::DataDumper::SaveParticleInfoAsVTK ( )

Saves particle information to VTK format.

◆ SaveParticleInfoAsVTK() [2/2]

static void netdem::DataDumper::SaveParticleInfoAsVTK ( VecXT< Particle * > const & p_list,
std::string const & filename )
static

Saves particle information to VTK format at a given filename.

Parameters
p_listA vector of Particle pointers containing the particle information to save.
filenameThe name of the output file.

◆ SaveParticleInfoAsVTKWithProxy()

void netdem::DataDumper::SaveParticleInfoAsVTKWithProxy ( )

Saves particle information as VTK with proxy (for MPI debug use).

◆ SaveParticleMeshAsVTK() [1/2]

void netdem::DataDumper::SaveParticleMeshAsVTK ( )

Saves particle mesh in VTK format.

◆ SaveParticleMeshAsVTK() [2/2]

static void netdem::DataDumper::SaveParticleMeshAsVTK ( VecXT< Particle * > const & p_list,
std::string const & filename )
static

Saves particle mesh in VTK format at a given filename.

Parameters
p_listA vector of Particle pointers containing the particle information to save.
filenameThe name of the output file.

◆ SaveParticleMeshVTKSeries()

void netdem::DataDumper::SaveParticleMeshVTKSeries ( )

Saves particle mesh as a VTK series.

◆ SaveParticleReadRestart()

void netdem::DataDumper::SaveParticleReadRestart ( )

Saves particle information as a JSON file for read restart.

◆ SaveParticleVTKSeries()

void netdem::DataDumper::SaveParticleVTKSeries ( )

Saves particle information as a VTK series.

◆ SaveReadRestart()

void netdem::DataDumper::SaveReadRestart ( )

Saves all information as JSON files for read restart.

◆ SaveShapeInfoAsJson()

void netdem::DataDumper::SaveShapeInfoAsJson ( bool all_in_one = false)

Saves shape information as a JSON file.

Parameters
all_in_oneA flag that determines whether to save all the shapes in one file.

◆ SaveShapeInfoAsSTL()

◆ SaveShapeInfoAsVTK()

void netdem::DataDumper::SaveShapeInfoAsVTK ( )

Saves shape information to VTK format.

◆ SaveShapeReadRestart()

void netdem::DataDumper::SaveShapeReadRestart ( )

Saves shape information as a JSON file for read restart.

◆ SaveWallInfoAsDump()

void netdem::DataDumper::SaveWallInfoAsDump ( )

Saves wall information to dump format.

◆ SaveWallInfoAsVTK()

void netdem::DataDumper::SaveWallInfoAsVTK ( )

Saves wall information to VTK format.

◆ SaveWallMeshAsVTK()

void netdem::DataDumper::SaveWallMeshAsVTK ( )

Saves wall mesh in VTK format.

◆ SaveWallMeshVTKSeries()

void netdem::DataDumper::SaveWallMeshVTKSeries ( )

Saves wall mesh as a VTK series.

◆ SaveWallReadRestart()

void netdem::DataDumper::SaveWallReadRestart ( )

Saves wall information as a JSON file for read restart.

◆ SaveWallVTKSeries()

void netdem::DataDumper::SaveWallVTKSeries ( )

Saves wall information as a VTK series.

◆ SetDataType()

void netdem::DataDumper::SetDataType ( std::string const & data_type)

Sets the data type of the output file (vtk or dump format).

Parameters
data_typeThe new data type.

◆ SetRootPath()

◆ SetSaveByCycles()

◆ SetSaveByTime()

void netdem::DataDumper::SetSaveByTime ( double interval)

Sets the interval for saving data by time.

Parameters
intervalThe new time interval for saving data.

◆ SetSaveReadRestartByCycles()

void netdem::DataDumper::SetSaveReadRestartByCycles ( double interval)

Sets the interval for saving data by cycles.

Parameters
intervalThe new cycle interval for saving data.

◆ SetSaveReadRestartByTime()

void netdem::DataDumper::SetSaveReadRestartByTime ( double interval)

Sets the interval for saving data by time.

Parameters
intervalThe new time interval for saving data.

Member Data Documentation

◆ dump_contact_info

◆ dump_mesh

bool netdem::DataDumper::dump_mesh {false}

A flag that determines whether to dump mesh information.

Examples
02_energy_test.cpp, 1_gjk_solver.cpp, 2_sdf_solver.cpp, 81_voronoi_packing.cpp, and 90_random_packing.cpp.

◆ dump_particle_info

bool netdem::DataDumper::dump_particle_info {true}

A flag that determines whether to dump particle information.

◆ dump_read_restart

bool netdem::DataDumper::dump_read_restart {false}

A flag that determines whether to dump read restart information.

◆ dump_reconstructed

bool netdem::DataDumper::dump_reconstructed {true}

A flag that determines whether to dump reconstructed information.

◆ dump_shape_info

bool netdem::DataDumper::dump_shape_info {false}

A flag that determines whether to dump shape information.

Examples
0_plane_case.cpp, and blade_mixing_main.cpp.

◆ dump_wall_info

◆ time_stamp_adjustable

bool netdem::DataDumper::time_stamp_adjustable {true}

A flag that determines if time stamp is adjustable.


The documentation for this class was generated from the following files: