|
| DynamicSGroup () |
|
| DynamicSGroup (const DynamicSGroup &o) |
|
| DynamicSGroup (DynamicSGroup &&o) |
|
DynamicSGroup & | operator= (const DynamicSGroup &o) |
|
DynamicSGroup & | operator= (DynamicSGroup &&o) |
|
void | add (int one, int two, int flags=0) |
|
template<typename Gen_ > |
void | add (Gen_) |
|
void | addSymmetry (int one, int two) |
|
void | addAntiSymmetry (int one, int two) |
|
void | addHermiticity (int one, int two) |
|
void | addAntiHermiticity (int one, int two) |
|
template<typename Op , typename RV , typename Index , std::size_t N, typename... Args> |
RV | apply (const std::array< Index, N > &idx, RV initial, Args &&... args) const |
|
template<typename Op , typename RV , typename Index , typename... Args> |
RV | apply (const std::vector< Index > &idx, RV initial, Args &&... args) const |
|
int | globalFlags () const |
|
std::size_t | size () const |
|
template<typename Tensor_ , typename... IndexTypes> |
internal::tensor_symmetry_value_setter< Tensor_, DynamicSGroup > | operator() (Tensor_ &tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const |
|
template<typename Tensor_ > |
internal::tensor_symmetry_value_setter< Tensor_, DynamicSGroup > | operator() (Tensor_ &tensor, std::array< typename Tensor_::Index, Tensor_::NumIndices > const &indices) const |
|
|
template<typename Index , std::size_t N, int... n> |
std::array< Index, N > | h_permute (std::size_t which, const std::array< Index, N > &idx, internal::numeric_list< int, n... >) const |
|
template<typename Index > |
std::vector< Index > | h_permute (std::size_t which, std::vector< Index > idx) const |
|
GroupElement | ge (Generator const &g) const |
|
GroupElement | mul (GroupElement, GroupElement) const |
|
GroupElement | mul (Generator g1, GroupElement g2) const |
|
GroupElement | mul (GroupElement g1, Generator g2) const |
|
GroupElement | mul (Generator g1, Generator g2) const |
|
int | findElement (GroupElement e) const |
|
void | updateGlobalFlags (int flagDiffOfSameGenerator) |
|
Dynamic symmetry group.
The DynamicSGroup class represents a symmetry group that need not be known at compile time. It is useful if one wants to support arbitrary run-time defineable symmetries for tensors, but it is also instantiated if a symmetry group is defined at compile time that would be either too large for the compiler to reasonably generate (using templates to calculate this at compile time is very inefficient) or that the compiler could generate the group but that it wouldn't make sense to unroll the loop for setting coefficients anymore.
void Eigen::DynamicSGroup::add |
( |
int |
one, |
|
|
int |
two, |
|
|
int |
flags = 0 |
|
) |
| |
|
inline |
211 std::size_t newNumIndices = (one > two) ? one : two + 1;
213 gelem.representation.reserve(newNumIndices);
214 for (std::size_t
i =
m_numIndices;
i < newNumIndices;
i++) gelem.representation.push_back(
i);
219 Generator g{one, two, flags};
220 GroupElement
e =
ge(g);
247 std::size_t coset_rep = coset_order;
260 coset_rep += coset_order;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define eigen_assert(x)
Definition: Macros.h:910
float * p
Definition: Tutorial_Map_using.cpp:9
void updateGlobalFlags(int flagDiffOfSameGenerator)
Definition: DynamicSymmetry.h:264
GroupElement mul(GroupElement, GroupElement) const
Definition: DynamicSymmetry.h:190
int findElement(GroupElement e) const
Definition: DynamicSymmetry.h:154
References e(), eigen_assert, findElement(), ge(), i, m_elements, m_generators, m_numIndices, mul(), p, and updateGlobalFlags().
Referenced by add(), Eigen::DynamicSGroupFromTemplateArgs< Gen >::add_all(), addAntiHermiticity(), addAntiSymmetry(), addHermiticity(), addSymmetry(), and test_symgroups_dynamic().
template<typename Op , typename RV , typename Index , std::size_t N, typename... Args>
RV Eigen::DynamicSGroup::apply |
( |
const std::array< Index, N > & |
idx, |
|
|
RV |
initial, |
|
|
Args &&... |
args |
|
) |
| const |
|
inline |
61 "Can only apply symmetry group to objects that have at least the required amount of indices.");
62 for (std::size_t
i = 0;
i <
size();
i++)
64 initial, std::forward<Args>(
args)...);
std::array< Index, N > h_permute(std::size_t which, const std::array< Index, N > &idx, internal::numeric_list< int, n... >) const
Definition: DynamicSymmetry.h:118
std::size_t size() const
Definition: DynamicSymmetry.h:78
@ N
Definition: constructor.cpp:22
args
Definition: compute_granudrum_aor.py:143
type
Definition: compute_granudrum_aor.py:141
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317
References compute_granudrum_aor::args, eigen_assert, h_permute(), i, m_elements, m_numIndices, N, run(), and size().
Referenced by test_symgroups_dynamic().