28 #pragma GCC diagnostic push 29 #pragma GCC diagnostic ignored "-Wunused-variable" 30 #include <randutils.hpp> 31 #pragma GCC diagnostic pop 65 const Eigen::Ref<const Eigen::Vector3i>& _normal,
66 const Eigen::Ref<const Eigen::ArrayXd>& _profile)
67 : normal(_normal), profile(_profile), nlayers(_profile.size()),
68 average(_profile.sum() / profile.size()),
71 if (struct1.is_alloy() || struct2.is_alloy())
73 "out of virtual crystals");
75 if (_profile.size() == 0)
78 if ((_profile.minCoeff() < 0.) || (_profile.minCoeff() > 1.))
82 if (_profile.minCoeff() == _profile.maxCoeff())
84 this->fill_factors(struct1, struct2);
94 const boost::mpi::communicator& comm,
95 double scalebroad = 1.0)
const;
109 randutils::mt19937_rng& rng,
110 const boost::mpi::communicator& comm,
111 std::size_t nqline)
const;
116 Eigen::MatrixXd gfactors;
118 Eigen::VectorXd vfactors;
Definition: analytic1d.hpp:26
Superlattice_structure(const Crystal_structure &struct1, const Crystal_structure &struct2, const Eigen::Ref< const Eigen::Vector3i > &_normal, const Eigen::Ref< const Eigen::ArrayXd > &_profile)
Basic constructor.
Definition: superlattices.hpp:63
std::unique_ptr< Crystal_structure > vc_mix_structures(const std::vector< Crystal_structure > &components, const std::vector< double > &ratios)
Create an average structure out of several Crystal_structure objects containing the same atomic sites...
Definition: vc.cpp:24
Exception related to the parameters passed to a function.
Definition: exceptions.hpp:33
const std::size_t nlayers
Number of layers.
Definition: superlattices.hpp:47
Code related to the dynamical matrix.
Factory of Dynamical_matrix objects.
Definition: dynamical_matrix.hpp:108
Eigen::ArrayXXd calc_w0_barriers(const alma::Gamma_grid &grid, const Dynamical_matrix_builder &factory, randutils::mt19937_rng &rng, const boost::mpi::communicator &comm, std::size_t nqline) const
Compute the contribution to scattering from the supercell barriers.
Definition: superlattices.cpp:83
Definitions of the basic data-handling classes in ALMA.
const Eigen::Vector3i normal
Direction normal to the superlattice layers in the crystal structure.
Definition: superlattices.hpp:43
Objects of this class represent a regular grid with the Gamma point in one corner.
Definition: qpoint_grid.hpp:32
Hold information about a crystal structure.
Definition: structures.hpp:51
const Eigen::ArrayXd profile
Fraction of the second component in each layer.
Definition: superlattices.hpp:45
Eigen::ArrayXXd calc_w0_medium(const alma::Gamma_grid &grid, const boost::mpi::communicator &comm, double scalebroad=1.0) const
Compute the contribution to scattering from disorder in the effective medium.
Definition: superlattices.cpp:61
const std::unique_ptr< Crystal_structure > vc_struct
Structural description of the average virtual crystal.
Definition: superlattices.hpp:52
const double average
Average fraction of the second component in the superlattice.
Definition: superlattices.hpp:50
Code related to the virtual crystal approximation for alloys and isotopic mixtures.
POD class containing the information about a binary superlattice.
Definition: superlattices.hpp:39