FieldVector norms
Suppose we have a FieldVector with ten elements in the vector that sits on a grid of 1000 points. I want a function that takes a norm over the ten elements at each point, producing a single value at each of the 1000 grid points. This is different than taking a norm of each element over the whole grid, which would produce a single value for each of the ten elements.
I would like to have support for the L1 norm (sum of absolute values), L2 norm (square root of sum of squares), L-infinity norm (max of absolute values), as well as minimum and maximum.
Example of L2 Norm:
List:
Vector3(1, 0, 0)
Vector3(2, 0, 0)
Vector3(3, 0, 0)
Vector3(4, 0, 0)
L2Norm
: List: 1, 2, 3, 4
Example of min, max:
List:
Vector3(1, -1, 0)
Vector3(2, -1, -2)
Vector3(10, -100, 20)
VectorMax
: List: 1, 2, 20
VectorMin
: List: -1, -2, -100
Clarification from Michael Brown: As you mentioned you would like to take the norm over the elements of a FieldVector at each grid point. I believe this to mean that, thinking of the FieldVector as a list of vectors, that you would like to compute the norm of each vector and have it returned in a list of scalar values (this would pop out as a Field given the current situation of data in a FieldVector).