21 using MatrixDimD = Eigen::Matrix<double, dim, dim>;
22 using VectorDimD = Eigen::Matrix<double, dim, 1>;
24 py::class_<BiCrystal> cls(m, (
"BiCrystal" + std::to_string(dim) +
"D").c_str());
25 cls.def(py::init<const Lattice&, const Lattice&, const bool&>(),
26 py::arg(
"A"), py::arg(
"B"), py::arg(
"useRLLL")=
false);
27 cls.def(
"A",[](
const BiCrystal& self) ->
const Lattice& {
29 }, py::return_value_policy::reference_internal);
30 cls.def(
"B",[](
const BiCrystal& self) ->
const Lattice& {
32 }, py::return_value_policy::reference_internal);
33 cls.def_readonly(
"sigma",&BiCrystal::sigma);
34 cls.def_readonly(
"csl",&BiCrystal::csl);
35 cls.def_readonly(
"dscl",&BiCrystal::dscl);
36 cls.def(
"box", [](
const BiCrystal& self,
37 std::vector<PyLatticeVector>& boxPyLatticeVectors,
38 const double& orthogonality,
39 const int& dsclFactor,
42 std::vector<LatticeVector> boxLatticeVectors;
43 for(
const auto& v : boxPyLatticeVectors)
44 boxLatticeVectors.push_back(v.lv);
45 auto latticeVectors= self.box(boxLatticeVectors,
51 std::vector<PyLatticeVector> pyLatticeVectors;
52 for(
const auto& v : latticeVectors)
54 return pyLatticeVectors;
55 }, py::arg(
"boxVectors"), py::arg(
"orthogonality"), py::arg(
"dsclFactor"), py::arg(
"filename")=
"", py::arg(
"orient")=
false);
56 cls.def(
"getLatticeDirectionInC",[](
const BiCrystal& self,
const PyLatticeVector& v){