discretize.base.BaseRegularMesh.nodal_laplacian#

property BaseRegularMesh.nodal_laplacian#

Nodal scalar Laplacian operator (nodes to nodes).

This property constructs the 2nd order scalar Laplacian operator that maps from nodes to nodes. The operator is a sparse matrix Ln that can be applied as a matrix-vector product to a discrete scalar quantity ϕ that lives on the nodes, i.e.:

laplace_phi = Ln @ phi

The operator * assumes a zero Neumann boundary condition for the discrete scalar quantity. Once constructed, the operator is stored permanently as a property of the mesh.

Returns:
(n_nodes, n_nodes) scipy.sparse.csr_matrix

The numerical Laplacian operator from nodes to nodes

Notes

In continuous space, the scalar Laplacian operator is defined as:

ψ=2ϕ=2ϕx2+2ϕy2+2ϕz2

Where ϕ is the discrete representation of the continuous variable ϕ on the nodes, and ψ is the discrete representation of its scalar Laplacian on the nodes, nodal_laplacian constructs a discrete linear operator Ln such that:

ψ=Lnϕ