Mesh Types
By default, the integrate routines takes NTuple{N} of node vectors as input, which is the most common case for Cartesian grids. This also allows for uniform/non-uniform meshes and different node arrangements (e.g. cell-centered, face-centered) without needing to define a custom grid type.
xyz = (
collect(range(0.0, 1.0; length=17)),
collect(range(0.0, 1.0; length=17)),
)With CartesianGrids.jl loaded, you can pass a CartesianGrids.CartesianGrid directly:
using CartesianGrids
f = HyperSphere{2,Float64}(0.45, (0.5, 0.5))
g = CartesianGrid((0.0, 0.0), (1.0, 1.0), (33, 33))
V, bary, iface, ctype, bif = integrate(Tuple{0}, f, g, Float64, nan)
A = integrate(Tuple{1}, f, g, Float64, nan)
W = integrate(Tuple{0}, f, g, Float64, nan, bary)HyperSphere provides a simple implicit test object (1D to 4D call overloads).