Projections

Projections documentation

The functions here project the vector of conservative variables back and forth between x-y-z and n-t-b (normal-tangential-binormal) cordinates.

Detailed Documentation

Utils.calcLengthMethod.

Calculates the length of a vector, using a manually unrolled loop. Methods are available for 2D and 3D.

Inputs:

params: an AbstractParamType{Tdim}, used to dispatch to the right method
nrm: the vector to calculate the length of.  Must have length 2 in 2D
     and 3 in 3D

Outputs:

length of nrm
source

This function populates the matrix P that project from x-y-z to n-t-b. Methods are available for 2D and 3D, determined from the AbstractParamType object. This is a somewhat specialized routine in that it only works for vectors like the state vector of the Euler or Navier-Stokes equations, where the first and last equations are coordinate system invarient and only the middle 2 (in 2D) or 3 (in 3D) equations need to be rotated. Specialized multiplication routines are provied as projectToXY and projectToNT.

Inputs:

params:  An AbstractParamType{Tdim}
nrm: the normal direction in x-y coordinate system.  Must be a unit vector

Inputs/Outputs

P:  matrix to be populated with projection matrix

Aliasing restrictions: none

source
Utils.projectToNTMethod.

This function projects a vector x from x-y coordinates to normal-tangential (n-t) coordinates, where A is a projection matrix from x-y to n-t, obtained from getProjectionMatrix. This function is a specialized matrix-vector multiplication routine and only works for matrices with the particular sparsity pattern created by getProjectionMatrix. Methods are available for 2D and 3D

Inputs:

params: an AbstractParamType{{Tdim} used to dispatch to the 2D or 3D
        method
P: the projection matrix
x: vector to be projected

Inputs/Outputs:

b: the result of the projection

Aliasing restrictions: x and b cannot alias

source
Utils.projectToXYMethod.

This function is similar to projectToNT, except it project from n-t to x-y. Note that P is still the projection matrix from getProjectionMatrix that projects from x-y to n-t.

source

This function computes a vector normal to the 2 supplied vectors and returns the components.

Inputs:

n1, n2, n3: the components of the first vector
t1, t2, t3: the components of the second vector

Outputs:

b1, b2, b3: the components of the binormal vector

Aliasing restrictions: none

source

This function generates a unit vector orthogonal to the input vector nrm and returns its components. Methods are availble for 2D and 3D

Inputs:

params: an AbstractParamType, used to dispatch to the 2D or 3D method
nrm: the input vector

Outputs:

t1, t2, (and t3 in 3D): the components of the unit vector orthogonal to
                        nrm

Aliasing restrictions: none

source