Package: stokes 1.2-4

stokes: The Exterior Calculus

Provides functionality for working with tensors, alternating forms, wedge products, Stokes's theorem, and related concepts from the exterior calculus. Uses 'disordR' discipline (Hankin, 2022, <doi:10.48550/arXiv.2210.03856>). The canonical reference would be M. Spivak (1965, ISBN:0-8053-9021-9) "Calculus on Manifolds". To cite the package in publications please use Hankin (2022) <doi:10.48550/arXiv.2210.17008>.

Authors:Robin K. S. Hankin [aut, cre]

stokes_1.2-4.tar.gz
stokes_1.2-4.zip(r-4.7)stokes_1.2-4.zip(r-4.6)stokes_1.2-4.zip(r-4.5)
stokes_1.2-4.tgz(r-4.6-any)stokes_1.2-4.tgz(r-4.5-any)
stokes_1.2-4.tar.gz(r-4.7-any)stokes_1.2-4.tar.gz(r-4.6-any)
stokes_1.2-4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
stokes/json (API)

# Install 'stokes' in R:
install.packages('stokes', repos = c('https://robinhankin.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/robinhankin/stokes/issues

Pkgdown/docs site:https://robinhankin.github.io

Datasets:
  • dx - Elementary forms in three-dimensional space
  • dy - Elementary forms in three-dimensional space
  • dz - Elementary forms in three-dimensional space
  • ex - Basis vectors in three-dimensional space
  • ey - Basis vectors in three-dimensional space
  • ez - Basis vectors in three-dimensional space

On CRAN:

Conda:

6.62 score 3 stars 350 downloads 59 exports 25 dependencies

Last updated from:dddbbe68a9. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK202
source / vignettesOK276
linux-release-x86_64OK197
macos-release-arm64OK125
macos-oldrel-arm64OK123
windows-develOK148
windows-releaseOK162
windows-oldrelOK158
wasm-releaseOK156

Exports:%^%%X%0form0tensorAltas.1formas.kformas.ktensoras.sprayas.symboliccoeffscoeffs<-consolidatecontractcontract_elementaryddiscarddovsegradhodgeinclude_permsinneris.emptyis.kformis.ktensoris.scalaris.volumeis.zeroissmallkeepkformkform_basiskform_generalkform_to_ktensorkill_trivial_rowskinnerktensorlosentermsphipullbackrformrformmrformmmrtensorscalarspraystretchtensorprodtensorprod2vcp3vector_cross_productvolumewedgewedge2zapzeroformzerotensor

Dependencies:abindclidigestdisordRfreealggluegmplatticelifecyclemagicmagrittrMatrixnumberspartitionspermutationspolynomrbibutilsRcppRdpackrlangsetsspraystringistringrvctrs

Function dovs() in the stokes package
keep() and discard() | References

Last update: 2026-04-26
Started: 2022-03-05

Function Alt() in the stokes package
Further properties of Alt() | Wedge product | Further further properties of Alt() | Argument give_kform | References

Last update: 2026-04-23
Started: 2021-05-03

Objects dx, dy, and dz in the stokes package
Wedge products | $$(\mathrm{d}x\wedge\mathrm{d}y)\left(\begin{pmatrix}u_1\u_2\u_3\end{pmatrix},\begin{pmatrix}v_1\v_2\v_3\end{pmatrix}\right) | $$(\mathrm{d}x\wedge\mathrm{d}y\wedge\mathrm{d}z)\left(\begin{pmatrix}u_1\u_2\u_3\end{pmatrix},\begin{pmatrix}v_1\v_2\v_3\end{pmatrix},\begin{pmatrix}w_1\w_2\w_3\end{pmatrix}\right) | The print method | $$(3\mathrm{d}y\wedge\mathrm{d}z)\left(\begin{pmatrix}u_1\u_2\u_3\end{pmatrix},\begin{pmatrix}v_1\v_2\v_3\end{pmatrix}\right) | $$(1\mathrm{d}x\wedge\mathrm{d}y)\left(\begin{pmatrix}u_1\u_2\u_3\end{pmatrix},\begin{pmatrix}v_1\v_2\v_3\end{pmatrix}\right) | $$X\left(\begin{pmatrix}u_1\u_2\u_3\end{pmatrix},\begin{pmatrix}v_1\v_2\v_3\end{pmatrix}\right) | Configuring the print method | The Hodge dual | Creating elementary one-forms | Package dataset | References

Last update: 2026-04-23
Started: 2022-02-26

Function inner() in the stokes package
Alternating forms | References

Last update: 2026-04-23
Started: 2021-05-03

Function tensorprod() in the stokes package
The tensor cross product | Verification | Note on associativity | References

Last update: 2026-04-23
Started: 2025-01-07

Functions vector_cross_product() and vcp3() in the stokes package
R implementation | Verification | Orientation | Immediate properties | Vector products and the Hodge star operator | Vector cross products in 3 dimensions | Vector cross product identities | Edge-cases | References

Last update: 2026-04-23
Started: 2022-01-17

Function volume() in the stokes package
References

Last update: 2026-04-23
Started: 2022-09-18

Functions wedge() and wedge2() in the stokes package
Digression: function spraycross() | Cut to the chase: wedge2() | Algebraic properties | References

Last update: 2026-04-23
Started: 2019-04-01

Function phi() in the stokes package
Distributivity | Reconstruction of a given tensor | Function Alt() | References

Last update: 2026-04-23
Started: 2025-01-14

Function kinner() in the stokes package
Some simple examples | Tidyup | References

Last update: 2026-04-22
Started: 2022-03-04

Function hodge() in the stokes package
The Hodge dual on basis elements of $\Lambda^k(V)$ | [\bigcup_ | More complicated examples | Small-dimensional vector spaces | Vector cross product identities | Non positive-definite metrics | Print methods for the Minkowski metric | Specifying the Minkowski metric | References

Last update: 2026-04-22
Started: 2022-03-04

Objects ex, ey, and ez in the stokes package
Package dataset | References

Last update: 2026-04-17
Started: 2023-02-22

Functions contract() and contract_elementary() in the stokes package
Contraction of products | Repeated contraction | Contraction from first principles | Worked example using contract_elementary() | The "meat" of contract() | References

Last update: 2026-04-17
Started: 2022-01-01

Exterior calculus with R
The stokes package | Package idiom for evaluation of a tensor | Vector space structure of tensors | Numerical verification of multilinearity in the package | Tensor product of general tensors | Alternating forms | Wedge products and the exterior calculus | Formal definition of dx | Formal definition of wedge product | Print methods | Contractions | Transformations and pullback | Exterior derivatives | [ {d}\phi\left({v}i,\ldots,{v}{k+1}\right) | Differential of the differential, $d^2=0$ | Stokes's theorem | References

Last update: 2026-04-01
Started: 2020-01-22

Readme and manuals

Help Manual

Help pageTopics
The Exterior Calculusstokes-package stokes
Alternating multilinear formsAlt
Coerce vectors to 1-formsas.1form grad
Extract and manipulate coefficientsas.spray coeff coeffs coeffs,kform-method coeffs,ktensor-method coeffs.kform coeffs.ktensor coeffs<- coeffs<-,kform-method coeffs<-,ktensor-method coeffs<-.kform coeffs<-.ktensor coeffs<-.spray nterms spray value<-
Various low-level helper functionsconsolidate include_perms kform_to_ktensor kill_trivial_rows lose_repeats
Contractions of k-formscontract contract_elementary
Dimension of the underlying vector spacedovs
Elementary forms in three-dimensional spacedx dy dz
Basis vectors in three-dimensional spaceex ey ez
Hodge star operatorHodge hodge star
Inner product operatorinner inner.product inner_product
Is a form zero to within numerical precision?issmall
Keep or drop variablesdiscard keep retain
k-formsas.function.kform as.kform d e general_kform is.form is.kform kform kform_basis kform_general
Inner product of two kformskinner
k-tensorsas.function.ktensor as.ktensor is.ktensor is.tensor ktensor
Arithmetic Ops Group Methods for 'kform' and 'ktensor' objectsOps Ops.kform Ops.ktensor Ops.stokes
Elementary tensorsphi
Print methods for k-tensors and k-formskform_symbolic_print ktensor_symbolic_print polyform print.kform print.ktensor print.stokes stokes_symbolic_print
Random kforms and ktensorsrform rformm rformmm rkform rktensor rtensor
Scalars and losing attributes0form 0tensor drop is.scalar lose lose.kform lose.ktensor scalar
Summaries of tensors and alternating formsprint.summary.kform print.summary.ktensor print.summary.spray summary summary.kform summary.ktensor summary.stokes
Symbolic formas.symbolic symbolic
Tensor products of k-tensors%X% tensorprod tensorprod2
Linear transforms of k-formspull-back pullback push-forward pushforward stretch transform
The Vector cross productvcp3 vector_cross_product
The volume elementis.volume volume
Wedge products%^% wedge wedge2
Zap small values in k-forms and k-tensorszap zap.kform zap.ktensor zap.spray zapsmall zaptiny
Zero tensors and zero formsis.empty is.zero zero zeroform zerotensor