Hi,
> Let's say I define a vector u,
>
>
> DefTensor[u[-a],M]
>
>
> and then I go and identify it with the Hubble flow, in the coordinate
> basis,
>
>
> ComponentValue[ComponentArray[u,{-B}],{-A[t[]],0,0,0}]
>
>
> This works just fine, if I ask for TensorValues[u] it has made the
> proper indentifications.
>
>
> But then if I go and ask for
>
>
> ComponentArray[u[{a,B}]] // ToValues
>
>
> it doesn't know what those values are. It wasn't able to invert the
> vector with metric. Maybe the problem is that I have circumvented
> bases (cartesian or polar) and have gone straight to Chart with
> coordinates t[],x[],y[],z[]. Also I hope with this simple application
> I'm not defeating the purpose of xAct all together.
>
If you give values to the components of u with the indices downstairs
then the components with the indices upstairs are not computed
automatically, despite having used MetricCompute to compute the
components of the metric and its inverse. You have to compute the
components with the indices upstairs separately. There are a number of
different ways of doing this, my favorite one is by means of MakeRule.
Here is the code adapted to your situation (g = metric tensor):
In:=
u[a]==(u[a]/.MakeRule[{u[-a],u[-a]},MetricOn->All,ContractMetrics->False])
Out= u[a]==g[a,b]u[-b]
In:= ToValues@ComponentArray[TraceBasisDummy/@(ToBasis[B]/@%)]
Out= List of components of u with indices upstairs.
If you have further questions or need additional help with this code,
please post a notebook with (a sample) of your computations.
Regards,
Alfonso.