NDDEM
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
LiggghtsReader Class Reference

#include <Reader-Liggghts.h>

+ Inheritance diagram for LiggghtsReader:

Public Member Functions

 LiggghtsReader (std::string ppath)
 
 ~LiggghtsReader ()
 
int open (string path)
 
int reset ()
 
std::vector< vector< double > > get_bounds ()
 
std::vector< double > get_minmaxradius ()
 
int get_numts ()
 
int read_timestep (int ts)
 
int get_num_particles ()
 
int get_num_contacts ()
 
- Public Member Functions inherited from Reader
virtual int get_dimension ()
 
virtual double * get_data ([[maybe_unused]] DataValue datavalue, [[maybe_unused]] int dd, [[maybe_unused]] std::string name="")
 
virtual int build_index ()
 
virtual int read_timestep ([[maybe_unused]] int ts)
 
virtual void post_init ()
 
void set_default_radiusdensity (double radius, double density)
 
void set_default_radius (double radius)
 
void set_default_density (double density)
 
double get_default_radius ()
 
double get_default_density ()
 
void build_pospqlpq_from_ids (v2d &contactarray, int idx_id1, int idx_id2, int idx_pospq, int idx_lpq, v2d &particlearray, int idx_pos, int idx_r=-1)
 
int clean_contacts (v2d &contactarray, int id1, int id2, int idx_lpq, v2d &particlearray, int idx_r)
 
std::string getpath (int ts)
 

Public Attributes

std::istream * in = nullptr
 
int actualts =0
 
int Nitem
 
std::vector< std::string > fields
 
v2d data
 
v2d tdata
 
v1d dataextra
 
vector< vector< double > > boundaries = vector<vector<double>>(3,vector<double>(3,0))
 
vector< bool > periodicity = vector<bool>(3,false)
 
std::map< std::string, std::string > cfmapping
 
- Public Attributes inherited from Reader
bool is_seekable = false
 
bool is_fullymapped = false
 
std::vector< std::optional< std::streampos > > mapped_ts
 
std::string path
 
int curts =-1
 
struct {
   double   initial = 0
 
   double   delta = 1
 
   int   numts = -1
 
   bool   ismultifile = false
 
filenumbering
 

Private Member Functions

int read_timestep_impl (int ts, bool skip=false)
 
virtual int do_post_read ()
 

Private Attributes

boost::iostreams::filtering_streambuf< boost::iostreams::input > * filt_in
 
boost::iostreams::filtering_streambuf< boost::iostreams::input_seekable > * filt_in_seekable
 
ifstream * file_in = nullptr
 
std::string path
 

Additional Inherited Members

- Protected Attributes inherited from Reader
std::vector< std::pair< double, streampos > > index
 

Constructor & Destructor Documentation

◆ LiggghtsReader()

LiggghtsReader::LiggghtsReader ( std::string  ppath)
inline

◆ ~LiggghtsReader()

LiggghtsReader::~LiggghtsReader ( )
inline

Member Function Documentation

◆ do_post_read()

virtual int LiggghtsReader::do_post_read ( )
inlineprivatevirtual

◆ get_bounds()

vector< vector< double > > LiggghtsReader::get_bounds ( )
virtual

Reimplemented from Reader.

◆ get_minmaxradius()

vector< double > LiggghtsReader::get_minmaxradius ( )
virtual

Reimplemented from Reader.

◆ get_num_contacts()

int LiggghtsReader::get_num_contacts ( )
inlinevirtual

Reimplemented from Reader.

Reimplemented in LiggghtsReader_particles.

◆ get_num_particles()

int LiggghtsReader::get_num_particles ( )
inlinevirtual

Reimplemented from Reader.

Reimplemented in LiggghtsReader_contacts.

◆ get_numts()

int LiggghtsReader::get_numts ( )
virtual

Reimplemented from Reader.

◆ open()

int LiggghtsReader::open ( string  path)

◆ read_timestep()

int LiggghtsReader::read_timestep ( int  ts)

◆ read_timestep_impl()

int LiggghtsReader::read_timestep_impl ( int  ts,
bool  skip = false 
)
private

◆ reset()

int LiggghtsReader::reset ( )

Member Data Documentation

◆ actualts

int LiggghtsReader::actualts =0

◆ boundaries

vector<vector <double> > LiggghtsReader::boundaries = vector<vector<double>>(3,vector<double>(3,0))

◆ cfmapping

std::map<std::string, std::string> LiggghtsReader::cfmapping

◆ data

v2d LiggghtsReader::data

◆ dataextra

v1d LiggghtsReader::dataextra

◆ fields

std::vector<std::string> LiggghtsReader::fields

◆ file_in

ifstream* LiggghtsReader::file_in = nullptr
private

◆ filt_in

boost::iostreams::filtering_streambuf<boost::iostreams::input>* LiggghtsReader::filt_in
private

◆ filt_in_seekable

boost::iostreams::filtering_streambuf<boost::iostreams::input_seekable>* LiggghtsReader::filt_in_seekable
private

◆ in

std::istream* LiggghtsReader::in = nullptr

◆ Nitem

int LiggghtsReader::Nitem

◆ path

std::string LiggghtsReader::path
private

◆ periodicity

vector<bool> LiggghtsReader::periodicity = vector<bool>(3,false)

◆ tdata

v2d LiggghtsReader::tdata

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