Learn R Programming

stokes (version 1.2-0)

as.1form: Coerce vectors to 1-forms

Description

Given a vector, return the corresponding 1-form; the exterior derivative of a 0-form (that is, a scalar function). Function grad() is a synonym.

Usage

as.1form(v)
grad(v)

Value

A one-form

Arguments

v

A vector with element i being f/ x_idf/dxi

Author

Robin K. S. Hankin

Details

The exterior derivative of a k-form phi is a (k+1)-form dd phi given by

d ( P_x(v_i,...,v_k+1) ) = _h 01h^k+1_ P_x(hv_1,...,hv_k+1) omitted; see latex

We can use the facts that

d(f\,dx_i_1 dx_i_k)= df dx_i_1 dx_i_k omitted; see latex

and df=_j=1^n(D_j f)\,dx_j omitted; see latex

to calculate differentials of general k-forms. Specifically, if

=_1 i_i < < i_k n a_i_1... i_kdx_i_1 dx_i_k omitted; see latex

then d= _1 i_i < < i_k n [_j=1^nD_ja_i_1... i_kdx_j] dx_i_1 dx_i_k. omitted; see latex

The entry in square brackets is given by grad(). See the examples for appropriate R idiom.

See Also

kform

Examples

Run this code

as.1form(1:9)  # note ordering of terms


as.1form(rnorm(20))

grad(c(4,7)) ^ grad(1:4)




Run the code above in your browser using DataLab