Skip to content

Extending vectorComponents #290

Description

@rweigel

Motivation. A proposed ISTP revision will refer to the HAPI schema for identifying components of a 1-D variable (ignoring the time dimension in the dimensionality). However, HAPI does not handle the more general case in which a variable's non-time dimensions correspond to a 2-D matrix or a 2-D tensor.

HAPI has vectorComponents which, as discussed, is an unfortunate name because one can form parameters with a vectorComponents attribute, but the parameters do not obey vector addition and so are not vectors in the mathematical sense. E.g., two parameters with components ['rho', 'phi'] can't be simply added to give a quantity that is the vector sum of the two parameters. However, additional processing can be done to convert the parameters into a proper mathematical vector.

We want to be able to express:

parameter = "matrix"
size = [2, 2]
description = "2-D Rotation matrix from A to B"
labels = [['Mxx', 'Mxy'], ['Myx', 'Myy']]
vectorComponents = [['x,x', 'x,y'], ['y,x', 'y,y']] # For example.

With the above information, one can compute a vector in B given a vector in A using matrix.

We also want to express that the parameter parts correspond to elements of a tensor.

parameter = 'diagnonals'
size = [3]
description = "Diagonal elements of cartesian pressure tensor"
labels = [['Mxx', 'Myy', 'Mzz']
vectorComponents = [['x,x', 'x,y', 'z,z']]

This parameter is not a vector in the mathematical sense.

The components do not need to be cartesian:

size = [3]
description = "Diagonal components of cartesian pressure tensor"
labels = ['Mρρ', 'Mθθ', 'Mzz']
vectorComponents = ['rho,rho', 'theta,theta', 'z,z']

Unedited notes from telecon

i = generic first index
j = generic second

vectorComponents = ['ii', 'ij']
vectorComponentIndexMeaning i='x', j='y' # verifier should complain and suggest using 'x', 'y'.
vectorComponentIndexMeaning i='rho', j='theta'

SPASE does something like this.

May have a variable that is a matrix

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions