More coord constructors can be constexpr. Have found this useful for writing complex finite difference operations using neighboring cells.
A simple example of usage:
Coord p; // Some input coord
// Find this pattern much easier to debug and follow for even larger number of neighbors.
constexpr Coord n0Off{1, 0};
constexpr Coord n1Off{-1, 0};
constexpr Coord n2Off{0, 1};
constexpr Coord n3Off{0, -1};
auto dx = ((p + n0Off) - (p + n1Off)) / 2 ;
auto dy = ((p + n2Off) - (p + n3Off)) / 2 ;
:x: The email address for the commit (8212597b308340c5e8d25787d6130608ea29b1c4) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please submit a support request ticket.
More coord constructors can be constexpr. Have found this useful for writing complex finite difference operations using neighboring cells. A simple example of usage: