NDDEM
Parameters.h
Go to the documentation of this file.
1 #ifndef PARAMETERS_H
2 #define PARAMETERS_H
3 
4 //using json = nlohmann::json;
5 using json = nddem::json ;
6 
9 //enum DataValue {radius, mass, Imom, pos, vel, omega, id1, id2, pospq, fpq, mpq, mqp} ;
10 
11 class Param {
12 public:
13 
14  int skipT=0 ;
15  int maxT =-1;
16  vector <string> flags = {} ;
17  int dim=-1 ;
18  vector <int> boxes ;
19  vector <vector <double> > boundaries ;
20  string save="" ;
21  vector<string> saveformat ;
23  std::vector<double> default_sqaxes{-1.,-1.,-1.}, default_sqpower{2,2,2} ;
24 
26 
28  double windowsize ;
29  vector<bool> periodicity ;
30  vector<double>delta ;
31 
32  std::map <std::string, bool> requiredfieldset = {{"dimension", false}, {"window size", false}, {"fields", false}, {"max time", false}, {"boundaries", false}, {"boxes", false}} ;
33 
34  //----- Files
35  struct File {
38  std::map <std::string, std::string> mapping ;
40  //~File() {if (reader != nullptr) {reader->close() ; delete (reader) ; }}
41  } ;
42  std::vector <File> files ;
43 
44  //----- Extra fields
45  struct ExtaField {
46  string name ;
48  FieldType type ;
49  std::optional<std::string> mapping ;
50  int datalocation ;
51  } ;
52  vector<ExtaField> extrafields ;
53 
54  int curts=0 ;
55  bool tsread = false ;
56 
57  void from_json (json & j) ;
58  int read_timestep (int ts, bool particleonly=false) ;
59  int set_data (Data & cgdata) ;
60  int get_num_particles () ;
61  int get_num_contacts () ;
62  double get_volume() ;
63  double * get_data(DataValue datavalue, int dd=0, std::string name="") ;
64  void post_init () ;
65 
66 
67 private :
68  int identify_max_level() ;
69  Windows identify_window(std::string windowname) ;
70  void process_extrafields (json &j) ;
71  void process_file (json &j) ;
72 } ;
73 
74 //=================================================================================================
75 void Param::from_json(json &j)
76 {
77  for (auto v : j.items())
78  {
79  if (v.key() == "file") {process_file(v.value()) ; }
80  else if (v.key() == "savefile") save = v.value().get<string>() ;
81  else if (v.key() == "saveformat")
82  {
83  try {saveformat = v.value().get<vector<string>>();}
84  catch(...) {string a = v.value().get<string>(); saveformat.push_back(a) ; }
85  }
86  else if (v.key() == "window size")
87  { windowsize = v.value().get<double>(); requiredfieldset[v.key()] = true ; }
88  else if (v.key() == "skip") skipT = v.value().get<int>() ;
89  else if (v.key() == "max time") { maxT = v.value().get<int>() ; requiredfieldset[v.key()] = true ;}
90  else if (v.key() == "fields") { flags = v.value().get<vector<string>>(); requiredfieldset[v.key()] = true ; }
91  else if (v.key() == "boxes") {boxes = v.value().get<decltype(boxes)>(); requiredfieldset[v.key()] = true ; }
92  else if (v.key() == "boundaries") {boundaries = v.value().get<decltype(boundaries)>(); requiredfieldset[v.key()] = true ; }
93  else if (v.key() == "time average")
94  {
95  if (v.value().get<string>() == "None") timeaverage = AverageType::None ;
96  else if (v.value().get<string>() == "Final") timeaverage = AverageType::Final ;
97  else if (v.value().get<string>() == "Intermediate") timeaverage = AverageType::Intermediate ;
98  else if (v.value().get<string>() == "Intermediate and Final" || v.value().get<string>() =="Final and Intermediate") timeaverage = AverageType::Both ;
99  else if (v.value().get<string>() == "Pre pass 5") timeaverage = AverageType::Pre5 ;
100  else if (v.value().get<string>() == "Intermediate and pre pass 5") timeaverage = AverageType::IntermediateAndPre5 ;
101  else
102  printf("WARN: unknown average type (allowed: 'None', 'Final', 'Intermediate', 'Intermediate and Final', 'Pre pass 5', 'Intermediate and pre pass 5'). Case sensitive\n") ;
103  }
104  else if (v.key() == "window") {window = identify_window(v.value().get<string>()); }
105  else if (v.key() == "periodicity") {periodicity = v.value().get<decltype(periodicity)>();}
106  else if (v.key() == "density") { default_density=v.value().get<double>() ; }
107  else if (v.key() == "radius") { default_radius=v.value().get<double>() ; }
108  else if (v.key() == "diameter") { default_radius=v.value().get<double>()/2. ; }
109  else if (v.key() == "superquadric") {
110  default_sqaxes = v.value()["axes"].get<decltype(default_sqaxes)>() ;
111  default_sqpower = v.value()["shapes"].get<decltype(default_sqpower)>() ;
112  }
113  else if (v.key() == "extra fields") { process_extrafields(v.value()) ; }
114  else if (v.key() == "dimension") {dim = v.value().get<int>() ; requiredfieldset[v.key()] = true ; }
115  else printf("Unknown json key: %s.\n", v.key().c_str()) ;
116  }
117 
118 
119 /*
120  post_init() ;
121 */
122 }
123 //-----------------------------------------------
124 int Param::read_timestep (int ts, bool particleonly)
125 {
126  if (curts == ts && tsread) return 0 ; //Already read and all
127  printf("%d ", ts) ;fflush(stdout) ;
128  for (auto & v: files)
129  {
130  v.reader->read_timestep(ts) ;
131  }
132  return 1 ;
133 }
134 //-------------------------------
135 void Param::post_init()
136 {
137  if (files.size() ==0) { printf("ERR: a file should be defined.\n"); return ; }
138  if (dim == -1 || !requiredfieldset["dimension"] ) dim=files[0].reader->get_dimension() ;
139  if (!requiredfieldset["window size"]) { printf("ERR: 'window size' is required and cannot be built. \n") ; return ; }
140  if (!requiredfieldset["fields"]) { printf("ERR: 'fields' is required and cannot be built. \n") ; return ; }
141  if (!requiredfieldset["boxes"]) { printf("ERR: the number of boxes in each dimension is required and cannot be built.\n") ; return ; }
142  if (!requiredfieldset["max time"])
143  {
144  maxT = files[0].reader->get_numts() ;
145  printf("//%d %d//", maxT, skipT) ;
146  if (maxT==-1)
147  {
148  printf("ERR: Cannot find the total number of timestep from the file.\n") ;
149  return ;
150  }
151  maxT -= skipT ;
152  printf("//%d//", maxT) ;
153  if (maxT<0) maxT=0 ;
154  }
155  if (!requiredfieldset["boundaries"]) boundaries= files[0].reader->get_bounds() ;
156 
157  if ((boundaries.size() != 2 && boundaries.size() != 3) || boundaries[0].size() != static_cast<unsigned int>(dim) || boundaries[1].size()!=static_cast<unsigned int>(dim))
158  printf("ERR: dimension of the boundaries is not consistent (should be '2 x dimension' or '3 x dimension' if including delta)\n") ;
159  if (boxes.size() != static_cast<unsigned int>(dim))
160  printf("ERR: dimension of the boxes is not consistent (should be 'dimension')\n") ;
161 
162  if (periodicity.size()>0)
163  {
164  bool hasper=false ;
165  for (auto v : periodicity)
166  if (v)
167  hasper=true ;
168  if (!hasper)
169  periodicity.resize(0) ; // A periodic vector was defined, but with no PBC ... removing it.
170  else
171  {
172  delta.resize(dim,0) ;
173 
174  for(int i=0 ; i<dim ; i++)
175  {
176  if (periodicity[i])
177  {
178  if (boxes[i]!=1)
179  printf("WARN: using more than 1 box in the periodic dimension does not make much sense\n");
180  delta[i] = boundaries[1][i]-boundaries[0][i] ;
181  }
182  }
183  }
184  }
185 
186  if (default_density!=-1)
187  {
188  for (auto &v: files)
189  v.reader->set_default_density(default_density) ;
190  }
191  if (default_radius!=-1)
192  for (auto &v: files)
193  v.reader->set_default_radius(default_radius) ;
194 
195  if (default_sqaxes[0] != -1)
196  for (auto &v: files)
197  v.reader->set_default_superquadric(default_sqaxes[0], default_sqaxes[1], default_sqaxes[2], default_sqpower[0], default_sqpower[1], default_sqpower[2]) ;
198 
199  for (auto &v: files)
200  v.reader->post_init() ;
201 }
202 //---------------------------------------------------
204 {
205  printf("THIS FUNCTION HAS BEEN REMOVED (identify_max_level)\n") ;
206 return -1 ;
207 }
208 //----------------------------------------------------------
209 Windows Param::identify_window(std::string windowstr)
210 {
211  if ( windowstr=="Rect3D") return Windows::Rect3D ;
212  else if ( windowstr=="Rect3DIntersect") {printf("====> DEPRECATED: misleading name, use Sphere3DIntersect instead. <=======\n") ; return Windows::Sphere3DIntersect ;}
213  else if ( windowstr=="Sphere3DIntersect") return Windows::Sphere3DIntersect ;
214  else if ( windowstr=="SphereNDIntersect") return Windows::SphereNDIntersect ;
215  else if ( windowstr=="Sphere3DIntersect_MonteCarlo") return Windows::Sphere3DIntersect_MonteCarlo ;
216  else if ( windowstr=="Lucy3D") return Windows::Lucy3D ;
217  else if ( windowstr=="Hann3D") return Windows::Hann3D ;
218  else if ( windowstr=="RectND") return Windows::RectND ;
219  else if ( windowstr=="LucyND") return Windows::LucyND ;
220  else if ( windowstr=="LucyND_Periodic") return Windows::LucyND_Periodic ;
221  else if ( windowstr=="Lucy3DFancyInt") return Windows::Lucy3DFancyInt;
222  else if ( windowstr=="RVE") return Windows::RVE;
223  else {printf("Unknown windowing function.\n") ; return Windows::Lucy3D ; }
224 }
225 //-------------------------------------
227 {
228  for (auto & v : j)
229  {
231  if (v["type"].get<string>()=="Particle") typ = FieldType::Particle ;
232  else if (v["type"].get<string>()=="Contact") typ = FieldType::Contact ;
233  else if (v["type"].get<string>()=="Fluctuation") typ = FieldType::Fluctuation ;
234  else printf("ERR: unknown extrafields type\n") ;
235  extrafields.push_back({.name=v["name"].get<string>(), .order=static_cast<TensorOrder>(v["tensor order"].get<int>()), .type=typ}) ;
236  if (v.exist("mapping")) {extrafields.back().mapping=v["mapping"].get<string>();}
237  }
238 }
239 //---------------------------------------------------------
241 {
242  for (size_t f=0 ; f<j2.size() ; f++)
243  {
244  auto & j =j2[f] ;
245 
246  // Treat actions first if the tag is present
247  if (j.exist("action"))
248  {
249  auto v = j["action"] ;
250  if ( v.get<string>() == "remove")
251  {
252  files.erase(files.begin()+f) ;
253  continue ;
254  }
255  else if (v.get<string>() == "edit")
256  files.erase(files.begin()+f) ;
257  else if (v.get<string>() == "donothing")
258  continue ;
259  else if (v.get<string>() == "create")
260  ; // do nothing
261  else
262  printf("WARN: Unknown action command on process_file\n") ;
263  }
264 
265  FileType content = FileType::particles ;
266  if (j.exist("content"))
267  {
268  if ( j["content"].get<string>() == "particles") content = FileType::particles ;
269  else if ( j["content"].get<string>() == "contacts") content = FileType::contacts ;
270  else if ( j["content"].get<string>() == "both") content = FileType::both ;
271  else printf("WARN: unknown file content.\n") ;
272  }
273  else {printf("WARN: the key 'content' is recommended when defining a file. Set to 'particles' by default.\n") ;}
274 
275  FileFormat format ;
276  if (j.exist("format"))
277  {
278  if ( j["format"].get<string>() == "liggghts") format = FileFormat::Liggghts ;
279  else if ( j["format"].get<string>() == "NDDEM") format = FileFormat::NDDEM ;
280  else if ( j["format"].get<string>() == "mercury_legacy") format = FileFormat::MercuryData ;
281  else if ( j["format"].get<string>() == "mercury_vtu") format = FileFormat::MercuryVTU ;
282  else if ( j["format"].get<string>() == "yade") format = FileFormat::Yade ;
283  else if ( j["format"].get<string>() == "interactive") format = FileFormat::Interactive ;
284  else {printf("ERR: unknown file format.\n") ; return ;}
285  }
286  else { printf("ERR: the key 'format' is required when defining a file. \n") ; return ; }
287 
288 
289  std::map <std::string, std::string> mapping ;
290  if ( j.exist("mapping") ) mapping= j["mapping"].get<std::map <std::string, std::string>>();
291 
292  files.insert(files.begin()+f, {.fileformat=format, .filetype=content, .mapping=mapping, .reader = nullptr,}) ;
293 
294  if (files[f].fileformat == FileFormat::NDDEM)
295  files[f].reader = new NDDEMReader (j["filename"].get<string>());
296  else if (files[f].fileformat == FileFormat::Interactive)
297  files[f].reader = new InteractiveReader ();
298  #ifndef NOTALLFORMATS
299  else if (files[f].fileformat == FileFormat::Liggghts)
300  {
301  if (files[f].filetype == FileType::both)
302  files[f].reader = new LiggghtsReader (j["filename"].get<string>()) ;
303  else if (files[f].filetype == FileType::particles)
304  files[f].reader = new LiggghtsReader_particles (j["filename"].get<string>()) ;
305  else if (files[f].filetype == FileType::contacts)
306  {
307  std::vector<File>::iterator it ;
308  for (it = files.begin() ; it<files.end() ; it++)
309  if (it->filetype==FileType::particles)
310  break ;
311  if (it == files.end())
312  {
313  printf("ERR: a dump particles needs to be defined before defining a dump contacts\n") ;
314  files.pop_back() ;
315  continue ;
316  }
317  files[f].reader = new LiggghtsReader_contacts (j["filename"].get<string>(), it->reader, files[f].mapping) ;
318  }
319  }
320  else if (files[f].fileformat == FileFormat::MercuryData)
321  {
322  if (files[f].filetype == FileType::particles)
323  files[f].reader = new MercuryReader_data_particles (j["filename"].get<string>()) ;
324  else if (files[f].filetype == FileType::contacts) // TODO
325  {}//files[f].reader = new MercuryReader_contacts (files[f].path) ;
326  else
327  printf("ERR: no Mercury file format support FileType::both.\n") ;
328  }
329  else if (files[f].fileformat == FileFormat::MercuryVTU)
330  {
331  if (files[f].filetype == FileType::particles)
332  files[f].reader = new MercuryReader_vtu_particles (j["filename"].get<string>()) ;
333  //else if (files[f].filetype == FileType::contacts) // TODO
334  //{}//files[f].reader = new MercuryReader_contacts (files[f].path) ;
335  else
336  printf("ERR: no Mercury VTU file format support FileType::contacts and FileType::both.\n") ;
337  }
338  else if (files[f].fileformat == FileFormat::Yade)
339  {
340  files[f].reader = new YadeReader() ;
341  }
342  #endif
343  else
344  {
345  printf("Coarse graining has not been compiled with the requested file format") ;
346  }
347 
348  bool multifile = false ;
349  files[f].reader->path = j["filename"].get<string>() ;
350  if (j.exist("initial")) {multifile = true ; files[f].reader->filenumbering.initial = j["initial"].get<double>() ; }
351  if (j.exist("delta")) {multifile = true ; files[f].reader->filenumbering.delta = j["delta"].get<double>() ; }
352 
353  if (multifile && files[f].reader->path.find('%') == std::string::npos)
354  printf("WARN: you have provided file initial or delta numbering, but there is no pattern in your filename, which is surprising\n") ;
355  if (files[f].reader->path.find('%') != std::string::npos) files[f].reader->filenumbering.ismultifile = true ;
356 
357  }
358 }
359 //------------------
360 int Param::set_data(struct Data & D)
361 {
366 
367  D.pos.resize(dim) ; D.vel.resize(dim) ;
368  D.pospq.resize(dim) ; D.lpq.resize (dim) ;
369  D.fpq.resize (dim) ;
370  D.omega.resize(dim*(dim-1)/2);
371  D.mpq.resize (dim*(dim-1)/2) ; D.mqp.resize (dim*(dim-1)/2) ;
372 
375  for (int dd=0 ; dd<dim ; dd++)
376  {
377  D.pos[dd] = get_data(DataValue::pos, dd) ;
378  D.vel[dd] = get_data(DataValue::vel, dd) ;
379  D.pospq[dd] = get_data(DataValue::pospq, dd) ;
380  D.lpq[dd] = get_data(DataValue::lpq, dd) ;
381  D.fpq[dd] = get_data(DataValue::fpq, dd) ;
382  }
383  for (int dd=0 ; dd<dim*(dim-1)/2 ; dd++)
384  {
385  D.omega[dd] = get_data(DataValue::omega, dd) ;
386  D.mpq[dd] = get_data(DataValue::mpq, dd) ;
387  D.mqp[dd] = get_data(DataValue::mqp, dd) ;
388  }
389 
390  D.orient.resize(4) ;
391  for (int dd=0 ; dd<4 ; dd++)
392  D.orient[dd] = get_data(DataValue::orient, dd) ;
393 
394  D.superquadric.resize(6) ;
395  for (int dd=0 ; dd<6 ; dd++)
397 
398  for (auto &v: D.extrafields)
399  {
400  for (int dd=0 ; dd<std::get<1>(v) ; dd++)
401  D.extra[std::get<2>(v)+dd] = get_data(DataValue::extra_named, dd, std::get<0>(v)) ;
402  }
403  return 0 ;
404 }
405 //------------------------------------------------------------------------
407 {
408  for (auto &v: files)
409  if (v.reader->get_num_particles() != -1)
410  return v.reader->get_num_particles() ;
411  return -1 ;
412 }
414 {
415  for (auto &v: files)
416  if (v.reader->get_num_contacts() != -1)
417  return v.reader->get_num_contacts() ;
418  return -1 ;
419 }
421 {
422  auto bnds = files[0].reader->get_bounds() ;
423  double volume = 1 ;
424  for (size_t i=0; i<bnds[0].size() ; i++)
425  volume *= bnds[1][i]-bnds[0][i] ;
426  return volume ;
427 }
428 double * Param::get_data(DataValue datavalue, int dd, std::string name)
429 {
430  double * res ;
431  for (auto &v: files)
432  {
433  res = v.reader->get_data(datavalue, dd, name) ;
434  if (res != nullptr)
435  return res;
436  }
437  return nullptr ;
438 }
439 #endif
FileType
Definition: Parameters.h:8
@ particles
Definition: Parameters.h:8
@ both
Definition: Parameters.h:8
@ contacts
Definition: Parameters.h:8
FileFormat
Definition: Parameters.h:7
@ Interactive
Definition: Parameters.h:7
@ Yade
Definition: Parameters.h:7
@ MercuryVTU
Definition: Parameters.h:7
@ NDDEM
Definition: Parameters.h:7
@ Liggghts
Definition: Parameters.h:7
@ MercuryData
Definition: Parameters.h:7
Windows
Definition: WindowLibrary.h:2
@ Lucy3DFancyInt
@ LucyND_Periodic
@ SphereNDIntersect
@ Sphere3DIntersect_MonteCarlo
@ Sphere3DIntersect
Definition: Reader-interactive.h:7
Definition: Reader-Liggghts.h:110
Definition: Reader-Liggghts.h:73
Definition: Reader-Liggghts.h:18
Definition: Reader-Mercury.h:56
Definition: Reader-Mercury.h:28
Definition: Reader-NDDEM.h:5
Definition: Reader.h:10
Definition: Reader-Yade.h:11
namespace for Niels Lohmann
Definition: json.hpp:20203
auto get() const noexcept(noexcept(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {}))) -> decltype(std::declval< const basic_json_t & >().template get_impl< ValueType >(detail::priority_tag< 4 > {}))
get a (pointer) value (explicit)
Definition: json.hpp:21875
vector< double * > superquadric
Superquadrics information.
Definition: Coarsing.h:112
vector< double * > omega
Particle angular velocity.
Definition: Coarsing.h:108
AverageType
Definition: Coarsing.h:65
vector< double * > mpq
Moment of particle 1 on 2.
Definition: Coarsing.h:123
double * radius
Particle radius.
Definition: Coarsing.h:103
int N
Number of particles.
Definition: Coarsing.h:102
vector< double * > pospq
Location of contact point.
Definition: Coarsing.h:120
double * id2
Index of the second particle in contact.
Definition: Coarsing.h:119
vector< double * > fpq
Force at contact.
Definition: Coarsing.h:122
double * mass
Particle masses.
Definition: Coarsing.h:104
vector< double * > pos
Particle positions.
Definition: Coarsing.h:106
TensorOrder
Definition: Coarsing.h:63
int Ncf
Number of contacts.
Definition: Coarsing.h:117
vector< double * > orient
Particle orientation (quaternions)
Definition: Coarsing.h:109
vector< double * > extra
Definition: Coarsing.h:127
double * id1
Index of first particle in contact.
Definition: Coarsing.h:118
vector< std::tuple< std::string, int, int > > extrafields
Definition: Coarsing.h:128
FieldType
Definition: Coarsing.h:64
double * Imom
Particle moment of inertia.
Definition: Coarsing.h:105
vector< double * > lpq
Branch vector of the contact, use compute_lpq() to populate this.
Definition: Coarsing.h:121
vector< double * > mqp
Moment of particle 2 on 1.
Definition: Coarsing.h:124
vector< double * > vel
Particle velocity.
Definition: Coarsing.h:107
@ Pre5
Definition: Coarsing.h:65
@ Final
Definition: Coarsing.h:65
@ None
Definition: Coarsing.h:65
@ IntermediateAndPre5
Definition: Coarsing.h:65
@ Both
Definition: Coarsing.h:65
@ Intermediate
Definition: Coarsing.h:65
@ Particle
Definition: Coarsing.h:64
@ Fluctuation
Definition: Coarsing.h:64
@ Contact
Definition: Coarsing.h:64
DataValue
Definition: Typedefs.h:19
@ superquadric
Definition: Typedefs.h:19
@ fpq
Definition: Typedefs.h:19
@ Imom
Definition: Typedefs.h:19
@ pospq
Definition: Typedefs.h:19
@ id2
Definition: Typedefs.h:19
@ lpq
Definition: Typedefs.h:19
@ pos
Definition: Typedefs.h:19
@ vel
Definition: Typedefs.h:19
@ orient
Definition: Typedefs.h:19
@ mqp
Definition: Typedefs.h:19
@ mpq
Definition: Typedefs.h:19
@ id1
Definition: Typedefs.h:19
@ extra_named
Definition: Typedefs.h:19
@ omega
Definition: Typedefs.h:19
@ radius
Definition: Typedefs.h:19
@ mass
Definition: Typedefs.h:19
struct JsonValue json
Definition: json_parser.h:15
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
Data structure handling point data and contact data.
Definition: Coarsing.h:99
Definition: IOLiggghts.h:92
TensorOrder order
Definition: IOLiggghts.h:94
string name
Definition: IOLiggghts.h:93
std::optional< std::string > mapping
Definition: Parameters.h:49
int datalocation
Definition: Parameters.h:50
FieldType type
Definition: IOLiggghts.h:95
Definition: Parameters.h:35
FileFormat fileformat
Definition: Parameters.h:36
Reader * reader
Definition: Parameters.h:39
std::map< std::string, std::string > mapping
Definition: Parameters.h:38
FileType filetype
Definition: Parameters.h:37
Contains the parameters of the simulation & CG.
Definition: IOLiggghts.h:67
string windowstr
Definition: IOLiggghts.h:86
int set_data(Data &cgdata)
Definition: Parameters.h:360
int read_timestep(int ts, bool particleonly=false)
Definition: Parameters.h:124
vector< int > boxes
Definition: IOLiggghts.h:75
std::vector< double > default_sqaxes
Definition: Parameters.h:23
std::vector< File > files
Definition: Parameters.h:42
vector< vector< double > > boundaries
Definition: IOLiggghts.h:76
double default_density
Definition: Parameters.h:22
double windowsize
Definition: IOLiggghts.h:88
bool tsread
Definition: Parameters.h:55
Windows identify_window(std::string windowname)
Definition: Parameters.h:209
vector< ExtaField > extrafields
Definition: IOLiggghts.h:97
AverageType timeaverage
Definition: Parameters.h:25
vector< bool > periodicity
Definition: IOLiggghts.h:89
double get_volume()
Definition: Parameters.h:420
double * get_data(DataValue datavalue, int dd=0, std::string name="")
Definition: Parameters.h:428
vector< string > saveformat
Definition: IOLiggghts.h:78
void from_json(json &j)
string save
Definition: IOLiggghts.h:77
int maxT
Definition: IOLiggghts.h:72
void process_extrafields(json &j)
Definition: Parameters.h:226
vector< string > flags
Definition: IOLiggghts.h:73
Windows window
Definition: IOLiggghts.h:87
int get_num_particles()
Definition: Parameters.h:406
int get_num_contacts()
Definition: Parameters.h:413
void post_init()
std::vector< double > default_sqpower
Definition: Parameters.h:23
const int dim
Definition: IOLiggghts.h:74
vector< double > delta
Definition: IOLiggghts.h:90
int identify_max_level()
Definition: Parameters.h:203
std::map< std::string, bool > requiredfieldset
Definition: Parameters.h:32
int skipT
Definition: IOLiggghts.h:71
double default_radius
Definition: Parameters.h:22
int curts
Definition: Parameters.h:54
void process_file(json &j)
Definition: Parameters.h:240