--- title: "Objects `ex`, `ey`, and `ez` in the `stokes` package" author: "Robin K. S. Hankin" bibliography: stokes.bib output: html_vignette vignette: > %\VignetteEngine{knitr::rmarkdown} %\VignetteIndexEntry{basis} %\usepackage[utf8]{inputenc} --- ```{r setup, include=FALSE} set.seed(0) library("stokes") knitr::opts_chunk$set(echo = TRUE) options(rmarkdown.html_vignette.check_title = FALSE) ``` ```{r out.width='20%', out.extra='style="float:right; padding:10px"',echo=FALSE} knitr::include_graphics(system.file("help/figures/stokes.png", package = "stokes")) ``` ```{r label=defineexeyez} ex <- e(1,3) ey <- e(2,3) ez <- e(3,3) ``` To cite the `stokes` package in publications, please use @hankin2022_stokes. Convenience objects `ex`, `ey`, and `ez` are discussed here (related package functionality is discussed in `dx.Rmd`). The dual basis to $(\mathrm{d}x,\mathrm{d}y,\mathrm{d}z)$ is, depending on context, written $(e_x,e_y,e_z)$, or $(i,j,k)$ or sometimes $\left(\frac{\partial}{\partial x},\frac{\partial}{\partial x},\frac{\partial}{\partial x}\right)$. Here they are denoted `ex`, `ey`, and `ez` (rather than `i`,`j`,`k` which cause problems in the context of R). ```{r} fdx <- as.function(dx) fdy <- as.function(dy) fdz <- as.function(dz) matrix(c( fdx(ex),fdx(ey),fdx(ez), fdy(ex),fdy(ey),fdy(ez), fdz(ex),fdz(ey),fdz(ez) ),3,3) ``` Above we see that the matrix $\mathrm{d}x^i\frac{\partial}{\partial x^j}$ is the identity, showing that `ex`, `ey`, `ez` are indeed conjugate to $\mathrm{d}x,\mathrm{d}y,\mathrm{d}z$. ### Package dataset Following lines create `exeyez.rda`, residing in the `data/` directory of the package. ```{r,label=savedxdydz} save(ex,ey,ez,file="exeyez.rda") ``` # References