pymor.discretizers.builtin.grids.referenceelements
¶
Module Contents¶
- 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.
Methods
Coordinates of the barycenter.
Return the diameter after transformation.
Return quadrature points and weights.
Return quadrature information.
Number of subentities of codimension
codim
.Returns the reference element of the codim-
codim
subentities.Return subentities.
Return subentity embedding.
retval[e]
is the unit outer-normal vector to the codim-1 subentity with indexe
.- 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)
whereP
is an array of quadrature points with corresponding weightsW
.The quadrature is of order
order
or hasnpoints
integration points.
- quadrature_info()[source]¶
Return quadrature information.
Returns a tuple of dicts
(O, N)
whereO[quadrature_type]
is a list of orders which are implemented forquadrature_type
andN[quadrature_type]
is a list of the corresponding numbers of integration points.
- 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 thej
-th codim-subentity_codim
subentity of thei
-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)
andsub_reference_element(subentity_codim - 1).subentity_embedding(1)
choosing always the superentity with smallest index.
- 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.
Methods
Coordinates of the barycenter.
Return the diameter after transformation.
Return quadrature points and weights.
Return quadrature information.
Number of subentities of codimension
codim
.Returns the reference element of the codim-
codim
subentities.Return subentities.
Return subentity embedding.
retval[e]
is the unit outer-normal vector to the codim-1 subentity with indexe
.- 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)
whereP
is an array of quadrature points with corresponding weightsW
.The quadrature is of order
order
or hasnpoints
integration points.
- quadrature_info()[source]¶
Return quadrature information.
Returns a tuple of dicts
(O, N)
whereO[quadrature_type]
is a list of orders which are implemented forquadrature_type
andN[quadrature_type]
is a list of the corresponding numbers of integration points.
- 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 thej
-th codim-subentity_codim
subentity of thei
-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)
andsub_reference_element(subentity_codim - 1).subentity_embedding(1)
choosing always the superentity with smallest index.
- 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.
Methods
Coordinates of the barycenter.
Return the diameter after transformation.
Return quadrature points and weights.
Return quadrature information.
Number of subentities of codimension
codim
.Returns the reference element of the codim-
codim
subentities.Return subentities.
Return subentity embedding.
retval[e]
is the unit outer-normal vector to the codim-1 subentity with indexe
.- 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)
whereP
is an array of quadrature points with corresponding weightsW
.The quadrature is of order
order
or hasnpoints
integration points.
- quadrature_info()[source]¶
Return quadrature information.
Returns a tuple of dicts
(O, N)
whereO[quadrature_type]
is a list of orders which are implemented forquadrature_type
andN[quadrature_type]
is a list of the corresponding numbers of integration points.
- 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 thej
-th codim-subentity_codim
subentity of thei
-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)
andsub_reference_element(subentity_codim - 1).subentity_embedding(1)
choosing always the superentity with smallest index.
- 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.
Methods
Coordinates of the barycenter.
Return the diameter after transformation.
Return quadrature points and weights.
Return quadrature information.
Number of subentities of codimension
codim
.Returns the reference element of the codim-
codim
subentities.Return subentities.
Return subentity embedding.
retval[e]
is the unit outer-normal vector to the codim-1 subentity with indexe
.- 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)
whereP
is an array of quadrature points with corresponding weightsW
.The quadrature is of order
order
or hasnpoints
integration points.
- quadrature_info()[source]¶
Return quadrature information.
Returns a tuple of dicts
(O, N)
whereO[quadrature_type]
is a list of orders which are implemented forquadrature_type
andN[quadrature_type]
is a list of the corresponding numbers of integration points.
- 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 thej
-th codim-subentity_codim
subentity of thei
-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)
andsub_reference_element(subentity_codim - 1).subentity_embedding(1)
choosing always the superentity with smallest index.