Tensor[MetricDensity] - use a metric tensor to create a scalar density of a given weight
Calling Sequences
MetricDensity(g, r)
Parameters
g - a metric tensor
r - a rational number
option - (optional) the keyword argument detmetric
Description
Examples
If g is a metric with components gij, then ρ=detgijr2 defines a scalar density of weight r.
The program MetricDensity(g, r) returns the scalar density ρ.
By default, it is assumed that the metric g has positive determinant. To calculate the proper metric density with respect to a metric with negative determinant, include the keyword argument detmetric = -1.
This command is part of the DifferentialGeometry:-Tensor package, and so can be used in the form MetricDensity(...) only after executing the commands with(DifferentialGeometry) and with(Tensor) in that order. It can always be used in the long form DifferentialGeometry:-Tensor:-MetricDensity.
with⁡DifferentialGeometry:with⁡Tensor:
Example 1.
First create a manifold M and define a metric tensor g1.
DGsetup⁡x,y,z,M:
g1≔evalDG⁡x⁢dx&tdx+y⁢dy&tdy+dz&tdz
g1:=x⁢dx⁢dx+y⁢dy⁢dy+dz⁢dz
Use g to make a tensor density of weight 1.
ρ1≔MetricDensity⁡g1,1
ρ1:=x⁢y
Display the density type of rho1.
Tools:-DGinfo⁡ρ1,TensorDensityType
bas,1
Example 2.
For indefinite metrics, the optional argument detmetric = -1 can be used to ensure that the metric density is real.
g2≔evalDG⁡dx&tdx+dy&tdy−dz&tdz
g2:=dx⁢dx+dy⁢dy−dz⁢dz
rho2a≔MetricDensity⁡g2,1
rho2a:=I
rho2b≔MetricDensity⁡g2,1,detmetric=−1
rho2b:=1
Example 3.
First create a rank 3 vector bundle E over a two-dimensional manifold M and define a metric tensor g3 on the fibers of E.
DGsetup⁡x,y,u,v,w,E
frame name: E
g3≔evalDG⁡x⁢du&tdu+y⁢dv&tdv+x⁢y⁢dw&tdw
g3:=x⁢du⁢du+y⁢dv⁢dv+x⁢y⁢dw⁢dw
Use g3 to make a tensor density of weight -1.
ρ3≔MetricDensity⁡g3,−1
ρ3:=1x2⁢y2
Display the density type of rho3.
Tools:-DGinfo⁡ρ3,TensorDensityType
vrt,−1
See Also
DifferentialGeometry
Tensor
DGinfo
RaiseLowerIndices
Physics[g_]
Download Help Document