wedge (version 1.0-3)

hodge: Hodge star operator

Description

Given a \(k\)-form, return its Hodge dual

Usage

hodge(K, n=max(index(K)), g=rep(1,n), lose=TRUE)

Arguments

K

Object of class kform

n

Dimensionality of space, defaulting the the largest element of the index

g

Diagonal of the metric tensor, defaulting to the standard metric

lose

Boolean, with default TRUE meaning to coerce to a scalar if appropriate

Value

Returns a \((n-k)\)-form

See Also

wedge

Examples

Run this code
# NOT RUN {
hodge(rform())

hodge(kform_general(4,2),g=c(-1,1,1,1))


## Some edge-cases:
hodge(zero(5),9)
hodge(volume(5))
hodge(volume(5),lose=TRUE)
hodge(scalar(7),n=9)
# }

Run the code above in your browser using DataLab