31 #ifndef _LibDEM_Prop_Stress_HPP
32 #define _LibDEM_Prop_Stress_HPP
41 #define GRANOO_STESS_GET_CRITERION(I) \
42 double get_criterion ## I() const {if (_criterion_list.size() > I) return _criterion_list[I]; return 0.;}
62 virtual std::string
info()
const;
70 GRANOO_ACCESS(periodic ,
bool ,
_periodic );
84 GRANOO_STESS_GET_CRITERION(0);
85 GRANOO_STESS_GET_CRITERION(1);
86 GRANOO_STESS_GET_CRITERION(2);
87 GRANOO_STESS_GET_CRITERION(3);
88 GRANOO_STESS_GET_CRITERION(4);
89 GRANOO_STESS_GET_CRITERION(5);
100 template<
class Archive>
void serialize(Archive& ar,
const unsigned int );
121 template<
class Archive>
void
123 ar & boost::serialization::base_object<Core::Prop<Element> >(*this);
139 #include <boost/serialization/version.hpp>
145 GRANOO_CLASS_DECLARE_TPL(DEM::Stress);
BOOST_CLASS_VERSION(GranOO3::DEM::Stress, 0) namespace GranOO3
Definition: Stress.hpp:140
Definition: SetOf.hpp:346
a base class that represents an element
Definition: Element.hpp:55
a property for computing stress associated to DEM::Element
Definition: Stress.hpp:52
double _volume_fraction
the volume fraction for computing virial stress (virial stress computation needs the real volume).
Definition: Stress.hpp:116
double get_tresca_stress() const
get the Tresca stress
Definition: Stress.cpp:288
Geom::Frame _principal_frame
the local frame which are expressed the principal stresses (principal direction)
Definition: Stress.hpp:106
double & criterion(size_t i)
get the i_th criterion
Definition: Stress.cpp:97
void serialize(Archive &ar, const unsigned int)
complete serializing of the item in the *.gdd format
Definition: Stress.hpp:122
double _principal_stress_3
the value of the third (lower) principal stress
Definition: Stress.hpp:110
void compute_virial_stress()
compute the stress using the virial method
Definition: Stress.cpp:176
virtual std::string info() const
Display some useful info in the terminal
Definition: Stress.cpp:86
double _principal_stress_2
the value of the second (intermediate) principal stress
Definition: Stress.hpp:109
unsigned int _neighbour_level
the neighbor level (level of neighboring) for the computation of the virial stress.
Definition: Stress.hpp:115
void update_principal_stress()
update the principal stresses from the current value of the _stress_tensor attribute
Definition: Stress.cpp:263
std::vector< double > _criterion_list
the values of criteria (in case of many criteria are applied)
Definition: Stress.hpp:113
double _principal_stress_1
the value of the first (maximal) principal stress
Definition: Stress.hpp:108
bool _periodic
a flag for including priodic condition for the virial stress computation
Definition: Stress.hpp:118
Geom::Point _principal_point
this is just a trick for having a local frame ("useless as this")
Definition: Stress.hpp:104
virtual ~Stress()
destructor
Definition: Stress.cpp:82
void add_criterion(double value)
add a criterion, the criterion is often used for fracture but you can use it as you want
Definition: Stress.cpp:92
void compute_lsq_stress()
compute the stress using a least square method (EXPERIMENTAL)
Definition: Stress.cpp:200
double get_vonmises_stress() const
get the von Mises stress
Definition: Stress.cpp:279
void compute_virial_stress_for(Element *de, unsigned int level, std::set< Element * > &set)
a util recursive method for computing virial stress
Definition: Stress.cpp:103
friend class boost::serialization::access
Definition: Stress.hpp:99
bool _include_velocity
a flag for including the velocity within the virial stress computation
Definition: Stress.hpp:117
Geom::Vector _principal_stress
a vector that stores the three principal stresses, note that the component are ordered like this X > ...
Definition: Stress.hpp:107
double get_hydrostatic_stress() const
get the hydrostatic stress
Definition: Stress.cpp:274
double _criterion
the value of the main criterion (in case of only one criterion is applied)
Definition: Stress.hpp:112
Geom::Quaternion _principal_quat
this quaternion that model the rotation matrix (from global frame) for retrieving the principal direc...
Definition: Stress.hpp:105
Geom::SymTensor _stress_tensor
the main stress tensor which is updated by the compute_virial_stress() and the compute_lsq_stress() m...
Definition: Stress.hpp:103
Definition: Quaternion.hpp:54
Definition: SymTensor.hpp:68
Definition: Vector.hpp:75
Definition: Common.hpp:198
T value(details::expression_node< T > *n)
Definition: Exprtk.hpp:15070