return parent.getDerivative(resOrder);
}
private void initializeSymmetries() {
StructureOfIndices baseStructure = structuresOfIndices[0];
StructureOfIndices[] partition = new StructureOfIndices[1 + ArraysUtils.sum(orders)];
partition[0] = parent.structuresOfIndices[0];
int i, j, k = 0;
for (i = 0; i < orders.length; ++i)
for (j = 0; j < orders[i]; ++j)
partition[++k] = structuresOfIndices[i + 1].getInverted();
int[][] mapping = baseStructure.getPartitionMappings(partition);
//adding field symmetries
for (Permutation p : parent.symmetries.getGenerators())
symmetries.addSymmetry(convertPermutation(p, mapping[0], baseStructure.size()));
//adding block symmetries of derivatives
IntArrayList aggregator = new IntArrayList();
j = 1;
int cycle[];
for (i = 0; i < orders.length; ++i) {
if (structuresOfIndices[i + 1].size() != 0 && orders[i] >= 2) {
//adding symmetries for indices from each slot
cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), 2);
aggregator.addAll(mapping[j]);
aggregator.addAll(mapping[j + 1]);
symmetries.addSymmetry(
Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));
if (orders[i] >= 3) {
for (k = 2; k < orders[i]; ++k)
aggregator.addAll(mapping[j + k]);
cycle = Permutations.createBlockCycle(structuresOfIndices[i + 1].size(), orders[i]);
symmetries.addSymmetry(
Permutations.createPermutation(convertPermutation(cycle, aggregator.toArray(), baseStructure.size())));
}
aggregator.clear();
}
j += orders[i];
}