57 std::cerr <<
"CRITICAL ERROR: Size mismatch in SiteCluster::add_trans_nlist().\n"
96 std::vector<BasisSet const *>
const &global_args,
97 Index max_poly_order) {
103 max_poly_order =
size();
107 for(
BasisSet const *global_ptr : global_args) {
113 all_local.
reserve(local_args.size());
116 for(
Index d = 0; d < local_args.size(); d++) {
117 assert(local_args[d].
size() ==
size() &&
"In SiteCluster::generate_clust_basis(), local_args must have same size as cluster.");
120 std::vector<BasisSet> tlocal;
121 tlocal.reserve(local_args[d].
size());
122 std::vector<BasisSet const *> site_args(
size(),
nullptr);
124 for(
Index i = 0; i < local_args[d].size(); i++) {
125 if(local_args[d][i]) {
126 tlocal.push_back(*local_args[d][i]);
128 site_args[i] = &tlocal.back();
132 if(all_local.
back().size())
161 for(
Index i = 0; i < this->
size(); i++) {
167 if(decor_map.
size() != 0) {
168 std::cerr <<
"WARNING in SiteCluster::get_decor_map" << std::endl;
169 std::cerr <<
"You requested populating your decor_map, but it isn't empty.";
170 std::cerr <<
" your current map is about to be obliterated." << std::endl;
175 bool new_decoration =
true;
178 new_decoration =
false;
215 for(
Index i = 0; i < this->
size(); i++) {
222 bool new_decoration =
true;
226 new_decoration =
false;
257 if(dmap[0].
size() != this->
size()) {
258 std::cerr <<
"ERROR in SiteCluster::get_decorations" << std::endl;
259 std::cerr <<
"The provided map is for a cluster of the wrong size!" << std::endl;
264 for(
Index i = 0; i < dmap.size(); i++) {
331 stream << std::string(space,
' ');
333 stream.setf(std::ios::showpoint, std::ios_base::fixed);
342 <<
" Basis Functions:\n";
345 for(
Index i = 0; i < tbasis.
size(); i++) {
346 stream <<
" \\Phi_" << begin_ind + i <<
" = " << tbasis[i]->tex_formula() << std::endl;
429 namespace SiteCluster_impl {
435 for(
BasisSet const *site_bset_ptr : site_dof_sets) {
437 result.
append(*site_bset_ptr);
439 site_bset_ptr->basis_symrep_ID()).rep_ptr());
Index size() const
Size of the associate SymGroup.
bool contains(const T &test_elem) const
void from_json(ClexDescription &desc, const jsonParser &json)
A Counter allows looping over many incrementing variables in one loop.
SiteCluster & apply_sym(const SymOp &op)
jsonParser & to_json(jsonParser &json) const
Write GenericCluster to json. Does not write lattice.
void push_back(const T &toPush)
void push_back(const CoordType &new_coord)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
const Array< Index > & perm_array() const
const SymGroupRep::RemoteHandle & permute_rep() const
void generate_clust_basis(multivector< BasisSet const * >::X< 2 > const &local_args, std::vector< BasisSet const * > const &global_args, Index max_poly_order=-1)
void construct_invariant_polynomials(const Array< BasisSet const * > &tsubs, const SymGroup &head_sym_group, Index order, Index min_dof_order=1)
void from_json(const jsonParser &json)
ReturnArray< Array< int > > get_full_decor_map() const
void print_clust_basis(std::ostream &stream, Index begin_ind=0, int space=18, char delim=0, COORD_TYPE mode=COORD_DEFAULT) const
void push_back(const Site &new_site)
const SymGroup & clust_group() const
SiteCluster(const Lattice &init_home)
void from_json(const jsonParser &json)
Array< Array< Index > > m_trans_nlist_inds
GenericCluster & permute(const Array< Index > &perm)
permute sites of the cluster, and everything that depends on the site order
ReturnArray< int > get_occ_array(const Array< int > &bitstring) const
Extracts bits in bitstring corresponding to the cluster and returns them as an array.
void append(const BasisSet &RHS)
void print(std::ostream &stream) const
jsonParser & to_json(jsonParser &json) const
COORD_MODE specifies the current coordinate mode (Fractional or Cartesian)
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
BasisSet operator*(const SymOp &LHS, const BasisSet &RHS)
Index nlist_ind() const
access m_nlist_ind
GenericCluster & apply_sym_no_trans(const SymOp &op)
apply symmetry to all points of the cluster without translation
SiteCluster & permute(const Array< Index > &iperm)
void decorate(const Array< int > decor)
EigenIndex Index
For long integer indexing:
bool accept(const FunctionVisitor &visitor)
void set_basis_symrep_ID(SymGroupRepID new_ID)
const Array< Array< Index > > & trans_nlists() const
Access and assign trans_nlists.
SymGroupRep const * rep_ptr() const
SymGroupRepID add_copy_to_master() const
Adds copy of this representation its home_group.
const Array< Index > & trans_nlist(Index i) const
void set_nlist_ind(Index)
set m_nlist_ind of Site and its DoFs
ReturnArray< SiteCluster > get_decorations(const Array< Array< int > > &dmap) const
SiteCluster & apply_sym_no_trans(const SymOp &op)
Index basis_ind() const
Access basis Index.
void reserve(Index new_max)
GenericCluster & apply_sym(const SymOp &op)
apply symmetry to all points of the cluster
SymGroupRep permuted_direct_sum_rep(const SymGroupRep &permute_rep, const Array< SymGroupRep const * > &sum_reps)
BasisSet & apply_sym(const SymOp &op, int dependency_layer=1)
void set_nlist_inds(const Array< Index > &new_indices)
void set_dof_IDs(const Array< Index > &new_IDs)
BasisSet construct_clust_dof_basis(SiteCluster const &_clust, std::vector< BasisSet const * > const &site_dof_sets)
ReturnArray< Array< int > > get_decor_map() const
void add_trans_nlist(const Array< Index > &new_nlist)
ReturnArray< Index > nlist_inds() const
Easily collect the current nlist_inds of the cluster's sites.
Shortcut for multidimensional vector (std::vector< std::vector< ...)
static SymGroupRepID identity(Index dim)
Static function to construct an ID for identity representations.
bool valid_index(Index i)
static COORD_TYPE CHECK()
get the current mode (call using COORD_MODE::CHECK())