1 #define BOOST_TEST_DYN_LINK
2 #include <boost/test/unit_test.hpp>
16 BOOST_AUTO_TEST_SUITE(ConfigurationTest)
25 Eigen::Vector3d a, b, c;
31 BOOST_CHECK_EQUAL(config.
size(), 1);
45 for(
int i = 0; i < 3; ++i) {
47 BOOST_CHECK_EQUAL(config.
occ(0), i);
63 for(
int i = 0; i < 3; ++i) {
64 Eigen::Vector3d d = Eigen::Vector3d::Zero();
93 Eigen::Vector3d a, b, c;
99 BOOST_CHECK_EQUAL(config.
size(), 2);
113 BOOST_CHECK_EQUAL(filled, check);
125 BOOST_CHECK_EQUAL(filled, check);
138 BOOST_CHECK_EQUAL(filled, check);
143 Eigen::Vector3d dzero(0., 0., 0.);
144 Eigen::Vector3d dx(0.001, 0., 0.);
145 Eigen::Vector3d dy(0., 0.001, 0.);
146 Eigen::Vector3d dz(0., 0., 0.001);
163 BOOST_CHECK_EQUAL(filled, check);
178 BOOST_CHECK_EQUAL(filled, check);
192 BOOST_CHECK_EQUAL(filled, check);
197 BOOST_AUTO_TEST_SUITE_END()
void clear_deformation()
Clear applied strain.
void clear_displacement()
Clear displacement.
Configuration fill_supercell(Supercell &scel, const SymOp &op) const
Fills supercell 'scel' with reoriented configuration, as if by apply(op,*this)
const_displacement_t disp(Index site_l) const
Occupant displacement.
void init_occupation()
Set occupant variables to background structure.
const int & occ(Index site_l) const
Occupant variable on site l.
void set_deformation(const Eigen::Matrix3d &_deformation)
Set applied strain.
void set_displacement(const displacement_matrix_t &_disp)
Set occupant displacements.
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.
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
bool has_occupation() const
True if Configuration has occupation DoF.
BOOST_AUTO_TEST_CASE(Test1)
void set_occupation(const Array< int > &newoccupation)
Set occupant variables.
bool has_deformation() const
True if Configuration has strain DoF.
void clear_occupation()
Clear occupation.
const SymGroup & factor_group() const
PrimClex is the top-level data structure for a CASM project.
Index size() const
Returns number of sites, NOT the number of primitives that fit in here.
std::tuple< LatVec, LatVec, LatVec > vectors()
bool check(std::string test, const jsonParser &expected, const jsonParser &calculated, fs::path test_cases_path, bool quiet, double tol=0.0)
Check expected JSON vs calculated JSON using BOOST_CHECK_EQUAL.
void set_occ(Index site_l, int val)
Set occupant variable on site l.
ConfigDoF::displacement_matrix_t displacement_matrix_t
Supercell & get_supercell() const
Get the Supercell for this Configuration.
void init_displacement()
Set all occupant displacements to (0.,0.,0.)
bool has_displacement() const
True if Configuration has displacement DoF.
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()