public SpinorsSimplifyOptions(String u, String v, String uBar, String vBar, String momentum, String mass) { this.u = u == null ? null : parseSimple(u); this.v = v == null ? null : parseSimple(v); this.uBar = uBar == null ? null : parseSimple(uBar); this.vBar = vBar == null ? null : parseSimple(vBar); this.momentum = parseSimple(momentum); this.mass = parseSimple(mass); } }
/** * Makes simple tensor antisymmetric. * * @param tensor string representation of simple tensor * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) */ public static void setAntiSymmetric(String tensor) { setAntiSymmetric(parseSimple(tensor)); }
/** * Makes simple tensor symmetric. * * @param tensor string representation of simple tensor * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) */ public static void setSymmetric(String tensor) { setSymmetric(parseSimple(tensor)); }
/** * 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 symmetris to simple tensor. * * @param tensor string representation of simple tensor * @param permutations permutations * @throws java.lang.IllegalStateException if this tensor is already in use (it's permutation group calculated) * @throws java.lang.IllegalArgumentException if degree of some permutation differs from the size of indices * of specified tensor */ public static void addSymmetries(String tensor, Permutation... permutations) { addSymmetries(parseSimple(tensor), permutations); }
/** * 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); }
/** * 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 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 tensor */ public static void addSymmetry(String tensor, int... permutation) { parseSimple(tensor).getIndices().getSymmetries().addSymmetry(permutation); }
/** * Attaches antisymmetry 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 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 tensor */ public static void addAntiSymmetry(String tensor, int... permutation) { parseSimple(tensor).getIndices().getSymmetries().addAntiSymmetry(permutation); }
/** * Attaches symmetry to simple tensor with respect to indices of specified type. * * @param tensor string representation of simple tensor * @param permutation permutation * @param sign {@code true} for antisymmetry, {@code false} for symmetry * @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 and sign is {@code true} * @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, boolean sign, int... permutation) { parseSimple(tensor).getIndices().getSymmetries().add(type.getType(), sign, permutation); }
if (Tensors.parseSimple("R_lmab").getIndices().getSymmetries().availableForModification()) { 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}); if (Tensors.parseSimple("R_lm").getIndices().getSymmetries().availableForModification()) Tensors.addSymmetry("R_lm", IndexType.LatinLower, false, new int[]{1, 0}); Tensor temp; String covariantIndicesString; Transformation n2 = new SqrSubs(Tensors.parseSimple("n_l")), n2Transformer = new Transformer(TraverseState.Leaving, new Transformation[]{n2}); Transformation[] transformations = ArraysUtils.addAll(new Transformation[]{EliminateMetricsTransformation.ELIMINATE_METRICS, n2Transformer}, riemannBackground); for (i = 0; i < actualHatQuantities; ++i) {
Transformation n2 = new SqrSubs(Tensors.parseSimple("n_l")), n2Transformer = new Transformer(TraverseState.Leaving, new Transformation[]{n2}); Transformation[] common = new Transformation[]{EliminateMetricsTransformation.ELIMINATE_METRICS, n2Transformer, kronecker}; Transformation[] all = ArraysUtils.addAll(common, riemansSubstitutions); temp = new Averaging(Tensors.parseSimple("n_l")).transform(temp);