SFLUCompute

Defined in module: wield.control.SFLU.SFLUcompute.SFLUCompute

class SFLUCompute(oplistE, edges, row2col, col2row, typemap_to=None, typemap_fr=None, eye=1)[source][github]

Bases: object

__init__(oplistE, edges, row2col, col2row, typemap_to=None, typemap_fr=None, eye=1)[source][github]

Methods

CLG_inv(E)

__init__(oplistE, edges, row2col, col2row[, ...])

compute(edge_map)

convert_edges2yamlpy()

convert_oplistE2yamlpy()

convert_oplistE2yamlstr()

convert_row2col2yamlpy()

convert_self2yamlpy()

convert_self2yamlstr()

convert_yamlpy2edges(yamlpy)

convert_yamlpy2oplistE(yamlpy)

convert_yamlpy2row2col(yamlpy)

convert_yamlstr2oplistE(s)

edge_map(edge_map[, default])

Map the edges into an edge space for computation.

from_yaml(y, **kwargs)

inverse_col(Rset, Cmap[, derivatives])

This computes the matrix element for an inverse from C to R.

inverse_col_single(Rset, C[, derivatives])

Find the inverse of a single column into many rows given by Rset

inverse_derivative(Cmap, Rset, Dmap)

Calculate the derivative of the matrix inverse along the given derivative values.

inverse_row(Rmap, Cset[, derivatives])

This computes the matrix element for an inverse from C to R

inverse_row_single(R, Cset[, derivatives])

Find the inverse of a single row from many columns given by Cset

inverse_single(rN, cN)

This computes the matrix element for an inverse from C to R

subgraph(rows, cols)

Generate the row2col and col2row for a subgraph

subinverse_by(oplistN)

typemap_fr_default(v)

typemap_to_default(v)

Default conversion for edge and node values.

CLG_inv(E)[source][github]
typemap_to_default(v)[source][github]

Default conversion for edge and node values. This conversion promotes scalars and arrays to become 1x1 matrices so that the matmul operation may be applied

typemap_fr_default(v)[source][github]
edge_map(edge_map, default=False)[source][github]

Map the edges into an edge space for computation.

compute(edge_map)[source][github]
subinverse_by(oplistN)[source][github]
subgraph(rows, cols)[source][github]

Generate the row2col and col2row for a subgraph

inverse_col_single(Rset, C, derivatives=False)[source][github]

Find the inverse of a single column into many rows given by Rset

derivatives: if True, include all derivative testpoints in Rset

inverse_col(Rset, Cmap, derivatives=False)[source][github]

This computes the matrix element for an inverse from C to R.

The columns are a dictionary mapping column names to values. The values can be vectors, matrices or None. A value of None implicitly chooses the identity matrix.

TODO, the algorithm could/should use some work. Should make a copy of col2row then deplete it

derivatives: if True, include all derivative testpoints in Rset

inverse_row_single(R, Cset, derivatives=False)[source][github]

Find the inverse of a single row from many columns given by Cset

derivatives: if True, include all derivative excitations in Cset

inverse_row(Rmap, Cset, derivatives=False)[source][github]

This computes the matrix element for an inverse from C to R

TODO, the algorithm could/should use some work. Should make a copy of col2row then deplete it

derivatives: if True, include all derivative excitations in Cset

inverse_derivative(Cmap, Rset, Dmap)[source][github]

Calculate the derivative of the matrix inverse along the given derivative values.

this calculates Sum_i Dmap_i @ (M^-1)’_i by using Dmap_i @ (M^-1)’_i = Dmap_i * (M^-1 @ M’_i @ M^-1). Notably the value of M appears twice and “self” here is the second one. The first M^-1 is supplied by Cmap.

This method of calling allow for the first and second M^-1 to come from separate M evaluations. In particular, it allows a DC computation to be applied first.

Cmap is a column mapping from a previous evaluation of inverse_col(Cmap, Rset=any, derivative=True) where Cmap is the original driving vector and Rset can be anything since it is augmented appropriately by derivatives=True

Dmap must be a dictionary mapping edge pair-tuples or edge value-names to matrices.

inverse_single(rN, cN)[source][github]

This computes the matrix element for an inverse from C to R

classmethod from_yaml(y, **kwargs)[source][github]
convert_self2yamlpy()[source][github]
convert_self2yamlstr()[source][github]
convert_oplistE2yamlpy()[source][github]
classmethod convert_yamlpy2oplistE(yamlpy)[source][github]
convert_row2col2yamlpy()[source][github]
classmethod convert_yamlpy2row2col(yamlpy)[source][github]
convert_edges2yamlpy()[source][github]
classmethod convert_yamlpy2edges(yamlpy)[source][github]
convert_oplistE2yamlstr()[source][github]
classmethod convert_yamlstr2oplistE(s)[source][github]