porepy.numerics.fem.rt0 module

class RT0(keyword)[source]

Bases: DualElliptic

Parameters

keyword (str) –

discretize(sd, data)[source]

Discretize a second order elliptic equation using a RT0-P0 method.

We assume the following two sub-dictionaries to be present in the data dictionary:

parameter_dictionary, storing all parameters.

Stored in data[pp.PARAMETERS][self.keyword].

matrix_dictionary, for storage of discretization matrices.

Stored in data[pp.DISCRETIZATION_MATRICES][self.keyword]

deviation_from_plane_tol: The geometrical tolerance, used in the check to

rotate 2d and 1d grids.

parameter_dictionary contains the entries:
second_order_tensor: (pp.SecondOrderTensor) Permeability defined

cell-wise. This is the effective permeability, including any aperture scalings etc.

matrix_dictionary will be updated with the following entries:
mass: sps.csc_matrix (sd.num_faces, sd.num_faces)

The mass matrix.

div: sps.csc_matrix (sd.num_cells, sd.num_faces)

The divergence matrix.

Optional parameter:

is_tangential: Whether the lower-dimensional permeability tensor has been

rotated to the fracture plane. Defaults to False and stored in the data dictionary.

Parameters
Return type

None

static faces_to_cell(pt, coord, f_centers, f_normals, dim, R)[source]

Construct a local matrix that evaluate a RT0 solution in a give point (cell center).

Parameters

pt: the point where to evaluate the field, usually cell center coord: the vertices of the simplex f_centers: the centre of the faces ordered following coord f_normals: the normal of the faces ordered as f_centers dim: the spatial dimension

Parameters
Return type

ndarray

static massHdiv(inv_K, c_volume, coord, sign, dim, HB)[source]

Compute the local mass Hdiv matrix using the mixed vem approach.

Parameters

Kndarray (sd.dim, sd.dim)

Permeability of the cell.

c_volumescalar

Cell volume.

signarray (num_faces_of_cell)

+1 or -1 if the normal is inward or outward to the cell.

Return

out: ndarray (num_faces_of_cell, num_faces_of_cell)

Local mass Hdiv matrix.

Parameters
Return type

ndarray