Celeritas 0.7+ffe085639
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. A single derivative is stored at each point by taking the harmonic mean of the adjacent interval slopes. This reduces the influence of a comparatively large slope while incorporating both one-sided derivatives. The endpoints use the one-sided slopes of their nearest intervals.

Todo:
Currently only linearly interpolated grids are supported since they are necessary for calculating group velocity from refractive index.