discretize.operators.InnerProducts

class discretize.operators.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(*args, **kwargs)

getEdgeInnerProduct has been deprecated.

getEdgeInnerProductDeriv(*args, **kwargs)

getEdgeInnerProductDeriv has been deprecated.

getFaceInnerProduct(*args, **kwargs)

getFaceInnerProduct has been deprecated.

getFaceInnerProductDeriv(*args, **kwargs)

getFaceInnerProductDeriv has been deprecated.

get_edge_inner_product([model, …])

Generate the edge inner product matrix

get_edge_inner_product_deriv(model[, …])

Parameters

get_face_inner_product([model, …])

Generate the face inner product matrix

get_face_inner_product_deriv(model[, …])

Parameters

Attributes

Methods

InnerProducts.getEdgeInnerProduct(*args, **kwargs)

getEdgeInnerProduct has been deprecated. See get_edge_inner_product for documentation

InnerProducts.getEdgeInnerProductDeriv(*args, **kwargs)

getEdgeInnerProductDeriv has been deprecated. See get_edge_inner_product_deriv for documentation

InnerProducts.getFaceInnerProduct(*args, **kwargs)

getFaceInnerProduct has been deprecated. See get_face_inner_product for documentation

InnerProducts.getFaceInnerProductDeriv(*args, **kwargs)

getFaceInnerProductDeriv has been deprecated. See get_face_inner_product_deriv for documentation

InnerProducts.get_edge_inner_product(model=None, invert_model=False, invert_matrix=False, do_fast=True, **kwargs)[source]

Generate the edge inner product matrix

Parameters
modelnumpy.ndarray

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

invert_modelbool

inverts the material property

invert_matrixbool

inverts the matrix

do_fastbool

do a faster implementation if available.

Returns
scipy.sparse.csr_matrix

M, the inner product matrix (nE, nE)

InnerProducts.get_edge_inner_product_deriv(model, do_fast=True, invert_model=False, invert_matrix=False, **kwargs)[source]
Parameters
modelnumpy.ndarray

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

do_fastbool

do a faster implementation if available.

invert_modelbool

inverts the material property

invert_matrixbool

inverts the matrix

Returns
scipy.sparse.csr_matrix

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

InnerProducts.get_face_inner_product(model=None, invert_model=False, invert_matrix=False, do_fast=True, **kwargs)[source]

Generate the face inner product matrix

Parameters
modelnumpy.ndarray

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

invert_modelbool

inverts the material property

invert_matrixbool

inverts the matrix

do_fastbool

do a faster implementation if available.

Returns
scipy.sparse.csr_matrix

M, the inner product matrix (nF, nF)

InnerProducts.get_face_inner_product_deriv(model, do_fast=True, invert_model=False, invert_matrix=False, **kwargs)[source]
Parameters
modelnumpy.ndarray

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

do_fast :

bool do a faster implementation if available.

invert_modelbool

inverts the material property

invert_matrixbool

inverts the matrix

Returns
scipy.sparse.csr_matrix

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