pymor.discretizers.builtin.grids.referenceelements

Module Contents

Classes

Point

Defines a reference element.

Line

Defines a reference element.

Square

Defines a reference element.

Triangle

Defines a reference element.

Attributes

point

line

square

triangle

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

size(self, codim)[source]

Number of subentities of codimension codim.

subentities(self, codim, subentity_codim)[source]

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(self, subentity_codim)[source]

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.

sub_reference_element(self, codim)[source]

Returns the reference element of the codim-codim subentities.

unit_outer_normals(self)[source]

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

center(self)[source]

Coordinates of the barycenter.

mapped_diameter(self, A)[source]

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

quadrature_info(self)[source]

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.

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

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.

pymor.discretizers.builtin.grids.referenceelements.point[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

size(self, codim)[source]

Number of subentities of codimension codim.

subentities(self, codim, subentity_codim)[source]

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(self, subentity_codim)[source]

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.

sub_reference_element(self, codim)[source]

Returns the reference element of the codim-codim subentities.

unit_outer_normals(self)[source]

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

center(self)[source]

Coordinates of the barycenter.

mapped_diameter(self, A)[source]

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

quadrature_info(self)[source]

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.

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

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.

pymor.discretizers.builtin.grids.referenceelements.line[source]
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

size(self, codim)[source]

Number of subentities of codimension codim.

subentities(self, codim, subentity_codim)[source]

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(self, subentity_codim)[source]

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.

sub_reference_element(self, codim)[source]

Returns the reference element of the codim-codim subentities.

unit_outer_normals(self)[source]

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

center(self)[source]

Coordinates of the barycenter.

mapped_diameter(self, A)[source]

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

quadrature_info(self)[source]

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.

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

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.

pymor.discretizers.builtin.grids.referenceelements.square[source]
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

size(self, codim)[source]

Number of subentities of codimension codim.

subentities(self, codim, subentity_codim)[source]

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(self, subentity_codim)[source]

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.

sub_reference_element(self, codim)[source]

Returns the reference element of the codim-codim subentities.

unit_outer_normals(self)[source]

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

center(self)[source]

Coordinates of the barycenter.

mapped_diameter(self, A)[source]

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

quadrature_info(self)[source]

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.

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

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.

pymor.discretizers.builtin.grids.referenceelements.triangle[source]