![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Provides fast methods to add/subtract list of data, to find maximum/minimum from list of data. More...
Functions | |
| template<typename T > | |
| size_t | maxIndex (const std::vector< T > &data) |
| Returns the index corresponding to maximum from list of data. | |
| template<typename T > | |
| size_t | minIndex (const std::vector< T > &data) |
| Returns the index corresponding to minimum from list of data. | |
| template<typename T > | |
| T | max (const std::vector< T > &data) |
| Returns the maximum from list of data. | |
| template<typename T > | |
| T | min (const std::vector< T > &data) |
| Returns the minimim from list of data. | |
| template<typename T > | |
| std::pair< size_t, T > | maxAndMaxIndex (const std::vector< T > &data) |
| Returns the maximum and index of maximum from list of data. | |
| template<typename T > | |
| std::pair< size_t, T > | minAndMinIndex (const std::vector< T > &data) |
| Returns the minimum and index of minimum from list of data. | |
| template<typename T > | |
| size_t | maxIndex (const std::vector< T > &data, size_t data_start, size_t data_end) |
| Returns the index corresponding to maximum from list of data. | |
| size_t | maxLengthIndex (const std::vector< util::Point > &data) |
| Returns the index that has maximum length of point from list of points. | |
| size_t | minLengthIndex (const std::vector< util::Point > &data) |
| Returns the index that has minimum length of point from list of points. | |
| double | maxLength (const std::vector< util::Point > &data) |
| Returns the maximum length of point from list of points. | |
| double | minLength (const std::vector< util::Point > &data) |
| Returns the minimum length of point from list of points. | |
| std::pair< double, size_t > | maxLengthAndMaxLengthIndex (const std::vector< util::Point > &data) |
| Returns the maximum length of point and index from list of points. | |
| std::pair< double, size_t > | minLengthAndMinLengthIndex (const std::vector< util::Point > &data) |
| Returns the minimum length of point and index from list of points. | |
| template<typename T > | |
| T | add (const std::vector< T > &data) |
| Returns the sum of data. | |
| bool | isFree (const int &i, const unsigned int &dof) |
| Returns true if degree of freedom is free. | |
| bool | isFree (const uint8_t &i, const unsigned int &dof) |
| Returns true if degree of freedom is free. | |
| template<typename T > | |
| bool | isInList (const T &i, const std::vector< T > &list) |
| Find if data is in the list. | |
| bool | isTagInList (const std::string &tag, const std::vector< std::string > &tags) |
| Returns true if tag is found in the list of tags. | |
| template<typename T > | |
| void | addToList (const T &i, std::vector< T > &list) |
| Add element to the list. | |
| float | timeDiff (std::chrono::steady_clock::time_point begin, std::chrono::steady_clock::time_point end, std::string unit="microseconds") |
| Returns difference between two times. | |
| template<typename T_out > | |
| T_out | getKeyData (std::string key, std::map< std::string, T_out > &data_map, bool issue_err=false) |
| Get data for a key. | |
| template<typename T_out > | |
| void | appendKeyData (std::string key, T_out data, std::map< std::string, T_out > &data_map, bool issue_err=false) |
| Append value to data associated with key. | |
| template<typename T_out > | |
| void | setKeyData (std::string key, T_out data, std::map< std::string, T_out > &data_map, bool issue_err=false) |
| Set value to data associated with key. | |
| template<class T > | |
| T | l2Dist (const std::vector< T > &x1, const std::vector< T > &x2) |
| Computes l2 distance between two vectors. | |
Provides fast methods to add/subtract list of data, to find maximum/minimum from list of data.
Returns the sum of data.
| data | List of real numbers |
Definition at line 243 of file vecMethods.h.
Add element to the list.
| i | Item to add |
| list | Vector of elements |
Definition at line 294 of file vecMethods.h.
References max().
Referenced by contact::Damping::apply().
|
inline |
Append value to data associated with key.
| key | Key to append the data to |
Definition at line 351 of file vecMethods.h.
References max().
|
inline |
Get data for a key.
| key | Key to access the data |
Definition at line 331 of file vecMethods.h.
References max().
Returns true if degree of freedom is free.
| i | Fixity value |
| dof | Degree of freedom to probe (dof = 0 for x, dof = 1 for y, and dof = 2 for z) |
Definition at line 254 of file vecMethods.h.
References max().
Referenced by PeriDEMModel::init(), and data::ModelData::isDofFree().
Returns true if degree of freedom is free.
| i | Fixity value |
| dof | Degree of freedom to probe (dof = 0 for x, dof = 1 for y, and dof = 2 for z) |
Definition at line 259 of file vecMethods.h.
References max().
Find if data is in the list.
| tag | Tag to search |
| tags | List of tags |
Definition at line 270 of file vecMethods.h.
References max().
Referenced by geom::isNumberOfParamForGeometryValid(), isTagInList(), loading::needToComputeDof(), and loading::needToProcessParticle().
|
inline |
Returns true if tag is found in the list of tags.
| tag | Tag to search |
| tags | List of tags |
Definition at line 284 of file vecMethods.h.
References isInList(), and max().
Referenced by rw::writer::VtkParticleWriter::appendNodes(), anonymous_namespace{vtkParticleWriter.cpp}::appendPointArraysForNodes(), geom::createGeomObjectOld(), data::setupQuadratureData(), and rw::writeOutput().
Computes l2 distance between two vectors.
| x1 | Vector 1 |
| x2 | Vector 2 |
Definition at line 395 of file vecMethods.h.
References max().
Referenced by test::testUtilMethods().
|
inline |
Returns the maximum from list of data.
| data | List of real numbers |
Definition at line 76 of file vecMethods.h.
References maxIndex().
Referenced by addToList(), data::ModelData::appendKeyData(), appendKeyData(), data::ModelData::getKeyData(), getKeyData(), PeriDEMModel::init(), isFree(), isFree(), isInList(), isTagInList(), l2Dist(), maxIndex(), maxIndex(), maxLength(), maxLengthAndMaxLengthIndex(), maxLengthIndex(), minIndex(), minLength(), minLengthAndMinLengthIndex(), minLengthIndex(), data::ModelData::setKeyData(), setKeyData(), timeDiff(), and contact::Contact::updateSearchParameters().
Returns the maximum and index of maximum from list of data.
| data | List of real numbers |
Definition at line 96 of file vecMethods.h.
References maxIndex().
Returns the index corresponding to maximum from list of data.
| data | List of real numbers |
Definition at line 40 of file vecMethods.h.
References max().
Referenced by geom::ComplexGeomObject::center(), max(), maxAndMaxIndex(), maxLength(), maxLengthAndMaxLengthIndex(), maxLengthIndex(), and contact::Contact::updateSearchParameters().
|
inline |
Returns the index corresponding to maximum from list of data.
| data | List of real numbers |
Definition at line 119 of file vecMethods.h.
References max().
|
inline |
Returns the maximum length of point from list of points.
| data | List of points |
Definition at line 187 of file vecMethods.h.
References max(), and maxIndex().
|
inline |
Returns the maximum length of point and index from list of points.
| data | List of points |
Definition at line 213 of file vecMethods.h.
References max(), and maxIndex().
Referenced by postprocess::Postprocess::checkStop().
|
inline |
Returns the index that has maximum length of point from list of points.
| data | List of points |
Definition at line 161 of file vecMethods.h.
References max(), and maxIndex().
Returns the minimim from list of data.
| data | List of real numbers |
Definition at line 86 of file vecMethods.h.
References minIndex().
Returns the minimum and index of minimum from list of data.
| data | List of real numbers |
Definition at line 107 of file vecMethods.h.
References minIndex().
Returns the index corresponding to minimum from list of data.
| data | List of real numbers |
Definition at line 58 of file vecMethods.h.
References max().
Referenced by min(), minAndMinIndex(), minLength(), minLengthAndMinLengthIndex(), and minLengthIndex().
|
inline |
Returns the minimum length of point from list of points.
| data | List of points |
Definition at line 200 of file vecMethods.h.
References max(), and minIndex().
|
inline |
Returns the minimum length of point and index from list of points.
| data | List of points |
Definition at line 227 of file vecMethods.h.
References max(), and minIndex().
|
inline |
Returns the index that has minimum length of point from list of points.
| data | List of points |
Definition at line 174 of file vecMethods.h.
References max(), and minIndex().
|
inline |
Set value to data associated with key.
| key | Key to append the data to |
Definition at line 374 of file vecMethods.h.
References max().
|
inline |
Returns difference between two times.
| begin | Beginning time |
| end | Ending time |
| unit | Unit in which time difference is to be returned |
Definition at line 309 of file vecMethods.h.
References max().
Referenced by PeriDEMModel::computeForces(), pd::exchangeGhostDisplacement(), particle::exchangeGhostKinematics(), pd::exchangeGhostTheta(), PeriDEMModel::init(), time_int::Integrator::integrate(), main(), mesh::metisGraphPartition(), nsearch::NFlannSearchKd< dim >::setInputCloud(), test::testGraphPartitioning(), test::testTaskflow(), and test::testTriElemTime().