# Differential operators

`BSplineKit.DifferentialOps`

— Module`DifferentialOps`

Module defining types describing differential operators and compositions thereof.

## Operators

`BSplineKit.DifferentialOps.AbstractDifferentialOp`

— Type`AbstractDifferentialOp`

Represents a general differential operator.

`BSplineKit.DifferentialOps.Derivative`

— Type`Derivative{n} <: AbstractDifferentialOp`

Specifies the `n`

-th derivative of a function.

`BSplineKit.DifferentialOps.DerivativeUnitRange`

— Type`DerivativeUnitRange{m, n} <: AbstractDifferentialOp`

Specifies a range of derivatives.

**Examples**

Two ways of constructing derivative ranges:

```
julia> Derivative(2):Derivative(4)
Derivative(2:4)
julia> Derivative(2:4)
Derivative(2:4)
julia> Tuple(Derivative(2:4))
(D{2}, D{3}, D{4})
```

`BSplineKit.DifferentialOps.ScaledDerivative`

— Type`ScaledDerivative{n} <: AbstractDifferentialOp`

`n`

-th derivative of a function scaled by a constant coefficient.

`BSplineKit.DifferentialOps.DifferentialOpSum`

— Type`DifferentialOpSum <: AbstractDifferentialOp`

Sum of two differential operators.

`BSplineKit.DifferentialOps.max_order`

— Function```
max_order(op::AbstractDifferentialOp)
max_order(ops...)
```

Get maximum derivative order of one or more differential operators.

## Projections

`BSplineKit.DifferentialOps.AbstractNormalDirection`

— Type`AbstractNormalDirection`

Represents the normal direction on a given domain boundary.

`BSplineKit.DifferentialOps.LeftNormal`

— Type`LeftNormal <: AbstractNormalDirection`

Specifies the normal direction on the left boundary of a 1D domain.

The left normal direction goes opposite to the coordinate axis.

`BSplineKit.DifferentialOps.RightNormal`

— Type`RightNormal <: AbstractNormalDirection`

Specifies the normal direction on the right boundary of a 1D domain.

The right normal direction is equal to that of the coordinate axis.

`LinearAlgebra.dot`

— Method`dot(op::AbstractDifferentialOp, dir::AbstractNormalDirection) -> AbstractDifferentialOp`

Project derivative along a normal direction.

This should be used to convert from a normal derivative at the boundaries, to a derivative along the coordinate axes of the domain.

In practice, this returns `op`

for `RightNormal`

. For `LeftNormal`

, it multiplies the odd-order derivatives by -1.