discretize.operators.DiffOperators#

Inheritance diagram of DiffOperators
class discretize.operators.DiffOperators[source]#

Class used for creating differential and averaging operators.

DiffOperators is a class for managing the construction of differential and averaging operators at the highest level. The DiffOperator class is inherited by every discretize mesh class. In practice, differential and averaging operators are not constructed by creating instances of DiffOperators. Instead, the operators are constructed (and sometimes stored) when called as a property of the mesh.

Attributes

average_cell_to_edge

Averaging operator from cell centers to edges (scalar quantities).

average_cell_to_face

Averaging operator from cell centers to faces (scalar quantities).

average_cell_vector_to_face

Averaging operator from cell centers to faces (vector quantities).

average_edge_to_cell

Averaging operator from edges to cell centers (scalar quantities).

average_edge_to_cell_vector

Averaging operator from edges to cell centers (vector quantities).

average_edge_to_face

Averaging operator from edges to faces.

average_edge_x_to_cell

Averaging operator from x-edges to cell centers (scalar quantities).

average_edge_y_to_cell

Averaging operator from y-edges to cell centers (scalar quantities).

average_edge_z_to_cell

Averaging operator from z-edges to cell centers (scalar quantities).

average_face_to_cell

Averaging operator from faces to cell centers (scalar quantities).

average_face_to_cell_vector

Averaging operator from faces to cell centers (vector quantities).

average_face_x_to_cell

Averaging operator from x-faces to cell centers (scalar quantities).

average_face_y_to_cell

Averaging operator from y-faces to cell centers (scalar quantities).

average_face_z_to_cell

Averaging operator from z-faces to cell centers (scalar quantities).

average_node_to_cell

Averaging operator from nodes to cell centers (scalar quantities).

average_node_to_edge

Averaging operator from nodes to edges (scalar quantities).

average_node_to_face

Averaging operator from nodes to faces (scalar quantities).

boundary_edge_vector_integral

Integrate a vector function on the boundary.

boundary_face_scalar_integral

Represent the operation of integrating a scalar function on the boundary.

boundary_node_vector_integral

Integrate a vector function dotted with the boundary normal.

cellGrad

cellGrad has been deprecated.

cellGradBC

cellGradBC has been deprecated.

cellGradx

cellGradx has been deprecated.

cellGrady

cellGrady has been deprecated.

cellGradz

cellGradz has been deprecated.

cell_gradient

Cell gradient operator (cell centers to faces).

cell_gradient_BC

Boundary conditions matrix for the cell gradient operator (Deprecated).

cell_gradient_x

X-derivative operator (cell centers to x-faces).

cell_gradient_y

Y-derivative operator (cell centers to y-faces).

cell_gradient_z

Z-derivative operator (cell centers to z-faces).

edge_curl

Edge curl operator (edges to faces).

faceDivx

faceDivx has been deprecated.

faceDivy

faceDivy has been deprecated.

faceDivz

faceDivz has been deprecated.

face_divergence

Face divergence operator (faces to cell-centres).

face_x_divergence

X-derivative operator (x-faces to cell-centres).

face_y_divergence

Y-derivative operator (y-faces to cell-centres).

face_z_divergence

Z-derivative operator (z-faces to cell-centres).

nodal_gradient

Nodal gradient operator (nodes to edges).

nodal_laplacian

Nodal scalar Laplacian operator (nodes to nodes).

project_edge_to_boundary_edge

Projection matrix from all edges to boundary edges.

project_face_to_boundary_face

Projection matrix from all faces to boundary faces.

project_node_to_boundary_node

Projection matrix from all nodes to boundary nodes.

stencil_cell_gradient

Stencil for cell gradient operator (cell centers to faces).

stencil_cell_gradient_x

Differencing operator along x-direction (cell centers to x-faces).

stencil_cell_gradient_y

Differencing operator along y-direction (cell centers to y-faces).

stencil_cell_gradient_z

Differencing operator along z-direction (cell centers to z-faces).

Methods

cell_gradient_weak_form_robin([alpha, beta, ...])

Create Robin conditions pieces for weak form of the cell gradient operator (cell centers to faces).

edge_divergence_weak_form_robin([alpha, ...])

Create Robin conditions pieces for weak form of the edge divergence operator (edges to nodes).

getBCProjWF(*args, **kwargs)

getBCProjWF has been removed.

getBCProjWF_simple(*args, **kwargs)

getBCProjWF_simple has been removed.

get_BC_projections(BC[, discretization])

Create the weak form boundary condition projection matrices.

get_BC_projections_simple([discretization])

Create weak form boundary condition projection matrices for mixed boundary condition.

setCellGradBC(*args, **kwargs)

setCellGradBC has been removed.

set_cell_gradient_BC(BC)

Set boundary conditions for derivative operators acting on cell-centered quantities.

Galleries and Tutorials using discretize.operators.DiffOperators#

Operators: Cahn Hilliard

Operators: Cahn Hilliard

Plot Mirrored Cylindrically Symmetric Model

Plot Mirrored Cylindrically Symmetric Model

Basic Forward 2D DC Resistivity

Basic Forward 2D DC Resistivity

Basic: PlotImage

Basic: PlotImage

QuadTree: FaceDiv

QuadTree: FaceDiv

QuadTree: Hanging Nodes

QuadTree: Hanging Nodes

Plotting: Streamline thickness

Plotting: Streamline thickness

Overview of Mesh Types

Overview of Mesh Types

Tensor meshes

Tensor meshes

Cylindrical meshes

Cylindrical meshes

Tree Meshes

Tree Meshes

Averaging Matricies

Averaging Matricies

Differential Operators

Differential Operators

Basic Inner Products

Basic Inner Products

Constitutive Relations

Constitutive Relations

Differential Operators

Differential Operators

Advanced Examples

Advanced Examples

Gauss’ Law of Electrostatics

Gauss' Law of Electrostatics

Advection-Diffusion Equation

Advection-Diffusion Equation

Nodal Dirichlet Poisson solution

Nodal Dirichlet Poisson solution