Liking cljdoc? Tell your friends :D

sicmutils.calculus.vector-field

This namespace implements a vector field operator and a number of functions for creating and working with vector fields.

A vector field is an operator that takes a smooth real-valued function of a manifold and produces a new function on the manifold which computes the directional derivative of the given function at each point of the manifold.

This namespace implements a vector field operator and a number of functions for
creating and working with vector fields.

A vector field is an operator that takes a smooth real-valued function of a
manifold and produces a new function on the manifold which computes the
directional derivative of the given function at each point of the manifold.
raw docstring

basis-components->vector-fieldclj/s

(basis-components->vector-field components vector-basis)

Given a structure of components and and a matching vector-basis (of identical structure with orientations flipped), returns a new vector field generated contracting by these two structures together.

The returned vector field passes its input function to the operator generated by this contraction.

For example:

(let-coordinates [[x y] R2-rect]
  (basis-components->vector-field
   (up x y)
   (coordinate-system->vector-basis R2-rect)))
;; => (+ (* x d:dx) (* y d:dy))

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 vector-field->basis-components
Given a structure of `components` and and a matching `vector-basis` (of
identical structure with orientations flipped), returns a new vector field
generated contracting by these two structures together.

The returned vector field passes its input function to the operator generated
by this contraction.

For example:

```clojure
(let-coordinates [[x y] R2-rect]
  (basis-components->vector-field
   (up x y)
   (coordinate-system->vector-basis R2-rect)))
;; => (+ (* x d:dx) (* y d:dy))
```

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 [[vector-field->basis-components]]
sourceraw docstring

components->vector-fieldclj/s

(components->vector-field components coordinate-system)
(components->vector-field components coordinate-system name)

Takes:

  • an up tuple of the functions that each return the corresponding component of the vector field relative coordinate-system
  • the coordinate-system
  • optionally, a symbolic name for the vector field operator

And returns a vector field.

A vector field is an operator that takes a smooth real-valued function of manifold points and produces a NEW function that computes the directional derivative of the given function at each point of the manifold.

Takes:

- an `up` tuple of the functions that each return the corresponding component
of the vector field relative `coordinate-system`
- the `coordinate-system`
- optionally, a symbolic name for the vector field operator

And returns a vector field.

A vector field is an operator that takes a smooth real-valued function of
manifold points and produces a NEW function that computes the directional
derivative of the given function at each point of the manifold.
sourceraw docstring

coordinate-basis-vector-fieldclj/s

(coordinate-basis-vector-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 vector field that takes a function and returns a new function that computes the partial derivative of that function with respect to the supplied indices into coordinate-system.

To compute the full Jacobian, pass no indices.

Given some `coordinate-system`, a symbolic `name` and a sequence of indices
into the structure of the coordinate system's representation,

returns a vector field that takes a function and returns a new function that
computes the partial derivative of that function with respect to the supplied
`indices` into `coordinate-system`.

To compute the full Jacobian, pass no indices.
sourceraw docstring

coordinate-system->vector-basisclj/s

(coordinate-system->vector-basis coordinate-system)

Given some coordinate-system, returns a structure of coordinate-basis-vector-field instances. The vector field at each structural spot takes a function and computes its directional derivative with respect to that coordinate.

When applied as a function, the structure behaves equivalently to

(coordinate-basis-vector-field <coordinate-system> 'ignored-name)

With no indices supplied.

Given some `coordinate-system`, returns a structure of
`coordinate-basis-vector-field` instances. The vector field at each structural
spot takes a function and computes its directional derivative with respect to
that coordinate.

When applied as a function, the structure behaves equivalently to

```clojure
(coordinate-basis-vector-field <coordinate-system> 'ignored-name)
```

With no indices supplied.
sourceraw docstring

coordinatizeclj/s

(coordinatize vf coordinate-system)

Returns an operator that acts as a coordinate version of the supplied vector field vf with respect to coordinate-system.

The returned operator takes a function and returns a new function that takes directional derivatives of coordinate representations of manifold points, with respect to coordinate-system.

Returns an operator that acts as a coordinate version of the supplied vector
field `vf` with respect to `coordinate-system`.

The returned operator takes a function and returns a new function that takes
directional derivatives of coordinate representations of manifold points, with
respect to `coordinate-system`.
sourceraw docstring

evolutionclj/s

(evolution order)

We can use the coordinatized vector field to build an evolution along an integral curve.

NOTE: I don't see how this has anything to do with coordinatize!

We can use the coordinatized vector field to build an evolution along an
integral curve.

NOTE: I don't see how this has anything to do with [[coordinatize]]!
sourceraw docstring

literal-vector-fieldclj/s

(literal-vector-field sym coordinate-system)

Given a symbolic name sym and a coordinate-system, returns a vector field consisting of literal real-valued functions from the coordinate system's dimension for each coordinate component.

These functions are passed to components->vector-field, along with the supplied coordinate-system and symbolic name sym.

For coordinate systems of dimension 1, literal-vector-field's component functions will accept a single non-structural argument.

Given a symbolic name `sym` and a `coordinate-system`, returns a vector field
consisting of literal real-valued functions from the coordinate system's
dimension for each coordinate component.

These functions are passed to [[components->vector-field]], along with the
supplied `coordinate-system` and symbolic name `sym`.

For coordinate systems of dimension 1, `literal-vector-field`'s component
functions will accept a single non-structural argument.
sourceraw docstring

vector-field->basis-componentsclj/s

(vector-field->basis-components vf dual-basis)

Given a vector field vf generated from basis-components->vector-field and a dual basis, returns the original basis components.

NOTE: You can generate a dual basis with [[basis/vector-basis->dual-basis]].

Here's an example of how to use this function to round trip a structure of basis components:

(let [basis (coordinate-system->vector-basis coordsys)
      dual  (basis/vector-basis->dual basis coordsys)]
  (= basis-components
     (-> basis-components
         (basis-components->vector-field basis)
         (vector-field->basis-components dual))))
Given a vector field `vf` generated from [[basis-components->vector-field]] and
a dual basis, returns the original basis components.

NOTE: You can generate a dual basis with [[basis/vector-basis->dual-basis]].

Here's an example of how to use this function to round trip a structure of
basis components:

```clojure
(let [basis (coordinate-system->vector-basis coordsys)
      dual  (basis/vector-basis->dual basis coordsys)]
  (= basis-components
     (-> basis-components
         (basis-components->vector-field basis)
         (vector-field->basis-components dual))))
```
sourceraw docstring

vector-field->componentsclj/s

(vector-field->components vf coordinate-system)

Given a vector field vf 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 vector field at that point.

For example:

(let-coordinates [[x y] R2-rect]
  (let [f (literal-vector-field 'f R2-rect)]
      ((vector-field->components f R2-rect)
       (up 'x0 'y0))))

;;=> (up (f↑0 (up x0 y0))
;;       (f↑1 (up x0 y0)))
Given a vector field `vf` 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 vector field at that
point.

For example:

```clojure
(let-coordinates [[x y] R2-rect]
  (let [f (literal-vector-field 'f R2-rect)]
      ((vector-field->components f R2-rect)
       (up 'x0 'y0))))

;;=> (up (f↑0 (up x0 y0))
;;       (f↑1 (up x0 y0)))
```
sourceraw docstring

vector-field?clj/s

(vector-field? vf)

Returns true if the supplied argument vf is a vector field operator, false otherwise.

Returns true if the supplied argument `vf` is a vector field operator, false
otherwise.
sourceraw docstring

vf:zeroclj/s

(vf:zero _)

Returns a vector field that returns, for any supplied function f, a manifold function manifold/zero-manifold-function that maps every input manifold point to the scalar value 0.

Returns a vector field that returns, for any supplied function `f`, a manifold
function [[manifold/zero-manifold-function]] that maps every input manifold
`point` to the scalar value 0.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close