transform: Linear transforms of k-forms

transformR Documentation

Linear transforms of k-forms

Description

\loadmathjax

Given a \mjseqnk-form, express it in terms of linear combinations of the \mjeqndx_idx_i

Usage

pullback(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

Function pullback() calculates the pullback of a function. A vignette is provided at ‘pullback.Rmd’.

Suppose we are given a two-form

\mjdeqn \omega

=\sum_i < ja_ijdx_i\wedge dx_jomitted: see latex

and relationships

\mjdeqn

dx_i=\sum_rM_irdy_romitted: see latex

then we would have

\mjdeqn\omega

= \sum_i < j a_ij\left(\sum_rM_irdy_r\right)\wedge\left(\sum_rM_jrdy_r\right). omitted: see latex

The general situation would be a \mjseqnk-form where we would have \mjdeqn \omega=\sum_i_1 < \cdots < i_ka_i_1... i_kdx_i_1\wedge\cdots\wedge dx_i_komitted: see latex

giving

\mjdeqn\omega

= \sum_i_1 < \cdots < i_k\left[ a_i_1,..., i_k\left(\sum_rM_i_1rdy_r\right)\wedge\cdots\wedge\left(\sum_rM_i_krdy_r\right)\right]. omitted: see latex

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 and a discussion in the stokes vignette.

Function stretch() carries out the same operation but for \mjseqnM a diagonal matrix. It is much faster than transform().

Value

The functions documented here return an object of class kform.

Author(s)

Robin K. S. Hankin

References

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

See Also

wedge

Examples


# Example in the text:
K <- as.kform(matrix(c(1,1,2,3),2,2),c(1,5))
M <- matrix(1:9,3,3)
pullback(K,M)

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

# Numerical verification:
o <- volume(3)

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

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

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

# Some stretch() use-cases:

p <- rform()
p
stretch(p,seq_len(7))
stretch(p,c(1,0,0,1,1,1,1))   # kills dimensions 2 and 3


stokes documentation built on Aug. 19, 2023, 1:07 a.m.