discretize.base.BaseRectangularMesh#

Inheritance diagram of BaseRectangularMesh
class discretize.base.BaseRectangularMesh(shape_cells, origin=None, orientation=None, reference_system=None, **kwargs)[source]#

Base rectangular mesh class for the discretize package.

The BaseRectangularMesh class acts as an extension of the BaseRegularMesh classes with a regular structure.

Attributes

area

area has been deprecated.

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_vector

Averaging operator from edges to faces (vector 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_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).

axis_u

Deprecated since version 0.7.0.

axis_v

Deprecated since version 0.7.0.

axis_w

Deprecated since version 0.7.0.

boundary_edge_vector_integral

Represents the operation of integrating a vector function on the boundary

boundary_edges

Boundary edge locations

boundary_face_outward_normals

Outward normal vectors of boundary faces

boundary_face_scalar_integral

Represents the operation of integrating a scalar function on the boundary

boundary_faces

Boundary face locations

boundary_node_vector_integral

Represents the operation of integrating a vector function dotted with the boundary normal

boundary_nodes

Boundary node locations

cell_centers

Return gridded cell center locations

cell_volumes

Return cell volumes

dim

The dimension of the mesh (1, 2, or 3).

edge

edge has been deprecated.

edgeCurl

edgeCurl has been deprecated.

edge_curl

Edge curl operator (edges to faces)

edge_lengths

Returns the lengths of all edges in the mesh

edge_tangents

Unit tangent vectors for all mesh edges

edges

Gridded edge locations

faceDiv

faceDiv has been deprecated.

face_areas

Returns the areas of all faces in the mesh

face_divergence

Face divergence operator (faces to cell-centres)

face_normals

Unit normal vectors for all mesh faces

faces

Gridded face locations

nCx

Number of cells in the x direction

nCy

Number of cells in the y direction

nCz

Number of cells in the z direction

nNx

Number of nodes in the x-direction

nNy

Number of nodes in the y-direction

nNz

Number of nodes in the z-direction

n_cells

Total number of cells in the mesh.

n_edges

Total number of edges in the mesh

n_edges_per_direction

The number of edges in each direction

n_edges_x

Number of x-edges in the mesh

n_edges_y

Number of y-edges in the mesh

n_edges_z

Number of z-edges in the mesh

n_faces

Total number of faces in the mesh

n_faces_per_direction

The number of faces in each axis direction

n_faces_x

Number of x-faces in the mesh

n_faces_y

Number of y-faces in the mesh

n_faces_z

Number of z-faces in the mesh

n_nodes

Total number of nodes in the mesh

nodalGrad

nodalGrad has been deprecated.

nodalLaplacian

nodalLaplacian has been deprecated.

nodal_gradient

Nodal gradient operator (nodes to edges)

nodal_laplacian

Nodal scalar Laplacian operator (nodes to nodes)

nodes

Return gridded node locations

normals

normals has been deprecated.

orientation

Rotation matrix defining mesh axes relative to Cartesian

origin

Origin or 'anchor point' of the mesh

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.

reference_is_rotated

Indicates whether mesh uses standard coordinate axes

reference_system

Coordinate reference system

rotation_matrix

Alias for orientation

shape_cells

The number of cells in each coordinate direction.

shape_edges_x

Number of x-edges along each axis direction

shape_edges_y

Number of y-edges along each axis direction

shape_edges_z

Number of z-edges along each axis direction

shape_faces_x

Number of x-faces along each axis direction

shape_faces_y

Number of y-faces along each axis direction

shape_faces_z

Number of z-faces along each axis direction

shape_nodes

Returns the number of nodes along each axis direction

stencil_cell_gradient

Stencil for cell gradient operator (cell centers to faces)

tangents

tangents has been deprecated.

vol

vol has been deprecated.

x0

An alias for the origin

Methods

closest_points_index(locations[, grid_loc, ...])

Find the indicies for the nearest grid location for a set of points.

copy()

Make a copy of the current mesh

deserialize(items, **kwargs)

Create this mesh from a dictionary of attributes

equals(other_mesh)

Compares current mesh with another mesh to determine if they are identical

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.

getInterpolationMat(*args, **kwargs)

getInterpolationMat has been deprecated.

get_edge_inner_product([model, ...])

Generate the edge inner product matrix or its inverse.

get_edge_inner_product_deriv(model[, ...])

Function handle to multiply vector with derivative of edge inner product matrix (or its inverse).

get_face_inner_product([model, ...])

Generate the face inner product matrix or its inverse.

get_face_inner_product_deriv(model[, ...])

Function handle to multiply vector with derivative of face inner product matrix (or its inverse).

get_interpolation_matrix(loc[, ...])

Construct linear interpolation matrix from mesh

point2index(locs)

Finds cells that contain the given points.

projectEdgeVector(*args, **kwargs)

projectEdgeVector has been deprecated.

projectFaceVector(*args, **kwargs)

projectFaceVector has been deprecated.

project_edge_vector(edge_vectors)

Project vectors to the edges of the mesh.

project_face_vector(face_vectors)

Project vectors onto the faces of the mesh.

r(*args, **kwargs)

r has been deprecated.

reshape(x[, x_type, out_type, format])

General reshape method for tensor quantities

save([file_name, verbose])

Save the mesh to json

serialize()

An alias for to_dict()

to_dict()

Representation of the mesh's attributes as a dictionary

validate()

Return the validation state of the mesh

Galleries and Tutorials using discretize.base.BaseRectangularMesh#

Operators: Cahn Hilliard

Operators: Cahn Hilliard

Operators: Cahn Hilliard
Plot Mirrored Cylindrically Symmetric Model

Plot Mirrored Cylindrically Symmetric Model

Plot Mirrored Cylindrically Symmetric Model
Basic Forward 2D DC Resistivity

Basic Forward 2D DC Resistivity

Basic Forward 2D DC Resistivity
Basic: PlotImage

Basic: PlotImage

Basic: PlotImage
Plotting: Streamline thickness

Plotting: Streamline thickness

Plotting: Streamline thickness
Overview of Mesh Types

Overview of Mesh Types

Overview of Mesh Types
Tensor meshes

Tensor meshes

Tensor meshes
Cylindrical meshes

Cylindrical meshes

Cylindrical meshes
Averaging Matricies

Averaging Matricies

Averaging Matricies
Differential Operators

Differential Operators

Differential Operators
Basic Inner Products

Basic Inner Products

Basic Inner Products
Constitutive Relations

Constitutive Relations

Constitutive Relations
Differential Operators

Differential Operators

Differential Operators
Advanced Examples

Advanced Examples

Advanced Examples
Gauss' Law of Electrostatics

Gauss’ Law of Electrostatics

Gauss' Law of Electrostatics
Advection-Diffusion Equation

Advection-Diffusion Equation

Advection-Diffusion Equation