Skip to content

Commit

Permalink
fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Dec 4, 2024
1 parent 5d7bbbd commit 0c480dd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion finat/point_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class UnknownPointSet(AbstractPointSet):
shape (D,) and free indices for the points N."""

def __init__(self, points_expr):
"""Build a PointSingleton from a gem expression for a single point.
r"""Build a PointSingleton from a gem expression for a single point.
:arg points_expr: A ``gem.Variable`` expression representing a
vector of N points in D dimensions. Should have shape (N, D)
Expand Down
6 changes: 4 additions & 2 deletions finat/tensor_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def productise(factors, method):


def compose_permutations(factors):
"""For the :class:`TensorProductElement` object composed of factors,
r"""For the :class:`TensorProductElement` object composed of factors,
construct, for each dimension tuple, for each entity, and for each possible
entity orientation combination, the DoF permutation list.
Expand All @@ -236,7 +236,8 @@ def compose_permutations(factors):
For tensor-product elements, one needs to consider two kinds of orientations:
extrinsic orientations and intrinsic ("material") orientations.
Example:
Example
-------
UFCQuadrilateral := UFCInterval x UFCInterval
Expand Down Expand Up @@ -286,6 +287,7 @@ def compose_permutations(factors):
(1, 0, 1): [2, 0, 3, 1],
(1, 1, 0): [1, 3, 0, 2],
(1, 1, 1): [3, 1, 2, 0]}}}
"""
permutations = {}
cells = [fe.cell for fe in factors]
Expand Down
16 changes: 8 additions & 8 deletions finat/ufl/finiteelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ def __init__(self,
variant=None):
"""Create finite element.
Args:
family: The finite element family
cell: The geometric cell
degree: The polynomial degree (optional)
form_degree: The form degree (FEEC notation, used when field is
viewed as k-form)
quad_scheme: The quadrature scheme (optional)
variant: Hint for the local basis function variant (optional)
:arg family: The finite element family
:arg cell: The geometric cell
:arg degree: The polynomial degree (optional)
:arg form_degree: The form degree (FEEC notation, used when field is
viewed as k-form)
:arg quad_scheme: The quadrature scheme (optional)
:arg variant: Hint for the local basis function variant (optional)
"""
# Note: Unfortunately, dolfin sometimes passes None for
# cell. Until this is fixed, allow it:
Expand Down
2 changes: 1 addition & 1 deletion gem/gem.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Terminal(Node):

@property
def dtype(self):
"""dtype of the node.
"""Data type of the node.
We only need to set dtype (or _dtype) on terminal nodes, and
other nodes inherit dtype from their children.
Expand Down

0 comments on commit 0c480dd

Please sign in to comment.