1 #ifndef STRAINCONVERTER_HH
2 #define STRAINCONVERTER_HH
7 #include "casm/external/Eigen/Dense"
25 namespace SymRepTools {
48 static Matrix3d biot(Eigen::Ref<const Matrix3d>
const &F);
70 Eigen::Ref<const Matrix3d>
const &F);
78 const std::vector<std::vector<Index> > &_order_strain)
82 if (_MODE == STRAIN_METRIC::GREEN_LAGRANGE)
84 else if (_MODE == STRAIN_METRIC::BIOT)
86 else if (_MODE == STRAIN_METRIC::HENCKY)
88 else if (_MODE == STRAIN_METRIC::EULER_ALMANSI)
90 else if (_MODE == STRAIN_METRIC::STRETCH)
92 else if (_MODE == STRAIN_METRIC::DISP_GRAD)
111 Eigen::Ref<const VectorXd>
const &E)
const;
114 Eigen::Ref<const Matrix3d>
const &F)
const;
116 Eigen::Ref<const Matrix3d>
const &F,
STRAIN_METRIC MODE)
const;
121 void set_mode(
const std::string &mode_name);
143 std::vector<std::vector<Index> >
Matrix3d unrolled_strain_metric_to_F(Eigen::Ref< const VectorXd > const &E) const
std::vector< std::vector< Index > > m_order_strain
void set_conventional_order_symmetric()
VectorXd unroll_E(Eigen::Ref< const Matrix3d > const &E) const
Unrolls the green-lagrange metric ( or any symmetric metric)
static Matrix3d right_stretch_tensor(Matrix3d &C, Eigen::Ref< const Matrix3d > const &F)
static Matrix3d euler_almansi_to_F(Eigen::Ref< const Matrix3d > const &A)
EULER_ALMANSI = (I-(F F^{T})^(-1))/2.
static Matrix3d hencky(Eigen::Ref< const Matrix3d > const &F)
HENCKY = log(C)/2.
static Matrix3d biot(Eigen::Ref< const Matrix3d > const &F)
BIOT = (U-I)
static Matrix3d strain_metric(Eigen::Ref< const Matrix3d > const &F, STRAIN_METRIC MODE)
void set_conventional_sop_transf_mat()
SymGroupRepID m_symrep_ID
static Matrix3d hencky_to_F(Eigen::Ref< const Matrix3d > const &H)
HENCKY = log(C)/2.
const Eigen::MatrixXd & sop_transf_mat() const
static Matrix3d euler_almansi(Eigen::Ref< const Matrix3d > const &F)
EULER_ALMANSI = (I-(F F^{T})^(-1))/2.
Matrix3d rollup_E(Eigen::Ref< const VectorXd > const &_unrolled_E) const
static Matrix3d metric_tensor(Eigen::Ref< const Matrix3d > const &F)
VectorXd unrolled_strain_metric(Eigen::Ref< const Matrix3d > const &F) const
Matrix3d(* MetricFuncPtr)(Eigen::Ref< const Matrix3d > const &)
void set_mode(const std::string &mode_name)
static Matrix3d disp_grad(Eigen::Ref< const Matrix3d > const &F)
DISP_GRAD = F.
STRAIN_METRIC STRAIN_METRIC_MODE
StrainConverter(const STRAIN_METRIC &_MODE, const MatrixXd &_sop_transf_mat, const std::vector< std::vector< Index > > &_order_strain)
StrainConverter(const std::string &mode_name)
static Matrix3d green_lagrange_to_F(Eigen::Ref< const Matrix3d > const &E)
GREEN_LAGRANGE = 1/2 * (F^{T} F - I)
static Matrix3d biot_to_F(Eigen::Ref< const Matrix3d > const &B)
BIOT = (U-I)
static Matrix3d disp_grad_to_F(Eigen::Ref< const Matrix3d > const &F)
VectorXd sop(Matrix3d &E, Matrix3d &C, Matrix3d &U, Eigen::Ref< const Matrix3d > const &F) const
static Matrix3d green_lagrange(Eigen::Ref< const Matrix3d > const &F)
GREEN_LAGRANGE = (C-I)/2.
MetricFuncPtr curr_inv_metric_func
void set_symmetrized_sop(const SymGroup &pg)
MetricFuncPtr curr_metric_func
void set_conventional_order_unsymmetric()
SymGroupRepID symrep_ID() const
Eigen::VectorXd m_weight_strain
MatrixXd m_sop_transf_mat
Matrix3d strain_metric_to_F(Eigen::Ref< const Matrix3d > const &E) const
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
Type-safe ID object for communicating and accessing Symmetry representation info.
strain::METRIC STRAIN_METRIC
INDEX_TYPE Index
For long integer indexing: