20 Matrix3d &C,
const Eigen::Ref<const Matrix3d> &F) {
28 const Eigen::Ref<const Matrix3d> &F) {
35 return strain::deformation_tensor_to_metric<STRAIN_METRIC::GREEN_LAGRANGE>(F);
41 const Eigen::Ref<const Matrix3d> &E) {
42 return strain::metric_to_deformation_tensor<STRAIN_METRIC::GREEN_LAGRANGE>(E);
48 return strain::deformation_tensor_to_metric<STRAIN_METRIC::BIOT>(F);
54 return strain::metric_to_deformation_tensor<STRAIN_METRIC::BIOT>(B);
60 return strain::deformation_tensor_to_metric<STRAIN_METRIC::HENCKY>(F);
66 return strain::metric_to_deformation_tensor<STRAIN_METRIC::HENCKY>(H);
72 return strain::deformation_tensor_to_metric<STRAIN_METRIC::EULER_ALMANSI>(F);
78 const Eigen::Ref<const Matrix3d> &A) {
79 return strain::metric_to_deformation_tensor<STRAIN_METRIC::EULER_ALMANSI>(A);
94 if (MODE == STRAIN_METRIC::GREEN_LAGRANGE) {
98 else if (MODE == STRAIN_METRIC::BIOT) {
102 else if (MODE == STRAIN_METRIC::HENCKY) {
106 else if (MODE == STRAIN_METRIC::EULER_ALMANSI) {
110 else if (MODE == STRAIN_METRIC::STRETCH) {
114 else if (MODE == STRAIN_METRIC::DISP_GRAD) {
117 std::cerr <<
"CRITICAL ERROR: In StrainConverter::strain_metric. "
118 "Unrecognized strain metric"
120 std::cerr <<
" Your only options are GREEN_LAGRANGE, BIOT, "
121 "HENCKY, EULER_ALMANSI,STRETCH and DISP_GRAD"
123 std::cerr <<
" Exiting..." << std::endl;
132 Eigen::Ref<const Matrix3d>
const &F)
const {
133 assert(
curr_metric_func &&
"StrainConverter object improperly initialized!");
141 Eigen::Ref<const Matrix3d>
const &E)
const {
143 "StrainConverter object improperly initialized!");
165 Eigen::Ref<const VectorXd>
const &_unrolled_E)
const {
178 Eigen::Ref<const Matrix3d>
const &F)
const {
184 Eigen::Ref<const VectorXd>
const &E)
const {
192 Eigen::Ref<const Matrix3d>
const &F,
204 Eigen::Ref<const Matrix3d>
const &F)
const {
213 if (mode_name ==
"STRAIN_GL" || mode_name ==
"GL") {
220 else if (mode_name ==
"STRAIN_B" || mode_name ==
"B") {
227 else if (mode_name ==
"STRAIN_H" || mode_name ==
"H") {
234 else if (mode_name ==
"STRAIN_EA" || mode_name ==
"EA") {
241 else if (mode_name ==
"STRAIN_U" || mode_name ==
"U") {
248 else if (mode_name ==
"STRAIN_F" || mode_name ==
"F") {
254 std::cerr <<
"CRITICAL ERROR: In StrainConverter::set_mode(). Unrecognized "
256 << mode_name <<
"'" << std::endl;
257 std::cerr <<
" Your only options are STRAIN_GL, STRAIN_B, "
258 "STRAIN_H, STRAIN_EA, STRAIN_U, and STRAIN_F"
260 std::cerr <<
" Exiting..." << std::endl;
272 for (
Index g = 0; g < pg.size(); g++) {
274 for (
Index i = 0; i < tvec.size(); i++) {
278 tmat = pg[g].matrix() * tmat * pg[g].matrix().transpose();
284 breathing.normalize();
287 bigmat.col(0) = breathing;
288 bigmat.rightCols(tvec.size()) =
irrep_trans_mat(strain_rep, pg).transpose();
290 Eigen::HouseholderQR<Eigen::MatrixXd> QR(bigmat);
306 m_sop_transf_mat << 1.0 / sqrt(3.0), 1.0 / sqrt(3.0), 1.0 / sqrt(3.0), 0, 0,
307 0, 1.0 / sqrt(2.0), -1.0 / sqrt(2.0), 0, 0, 0, 0, -1.0 / sqrt(6.0),
308 -1.0 / sqrt(6.0), 2.0 / sqrt(6.0), 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
309 1, 0, 0, 0, 0, 1, 0, 0;
343 for (
Index i = 0; i < 3; i++) {
344 for (
Index j = 0; j < 3; j++) {
SymGroupRepID add_representation(const SymGroupRep &new_rep) const
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.
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
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
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()
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...
const MasterSymGroup & master_group() const
SymGroupRep is an alternative representation of a SymGroup for something other than real space....
void set_rep(Index op_index, const SymOpRepresentation &new_rep)
Sets the representation of operation at entry 'op_index' of this group representation Throws if this ...
Generalized symmetry matrix representation for arbitrary dimension Can be used to describe applicatio...
IdentitySymRepBuilder Identity()
Eigen::Matrix3d right_stretch_tensor(const Eigen::Ref< const Eigen::Matrix3d > &deformation_tensor)
Calculates and returns the value of U where F = R*U.
Eigen::Matrix3d metric_tensor(const Eigen::Ref< const Eigen::Matrix3d > &deformation_tensor)
SymGroupRep coord_transformed_copy(SymGroupRep const &_rep, const Eigen::MatrixXd &trans_mat)
Make a copy of representation on vector space 'V' that is transformed into a representation on vector...
Eigen::MatrixXd irrep_trans_mat(SymGroupRep const &_rep, const SymGroup &head_group)
Finds the transformation matrix that block-diagonalizes this representation of head_group into irrep ...
INDEX_TYPE Index
For long integer indexing: