13 unsigned int var_index;
14 std::vector<double> semiaxes;
15 std::vector<double> ellipsoid_rotation;
16 std::vector<double> freeze_semiaxes;
17 double no_nucleation_border_thickness;
19 dealii::Tensor<2, dim, double> rotation_matrix;
22 std::vector<double> _semiaxes,
23 std::vector<double> _freeze_semiaxes,
24 std::vector<double> _ellipsoid_rotation,
26 double _no_nucleation_border_thickness)
27 : var_index(_var_index)
28 , semiaxes(std::move(_semiaxes))
29 , ellipsoid_rotation(std::move(_ellipsoid_rotation))
30 , freeze_semiaxes(std::move(_freeze_semiaxes))
31 , no_nucleation_border_thickness(_no_nucleation_border_thickness)
32 , hold_time(_hold_time)
34 set_rotation_matrix();
46 double degrees_to_rad = std::acos(0.0) / 90.0;
48 dealii::Tensor<2, dim, double> Rx;
49 dealii::Tensor<2, dim, double> Ry;
50 dealii::Tensor<2, dim, double> Rz;
53 Rx[1][1] = std::cos(ellipsoid_rotation.at(0) * degrees_to_rad);
55 Ry[0][0] = std::cos(ellipsoid_rotation.at(1) * degrees_to_rad);
58 Rz[0][0] = std::cos(ellipsoid_rotation.at(2) * degrees_to_rad);
59 Rz[1][0] = std::sin(ellipsoid_rotation.at(2) * degrees_to_rad);
60 Rz[0][1] = -std::sin(ellipsoid_rotation.at(2) * degrees_to_rad);
61 Rz[1][1] = std::cos(ellipsoid_rotation.at(2) * degrees_to_rad);
65 Rx[1][2] = -std::sin(ellipsoid_rotation.at(0) * degrees_to_rad);
66 Rx[2][1] = std::sin(ellipsoid_rotation.at(0) * degrees_to_rad);
67 Rx[2][2] = std::cos(ellipsoid_rotation.at(0) * degrees_to_rad);
69 Ry[0][2] = std::sin(ellipsoid_rotation.at(1) * degrees_to_rad);
70 Ry[2][0] = -std::sin(ellipsoid_rotation.at(1) * degrees_to_rad);
71 Ry[2][2] = std::cos(ellipsoid_rotation.at(1) * degrees_to_rad);
76 rotation_matrix = Rx * Ry * Rz;