jose
  • Member for 8 years, 2 months
  • Last seen this week
  • Champaign, IL, United States
Dealing with covariant derivatives (xCoba)
Accepted answer
2 votes

You have a product of a Basis[-c, {1, B}], for some basis B, and a CTensor[comps, {B}][c] object. You can use ContractBasis to force the contraction of a Basis[...] object with anything. Or you can ...

View answer
Format data consistently with Around
2 votes

The different typesetting forms of Around are controlled via internal thresholds. The 0.123456(78) notation is only appropriate for cases in which the uncertainty is smaller than the (absolute value ...

View answer
Creating 15x15 matrix out of two 6x6 matrices (by antisymmetrization)
2 votes

I'm not sure I'm interpreting correctly the question, but here is what I would do. This is for an arbitrary matrix $\Lambda$. First, construct the tensor product of the $\Lambda$ matrix and the $\...

View answer
Fourth Order Tensor rotation
2 votes

There are multiple ways of implementing something like this, and the comments above give you good suggestions. Let me suggest another simple method, which is valid for arrays of any depth, not just 4. ...

View answer
How to compute functional derivative against vector in xAct, xTensor or xTras?
2 votes

In my opinion it only makes sense to take variational derivatives of scalar actions, that is, of the integral of a scalar Lagrangian times a volume form. Hence, xTensor complains if you try to ...

View answer
How to work with Levi civita tensor in xAxt?
2 votes

The LeviCivitaTensor symbol is a WL function that returns an array of 0's, 1's and -1's. It is not a xTensor function. The Levi-Civita tensor is called epsilon in xTensor, and there is one for each ...

View answer
Why does the TimeObject seem to lose precision? (+ note on units)
2 votes

The problem here is the combination of a) the definitions for t1 and t2 give the seconds as machine precision numbers, and b) the internal computations are performed in AbsoluteTime form (i.e. number ...

View answer
xAct xCoba: Geodesic Equation in Components
2 votes

Rather than starting with the "vector of coordinates", which is not really a vector, it is better to start with the velocity components, which do form a vector. Define the same structures you had: &...

View answer
How to apply Partial differentiation w.r.t. tensors?
2 votes

Try something like this: << xAct`xTensor` DefManifold[M, 4, {i, j, k, l}] DefTensor[b[i], M] DefTensor[c[i], M] Then define a[i_] := 2 b[i] + 3 c[i] Finally you can compute VarD[c[j]][a[i]...

View answer
Explicitly construct tensor quantities with given symmetries
Accepted answer
2 votes

There are multiple ways in which this could be done in xAct, and perhaps there is even a function to do something like this in one of the xAct packages SymManipulator or xTras (you could ask in the ...

View answer
Generating different GeoPaths for multiple equivalent segments
Accepted answer
2 votes

A completely different answer, this time ignoring Geo methods and focusing on Graph connectivity: just place the Graph object on the map. Take your entity pairs: ents = { {Entity["Country", "...

View answer
Unable to simplify tensor expressions with xAct
Accepted answer
2 votes

An expression like p[a, -a]^2 is strictly incorrect in xTensor, because in WL this is p[a, -a]*p[a, -a], which has repeated indices. The way to avoid this problem is to hide internal scalar indices ...

View answer
How to determine computationally the set of linear independent permutations of a tensor with known symmetries?
Accepted answer
2 votes

What you call the "linear independent permutations" are the permutations that do not belong to the symmetry group of the tensor. Hence a possible way to compute them is by finding the complement of ...

View answer
GeoGridLines behind Continents in GeoGraphics Plot?
2 votes

What about something like this? I think that if the countries have to be semi-transparent, so that some of them are highlighted, then that semi-transparency will let the geo grid lines be visible... ...

View answer
Geographic coordinate transformation to British National Grid
2 votes

You need the datum "OGB7" and the projection proj = {"TransverseMercator", "Centering" -> {49., -2.}, "GridOrigin" -> {400000, -100000}, "CentralScaleFactor" -> 0.9996012717, "ReferenceModel"...

View answer
How to take derivative of a tensor leading to kronecker delta?
Accepted answer
2 votes

For instance: varD[f1_ f2_, x_] := varD[f1, x] f2 + f1 varD[f2, x]; varD[f1_ + f2_, x_] := varD[f1, x] + varD[f2, x]; varD[c_?NumericQ, x_] := 0; varD[delta[a_, b_], x_] := 0; varD[S[a_, b_], S[c_, ...

View answer
Evaluating covariant derivative terms of a scalar function (xAct, xTras)
Accepted answer
1 votes

I'd recommend to do the following. Keep this part of your code: << xAct`xTras` ddim = 4; coords = {\[Tau][], r[], \[Theta][], \[Phi][]}; DefManifold[M4, ddim, {\[Alpha], \[Beta], \[Gamma], \[...

View answer
Neglecting higher order derivatives terms in xAct
Accepted answer
1 votes

Does something like this work? expr /. cd[_][cd[_][phi[]]] -> 0 for your covariant derivative cd and scalar field phi. This will remove second-order derivatives, but third-order and higher-order ...

View answer
Converting tensorial expressions in xAcT to LaTeX
Accepted answer
1 votes

xAct contains a full package dedicated to converting tensor expressions into LaTeX, called TexAct, and I'd recommend using that instead of the general TeXForm. For example, in your case: << xAct`...

View answer
Is it possible to defining a scalar with CTensor?
Accepted answer
1 votes

You do not really need CTensor for this. You need to replace \[Phi][] by \[Phi]0[r[]]. There are multiple ways to implement that replacement/assignment. If you want to use CTensor, then you need the ...

View answer
How to set up symplectic geometry without(!) metric (with xAct/xTensor)?
1 votes

I think you should define the tensor Omega[-a, -b] and its inverse, say iOmega[a, b], as separate antisymmetric tensors, and use them systematically with those index configurations. Because there is ...

View answer
How to define commutative covariant derivatives in xTensor
Accepted answer
1 votes

Covariant derivatives with upper indices do not make sense before introducing a metric. So this works: In[7]:= CD[-c]@CD[-b]@T[a] - CD[-b]@CD[-c]@T[a] // Simplification Out[7]= 0 Instead of ...

View answer
Generate all dihedral transformations of a matrix?
1 votes

The action on the four corners of the matrix defines the group, so we are talking about DihedralGroup[4], which has 8 elements. We can construct those 8 matrices combining Transpose and Reverse: ...

View answer
solving a system of polynomial functions with arbitrary length
1 votes

I'd suggest to write the system as follows. Suppose that you have l matrices of dimensions {d, d}. Then your array T will have dimensions {l, d, d}. The list X of unknowns will have length d, and the ...

View answer
1 2
3