1 #define BOOST_TEST_DYN_LINK
2 #include <boost/test/unit_test.hpp>
14 BOOST_AUTO_TEST_SUITE(ConfigEnumInterpolationTest)
24 Eigen::Vector3d a, b, c;
34 Eigen::Vector3d zero(0., 0., 0.);
35 Eigen::Vector3d dx(0.001, 0., 0.);
36 Eigen::Vector3d dy(0., 0.001, 0.);
37 Eigen::Vector3d dz(0., 0., 0.001);
39 dF << 0.01, 0.01, 0.0,
46 c_final.set_disp(1, dy);
47 c_final.set_deformation(I + dF);
52 for(
const auto &tconfig : e) {
54 double f = (1.*i) / (e.size() - 1);
57 BOOST_CHECK_EQUAL(
almost_equal(tconfig.deformation(), I + dF * f,
tol),
true);
63 BOOST_AUTO_TEST_SUITE_END()
void set_disp(Index site_l, const Eigen::VectorXd &_disp)
Set occupant displacements.
const Lattice & lattice() const
Represents a supercell of the primitive parent crystal structure.
double crystallography_tol() const
EigenIndex Index
For long integer indexing:
BOOST_AUTO_TEST_CASE(Test1)
PrimClex is the top-level data structure for a CASM project.
std::tuple< LatVec, LatVec, LatVec > vectors()
void init_displacement()
Set all occupant displacements to (0.,0.,0.)
virtual void check_init()
Check project initialization.
bool almost_equal(const GenericCluster< CoordType > &LHS, const GenericCluster< CoordType > &RHS, double tol)
A Configuration represents the values of all degrees of freedom in a Supercell.
const Structure & get_prim() const
const Access to primitive Structure
void init_deformation()
Set applied strain to Eigen::Matrix3d::Zero()