Skip to content

Commit

Permalink
Minor change of treatment of constraint for hexagonal systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
ttadano committed May 24, 2018
1 parent 640a237 commit abb39ca
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions alm/constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,22 @@ void Constraint::setup()
nparam = fcs->nequiv[order].size();
memory->allocate(arr_tmp, nparam);

if (const_symmetry[order].size() > 0) {
for (it_const = const_symmetry[order].begin();
it_const != const_symmetry[order].end(); ++it_const) {
for (i = 0; i < nparam; ++i) arr_tmp[i] = (*it_const).w_const[i];
const_self[order].push_back(ConstraintClass(nparam, arr_tmp));
}
// remove_redundant_rows(nparam, const_self[order], eps8);
}


for (it_const = const_translation[order].begin();
it_const != const_translation[order].end(); ++it_const) {
for (i = 0; i < nparam; ++i) arr_tmp[i] = (*it_const).w_const[i];
const_self[order].push_back(ConstraintClass(nparam, arr_tmp));
}
remove_redundant_rows(nparam, const_self[order], eps8);

if (const_rotation_self[order].size() > 0) {
for (it_const = const_rotation_self[order].begin();
Expand All @@ -211,6 +222,7 @@ void Constraint::setup()
remove_redundant_rows(nparam, const_self[order], eps8);
}

/*
if (const_symmetry[order].size() > 0) {
for (it_const = const_symmetry[order].begin();
it_const != const_symmetry[order].end(); ++it_const) {
Expand All @@ -219,6 +231,7 @@ void Constraint::setup()
}
remove_redundant_rows(nparam, const_self[order], eps8);
}
*/

memory->deallocate(arr_tmp);
const_translation[order].clear();
Expand Down

0 comments on commit abb39ca

Please sign in to comment.