This namespace implements a form field operator and a number of functions for creating and working with form fields.
A form-field of rank n is an operator that takes n vector fields to a real-valued function on the manifold. A one-form field takes a single vector field.
The namespace also contains two definitions of the wedge
product (alt-wedge
is the second), plus the exterior-derivative
.
This namespace implements a form field operator and a number of functions for creating and working with form fields. A form-field of rank n is an operator that takes n vector fields to a real-valued function on the manifold. A one-form field takes a single vector field. The namespace also contains two definitions of the [[wedge]] product ([[alt-wedge]] is the second), plus the [[exterior-derivative]].
(Alt form)
Returns the alternation of the supplied differential form
.
Returns the alternation of the supplied differential `form`.
(alt-wedge & args)
Alternative definition of wedge
in terms of alternation.
Alternative definition of [[wedge]] in terms of alternation.
(basis-components->oneform-field components oneform-basis)
Given a structure of components
functions defined on manifold points and and
a matching oneform-basis
(of identical structure),
Returns a new one-form field that
passes its vector-field argument to oneform-basis
, returning a new
equivalent structure with each slot populated by functions from a manifold
point to the directional derivative (using the vector field) in that
coordinate direction
contracts the result of that operation with the result of applying each
component in components
to the manifold point.
NOTE:
components
are evaluated at a manifold point, not its coordinatesoneform-field->basis-components
Given a structure of `components` functions defined on manifold points and and a matching `oneform-basis` (of identical structure), Returns a new one-form field that - passes its vector-field argument to `oneform-basis`, returning a new equivalent structure with each slot populated by functions from a manifold point to the directional derivative (using the vector field) in that coordinate direction - contracts the result of that operation with the result of applying each component in `components` to the manifold point. NOTE: - This is for any basis, not just a coordinate basis - The `components` are evaluated at a manifold point, not its coordinates - Given a dual basis, you can retrieve the original components with [[oneform-field->basis-components]]
(components->oneform-field components coordinate-system)
(components->oneform-field components coordinate-system name)
Takes:
down
tuple of components
of the one-form field relative to
coordinate-system
coordinate-system
And returns a full one-form field.
A one-field field is an operator that takes a vector field to a real-valued function on the manifold.
Takes: - a `down` tuple of `components` of the one-form field relative to `coordinate-system` - the `coordinate-system` And returns a full one-form field. A one-field field is an operator that takes a vector field to a real-valued function on the manifold.
(coordinate-basis-oneform-field coordinate-system name & indices)
Given some coordinate-system
, a symbolic name
and a sequence of indices
into the structure of the coordinate system's representation, returns a
one-form field.
The returned one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field.
Given some `coordinate-system`, a symbolic `name` and a sequence of indices into the structure of the coordinate system's representation, returns a one-form field. The returned one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field.
(coordinate-system->oneform-basis coordinate-system)
Given some coordinate-system
, returns a structure of
coordinate-basis-oneform-field
instances.
The one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field.
When applied as a function, the structure behaves equivalently to
(coordinate-basis-oneform-field <coordinate-system> 'ignored-name)
With no indices supplied.
Given some `coordinate-system`, returns a structure of `coordinate-basis-oneform-field` instances. The one-form field at each structural spot takes a vector field and returns a function that takes the directional derivative in that coordinate's direction using the vector field. When applied as a function, the structure behaves equivalently to ```clojure (coordinate-basis-oneform-field <coordinate-system> 'ignored-name) ``` With no indices supplied.
Alias for function->oneform-field
.
One of the two incompatible definitions of differential.
This differential is a special case of exterior derivative. The other one
lives at map/differential
.
Alias for [[function->oneform-field]]. One of the two incompatible definitions of differential. This differential is a special case of exterior derivative. The other one lives at [[map/differential]].
(ff:zero _)
Returns a form field that returns, for any supplied vector field vf
, a
manifold function manifold/zero-manifold-function
that maps every input
manifold point
to the scalar value 0.
Returns a form field that returns, for any supplied vector field `vf`, a manifold function [[manifold/zero-manifold-function]] that maps every input manifold `point` to the scalar value 0.
(form-field? ff)
Returns true if the supplied f
is a form field operator, false otherwise.
Returns true if the supplied `f` is a form field operator, false otherwise.
(function->oneform-field f)
One of the two incompatible definitions of differential.
This differential is a special case of exterior derivative. The other one
lives at map/differential
.
One of the two incompatible definitions of differential. This differential is a special case of exterior derivative. The other one lives at [[map/differential]].
(get-rank f)
Returns the rank of the supplied differential form f
. Functions are treated
as differential forms of rank 0.
Throws for any non differential form supplied.
Returns the rank of the supplied differential form `f`. Functions are treated as differential forms of rank 0. Throws for any non differential form supplied.
(literal-oneform-field name coordinate-system)
Given a symbolic name sym
and a coordinate-system
, returns a one-form field
consisting of literal real-valued functions from the coordinate system's
dimension for each coordinate component.
These functions are passed to components->oneform-field
, along with the
supplied coordinate-system
and symbolic name sym
.
For coordinate systems of dimension 1, literal-form-field
's component
functions will accept a single non-structural argument.
Given a symbolic name `sym` and a `coordinate-system`, returns a one-form field consisting of literal real-valued functions from the coordinate system's dimension for each coordinate component. These functions are passed to [[components->oneform-field]], along with the supplied `coordinate-system` and symbolic name `sym`. For coordinate systems of dimension 1, `literal-form-field`'s component functions will accept a single non-structural argument.
(nform-field? f n)
Returns true if the supplied f
is an form field of rank
n, false otherwise.
A form-field of rank n is an operator that takes n vector fields to a real-valued function on the manifold.
Returns true if the supplied `f` is an [form field of rank n](https://en.wikipedia.org/wiki/Differential_form), false otherwise. A form-field of rank n is an operator that takes n vector fields to a real-valued function on the manifold.
(oneform-field->basis-components w vector-basis)
Given a structure w
of and a vector field basis vector-basis
, returns a new
structure generated by applying the full vector basis to each element of w
.
Here's an example of how to use this function to round trip a structure of basis components:
(let [vb (vf/coordinate-system->vector-basis coordsys)
basis (coordinate-system->oneform-basis coordsys)
components (down d:dx d:dy)]
(= components
(-> components
(basis-components->oneform-field basis)
(oneform-field->basis-components vb))))
Given a structure `w` of and a vector field basis `vector-basis`, returns a new structure generated by applying the full vector basis to each element of `w`. Here's an example of how to use this function to round trip a structure of basis components: ```clojure (let [vb (vf/coordinate-system->vector-basis coordsys) basis (coordinate-system->oneform-basis coordsys) components (down d:dx d:dy)] (= components (-> components (basis-components->oneform-field basis) (oneform-field->basis-components vb)))) ```
(oneform-field->components form coordinate-system)
Given a one-form field form
and a coordinate-system
, returns a function
from the coordinate representation of a manifold point to a coordinate
representation of the coordinatized components of the form field at that
point.
For example:
(let-coordinates [[x y] R2-rect]
(let [f (literal-oneform-field 'f R2-rect)]
((oneform-field->components f R2-rect)
(up 'x0 'y0))))
;;=> (down (f_0 (up x0 y0))
;; (f_1 (up x0 y0)))
Given a one-form field `form` and a `coordinate-system`, returns a function from the coordinate representation of a manifold point to a coordinate representation of the coordinatized components of the form field at that point. For example: ```clojure (let-coordinates [[x y] R2-rect] (let [f (literal-oneform-field 'f R2-rect)] ((oneform-field->components f R2-rect) (up 'x0 'y0)))) ;;=> (down (f_0 (up x0 y0)) ;; (f_1 (up x0 y0))) ```
(oneform-field? f)
Returns true if the supplied f
is
a One-form, false
otherwise.
A One-form takes a single vector field to a real-valued function on the manifold.
Returns true if the supplied `f` is a [One-form](https://en.wikipedia.org/wiki/One-form), false otherwise. A [One-form](https://en.wikipedia.org/wiki/One-form) takes a single vector field to a real-valued function on the manifold.
(wedge)
(wedge f)
(wedge f & fs)
Computes the wedge product of the sequence fs
of one-forms.
Higher rank forms can be constructed from one-forms by wedging them together. This antisymmetric tensor product is computed as a determinant. The purpose of this is to allow us to use the construction dx^dy to compute the area described by the vectors that are given to it.
See Spivak p275 v1 of 'Differential Geometry' to see the correct definition. The key is that the wedge of the coordinate basis forms had better be the volume element.
Computes the wedge product of the sequence `fs` of one-forms. Higher rank forms can be constructed from one-forms by wedging them together. This antisymmetric tensor product is computed as a determinant. The purpose of this is to allow us to use the construction dx^dy to compute the area described by the vectors that are given to it. See Spivak p275 v1 of 'Differential Geometry' to see the correct definition. The key is that the wedge of the coordinate basis forms had better be the volume element.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close