pymor.discretizers.builtin.grids.referenceelements

Module Contents

pymor.discretizers.builtin.grids.referenceelements.line[source]
pymor.discretizers.builtin.grids.referenceelements.point[source]
pymor.discretizers.builtin.grids.referenceelements.square[source]
pymor.discretizers.builtin.grids.referenceelements.triangle[source]
class pymor.discretizers.builtin.grids.referenceelements.Line[source]

Bases: pymor.discretizers.builtin.grids.interfaces.ReferenceElement

Defines a reference element.

All reference elements have the property that all subentities of a given codimension are of the same type. I.e. a three-dimensional reference element cannot have triangles and rectangles as faces at the same time.

dim[source]

The dimension of the reference element

volume[source]

The volume of the reference element

Methods

center

Coordinates of the barycenter.

mapped_diameter

Return the diameter after transformation.

quadrature

Return quadrature points and weights.

quadrature_info

Return quadrature information.

size

Number of subentities of codimension codim.

sub_reference_element

Returns the reference element of the codim-codim subentities.

subentities

Return subentities.

subentity_embedding

Return subentity embedding.

unit_outer_normals

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

center()[source]

Coordinates of the barycenter.

mapped_diameter(A)[source]

Return the diameter after transformation.

The diameter of the reference element after transforming it with the matrix A (vectorized).

quadrature(order=None, npoints=None, quadrature_type='default')[source]

Return quadrature points and weights.

Returns tuple (P, W) where P is an array of quadrature points with corresponding weights W.

The quadrature is of order order or has npoints integration points.

quadrature_info()[source]

Return quadrature information.

Returns a tuple of dicts (O, N) where O[quadrature_type] is a list of orders which are implemented for quadrature_type and N[quadrature_type] is a list of the corresponding numbers of integration points.

size(codim)[source]

Number of subentities of codimension codim.

sub_reference_element(codim)[source]

Returns the reference element of the codim-codim subentities.

subentities(codim, subentity_codim)[source]

Return subentities.

subentities(c,sc)[i,j] is, with respect to the indexing inside the reference element, the index of the j-th codim-subentity_codim subentity of the i-th codim-codim subentity of the reference element.

subentity_embedding(subentity_codim)[source]

Return subentity embedding.

Returns a tuple (A, B) which defines the embedding of the codim-subentity_codim subentities into the reference element.

For subentity_codim > 1', the embedding is by default given recursively via `subentity_embedding(subentity_codim - 1) and sub_reference_element(subentity_codim - 1).subentity_embedding(1) choosing always the superentity with smallest index.

unit_outer_normals()[source]

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

class pymor.discretizers.builtin.grids.referenceelements.Point[source]

Bases: pymor.discretizers.builtin.grids.interfaces.ReferenceElement

Defines a reference element.

All reference elements have the property that all subentities of a given codimension are of the same type. I.e. a three-dimensional reference element cannot have triangles and rectangles as faces at the same time.

dim[source]

The dimension of the reference element

volume[source]

The volume of the reference element

Methods

center

Coordinates of the barycenter.

mapped_diameter

Return the diameter after transformation.

quadrature

Return quadrature points and weights.

quadrature_info

Return quadrature information.

size

Number of subentities of codimension codim.

sub_reference_element

Returns the reference element of the codim-codim subentities.

subentities

Return subentities.

subentity_embedding

Return subentity embedding.

unit_outer_normals

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

center()[source]

Coordinates of the barycenter.

mapped_diameter(A)[source]

Return the diameter after transformation.

The diameter of the reference element after transforming it with the matrix A (vectorized).

quadrature(order=None, npoints=None, quadrature_type='default')[source]

Return quadrature points and weights.

Returns tuple (P, W) where P is an array of quadrature points with corresponding weights W.

The quadrature is of order order or has npoints integration points.

quadrature_info()[source]

Return quadrature information.

Returns a tuple of dicts (O, N) where O[quadrature_type] is a list of orders which are implemented for quadrature_type and N[quadrature_type] is a list of the corresponding numbers of integration points.

size(codim)[source]

Number of subentities of codimension codim.

sub_reference_element(codim)[source]

Returns the reference element of the codim-codim subentities.

subentities(codim, subentity_codim)[source]

Return subentities.

subentities(c,sc)[i,j] is, with respect to the indexing inside the reference element, the index of the j-th codim-subentity_codim subentity of the i-th codim-codim subentity of the reference element.

subentity_embedding(subentity_codim)[source]

Return subentity embedding.

Returns a tuple (A, B) which defines the embedding of the codim-subentity_codim subentities into the reference element.

For subentity_codim > 1', the embedding is by default given recursively via `subentity_embedding(subentity_codim - 1) and sub_reference_element(subentity_codim - 1).subentity_embedding(1) choosing always the superentity with smallest index.

unit_outer_normals()[source]

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

class pymor.discretizers.builtin.grids.referenceelements.Square[source]

Bases: pymor.discretizers.builtin.grids.interfaces.ReferenceElement

Defines a reference element.

All reference elements have the property that all subentities of a given codimension are of the same type. I.e. a three-dimensional reference element cannot have triangles and rectangles as faces at the same time.

dim[source]

The dimension of the reference element

volume[source]

The volume of the reference element

Methods

center

Coordinates of the barycenter.

mapped_diameter

Return the diameter after transformation.

quadrature

Return quadrature points and weights.

quadrature_info

Return quadrature information.

size

Number of subentities of codimension codim.

sub_reference_element

Returns the reference element of the codim-codim subentities.

subentities

Return subentities.

subentity_embedding

Return subentity embedding.

unit_outer_normals

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

center()[source]

Coordinates of the barycenter.

mapped_diameter(A)[source]

Return the diameter after transformation.

The diameter of the reference element after transforming it with the matrix A (vectorized).

quadrature(order=None, npoints=None, quadrature_type='default')[source]

Return quadrature points and weights.

Returns tuple (P, W) where P is an array of quadrature points with corresponding weights W.

The quadrature is of order order or has npoints integration points.

quadrature_info()[source]

Return quadrature information.

Returns a tuple of dicts (O, N) where O[quadrature_type] is a list of orders which are implemented for quadrature_type and N[quadrature_type] is a list of the corresponding numbers of integration points.

size(codim)[source]

Number of subentities of codimension codim.

sub_reference_element(codim)[source]

Returns the reference element of the codim-codim subentities.

subentities(codim, subentity_codim)[source]

Return subentities.

subentities(c,sc)[i,j] is, with respect to the indexing inside the reference element, the index of the j-th codim-subentity_codim subentity of the i-th codim-codim subentity of the reference element.

subentity_embedding(subentity_codim)[source]

Return subentity embedding.

Returns a tuple (A, B) which defines the embedding of the codim-subentity_codim subentities into the reference element.

For subentity_codim > 1', the embedding is by default given recursively via `subentity_embedding(subentity_codim - 1) and sub_reference_element(subentity_codim - 1).subentity_embedding(1) choosing always the superentity with smallest index.

unit_outer_normals()[source]

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

class pymor.discretizers.builtin.grids.referenceelements.Triangle[source]

Bases: pymor.discretizers.builtin.grids.interfaces.ReferenceElement

Defines a reference element.

All reference elements have the property that all subentities of a given codimension are of the same type. I.e. a three-dimensional reference element cannot have triangles and rectangles as faces at the same time.

dim[source]

The dimension of the reference element

volume[source]

The volume of the reference element

Methods

center

Coordinates of the barycenter.

mapped_diameter

Return the diameter after transformation.

quadrature

Return quadrature points and weights.

quadrature_info

Return quadrature information.

size

Number of subentities of codimension codim.

sub_reference_element

Returns the reference element of the codim-codim subentities.

subentities

Return subentities.

subentity_embedding

Return subentity embedding.

unit_outer_normals

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.

center()[source]

Coordinates of the barycenter.

mapped_diameter(A)[source]

Return the diameter after transformation.

The diameter of the reference element after transforming it with the matrix A (vectorized).

quadrature(order=None, npoints=None, quadrature_type='default')[source]

Return quadrature points and weights.

Returns tuple (P, W) where P is an array of quadrature points with corresponding weights W.

The quadrature is of order order or has npoints integration points.

quadrature_info()[source]

Return quadrature information.

Returns a tuple of dicts (O, N) where O[quadrature_type] is a list of orders which are implemented for quadrature_type and N[quadrature_type] is a list of the corresponding numbers of integration points.

size(codim)[source]

Number of subentities of codimension codim.

sub_reference_element(codim)[source]

Returns the reference element of the codim-codim subentities.

subentities(codim, subentity_codim)[source]

Return subentities.

subentities(c,sc)[i,j] is, with respect to the indexing inside the reference element, the index of the j-th codim-subentity_codim subentity of the i-th codim-codim subentity of the reference element.

subentity_embedding(subentity_codim)[source]

Return subentity embedding.

Returns a tuple (A, B) which defines the embedding of the codim-subentity_codim subentities into the reference element.

For subentity_codim > 1', the embedding is by default given recursively via `subentity_embedding(subentity_codim - 1) and sub_reference_element(subentity_codim - 1).subentity_embedding(1) choosing always the superentity with smallest index.

unit_outer_normals()[source]

retval[e] is the unit outer-normal vector to the codim-1 subentity with index e.