discretize.InnerProducts.InnerProducts

class discretize.InnerProducts.InnerProducts[source]

Bases: object

This is a base for the discretize mesh classes. This mixIn creates the all the inner product matrices that you need!

Methods

getEdgeInnerProduct([prop, invProp, invMat, …])

Generate the edge inner product matrix

getEdgeInnerProductDeriv(prop[, doFast, …])

Parameters

getFaceInnerProduct([prop, invProp, invMat, …])

Generate the face inner product matrix

getFaceInnerProductDeriv(prop[, doFast, …])

Parameters

Attributes

Methods

InnerProducts.getEdgeInnerProduct(prop=None, invProp=False, invMat=False, doFast=True)[source]

Generate the edge inner product matrix

Parameters
propnumpy.ndarray

material property (tensor properties are possible) at each cell center (nC, (1, 3, or 6))

invPropbool

inverts the material property

invMatbool

inverts the matrix

doFastbool

do a faster implementation if available.

Returns
scipy.sparse.csr_matrix

M, the inner product matrix (nE, nE)

InnerProducts.getEdgeInnerProductDeriv(prop, doFast=True, invProp=False, invMat=False)[source]
Parameters
propnumpy.ndarray

material property (tensor properties are possible) at each cell center (nC, (1, 3, or 6))

doFastbool

do a faster implementation if available.

invPropbool

inverts the material property

invMatbool

inverts the matrix

Returns
scipy.sparse.csr_matrix

dMdm, the derivative of the inner product matrix (nE, nC*nA)

InnerProducts.getFaceInnerProduct(prop=None, invProp=False, invMat=False, doFast=True)[source]

Generate the face inner product matrix

Parameters
propnumpy.ndarray

material property (tensor properties are possible) at each cell center (nC, (1, 3, or 6))

invPropbool

inverts the material property

invMatbool

inverts the matrix

doFastbool

do a faster implementation if available.

Returns
scipy.sparse.csr_matrix

M, the inner product matrix (nF, nF)

InnerProducts.getFaceInnerProductDeriv(prop, doFast=True, invProp=False, invMat=False)[source]
Parameters
propnumpy.ndarray

material property (tensor properties are possible) at each cell center (nC, (1, 3, or 6))

doFast :

bool do a faster implementation if available.

invPropbool

inverts the material property

invMatbool

inverts the matrix

Returns
scipy.sparse.csr_matrix

dMdmu(u), the derivative of the inner product matrix for a certain u