Celeritas 0.7.0-dev.356+develop.6a0c715
Loading...
Searching...
No Matches
Functions
DerivativeGridCalculator.cc File Reference
#include "DerivativeGridCalculator.hh"
#include "GridTypes.hh"
#include "VectorUtils.hh"

Functions

inp::Grid celeritas::construct_derivative_grid (inp::Grid const &grid)
 Construct the derivative grid of an imported grid.
 

Function Documentation

◆ construct_derivative_grid()

inp::Grid celeritas::construct_derivative_grid ( inp::Grid const grid)

Construct the derivative grid of an imported grid.

Since grid are piecewise functions, the left-derivatives and right-derivatives might not agree at a grid point. Each x grid-point is duplicated with the first value taking the left-derivative and the second taking the right-derivative.

Todo:
Currently only linearly interpolated grids are supported since they are necessary for calculating group velocity from refractive index. The endpoints of the input grid are assumed to be constant, and thus have 0 derivative.