transform: Linear transforms of k-forms

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Given a k-form, express it in terms of linear combinations of the dx^i

Usage

1
2
transform(K,M)
stretch(K,d)

Arguments

K

Object of class kform

M

Matrix of transformation

d

Numeric vector representing the diagonal elements of a diagonal matrix

Details

Suppose we are given a two-form

omitted: see PDF

and relationships

omitted: see PDF

then we would have

omitted: see PDF

The general situation would be a k-form where we would have

omitted: see PDF

giving

omitted: see PDF

So ω was given in terms of dx_1,…,dx_k and we have expressed it in terms of dy_1,…,dy_k. So for example if

ommited: see PDF

and

omitted; see PDF

then

omitted; see PDF

The transform() function does all this but it is slow. I am not 100% sure that there isn't a much more efficient way to do such a transformation. There are a few tests in tests/testthat.

Function stretch() carries out the same operation but for a matrix with zero off-diagonal elements. It is much faster.

Value

Returns a k-form

Author(s)

Robin K. S. Hankin

References

S. H. Weintraub 2019. Differential forms: theory and practice. Elsevier. (Chapter 3)

See Also

wedge

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Example in the text:
K <- as.kform(matrix(c(1,1,2,3),2,2),c(1,5))
M <- matrix(1:9,3,3)
transform(K,M)

# Demonstrate that the result can be complicated:
M <- matrix(rnorm(25),5,5)
transform(as.kform(1:2),M)

# Numerical verification:
o <- rform(terms=2,n=5)

o2 <- transform(transform(o,M),solve(M))
max(abs(value(o-o2))) # zero to numerical precision

# Following should be zero:
transform(as.kform(1),M)-as.kform(matrix(1:5),c(crossprod(M,c(1,rep(0,4)))))

# Following should be TRUE:
issmall(transform(o,crossprod(matrix(rnorm(10),2,5))))

# Some stretch() use-cases:

p <- rform()
p
stretch(p,seq_len(5))
stretch(p,c(1,0,1,1,1))   # kills dimension 2

# Works nicely with pipes:
## Not run: 
max(abs(value(o-o %>% transform(M) %>% transform(solve(M)))))

## End(Not run)

wedge documentation built on Sept. 4, 2019, 9:02 a.m.