public static void setUpRiemannSymmetries() { Tensors.addSymmetry("R_lm", IndexType.LatinLower, false, new int[]{1, 0}); Tensors.addSymmetry("R_lmab", IndexType.LatinLower, true, new int[]{0, 1, 3, 2}); Tensors.addSymmetry("R_lmab", IndexType.LatinLower, false, new int[]{2, 3, 0, 1}); } }
/** * Attaches antisymmetry to simple tensor with respect to indices of specified type. * * @param tensor simple tensor * @param permutation permutation * @param type type of indices * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if specified permutation is inconsistent with one-line notation * @throws java.lang.IllegalArgumentException if order of specified permutation is odd * @throws java.lang.IllegalArgumentException if degree of specified permutation differs from the size of indices * of specified type */ public static void addAntiSymmetry(SimpleTensor tensor, IndexType type, int... permutation) { addSymmetry(tensor, type, true, permutation); }
/** * Attaches symmetry to simple tensor with respect to indices of specified type. * * @param tensor string representation of simple tensor * @param permutation permutation * @param type type of indices * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if specified permutation is inconsistent with one-line notation * @throws java.lang.IllegalArgumentException if degree of specified permutation differs from the size of indices * of specified type */ public static void addSymmetry(String tensor, IndexType type, int... permutation) { addSymmetry(tensor, type, false, permutation); }
/** * Attaches symmetry to simple tensor with respect to indices of specified type. * * @param tensor simple tensor * @param permutation permutation * @param type type of indices * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if specified permutation is inconsistent with one-line notation * @throws java.lang.IllegalArgumentException if degree of specified permutation differs from the size of indices * of specified type */ public static void addSymmetry(SimpleTensor tensor, IndexType type, int... permutation) { addSymmetry(tensor, type, false, permutation); }
/** * Attaches antisymmetry to simple tensor with respect to indices of specified type. * * @param tensor string representation of simple tensor * @param permutation permutation * @param type type of indices * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if specified permutation is inconsistent with one-line notation * @throws java.lang.IllegalArgumentException if order of specified permutation is odd * @throws java.lang.IllegalArgumentException if degree of specified permutation differs from the size of indices * of specified type */ public static void addAntiSymmetry(String tensor, IndexType type, int... permutation) { addSymmetry(tensor, type, true, permutation); }
/** * Attaches symmetry to simple tensor. * * @param tensor string representation of simple tensor * @param permutation permutation * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if degree of specified permutation differs from the size of indices * of specified tensor */ public static void addSymmetry(String tensor, Permutation permutation) { addSymmetry(parseSimple(tensor), permutation); }
/** * Attaches symmetry to simple tensor with respect to indices of specified type. * * @param tensor string representation of simple tensor * @param type type of indices * @param permutation permutation * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if degree of permutation differs from the size of indices * of specified type */ public static void addSymmetry(String tensor, IndexType type, Permutation permutation) { addSymmetry(parseSimple(tensor), type, permutation); }
/** * Makes simple tensor antisymmetric with respect to indices of specified type. * * @param tensor simple tensor * @param type type of indices * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) */ public static void setAntiSymmetric(SimpleTensor tensor, IndexType type) { int dimension = tensor.getIndices().size(type); addSymmetry(tensor, type, true, Permutations.createTransposition(dimension)); if (dimension > 2) tensor.getIndices().getSymmetries().addSymmetry(type.getType(), Permutations.createPermutation(dimension % 2 == 0 ? true : false, Permutations.createCycle(dimension))); }
Tensors.addSymmetry("R_lmab", IndexType.LatinLower, true, new int[]{0, 1, 3, 2}); Tensors.addSymmetry("R_lmab", IndexType.LatinLower, false, new int[]{2, 3, 0, 1}); Tensors.addSymmetry("R_lm", IndexType.LatinLower, false, new int[]{1, 0}); if (((SimpleTensor) F.get(0)).getIndices().getSymmetries().availableForModification()) //<= this is ok. Tensors.addSymmetry((SimpleTensor) F.get(0), IndexType.LatinLower, true, symmetry); this.F = F;
Tensors.addSymmetry("P_lm", IndexType.LatinLower, false, 1, 0);