pihnn.geometries.circle#

class pihnn.geometries.circle(center, radius, bc_type, bc_value=0, order=1, ref_loc='center', check_consistency=True, on_boundary=True, sampling_ratio=None)#

Bases: arc

Circle defined as:

\[\gamma:=\{z \in \mathbb{C}: z= c + re^{i\theta}, \theta \in [0,2\pi)\},\]

where \(c\in\mathbb{C}\) is the center of the circle and \(r\in\mathbb{R}\) the radius.

Parameters:
  • center (complex / list with size 2 / torch.tensor with size 2) – Center of the circle.

  • radius (float) – Radius of the circle.

  • bc_type (str) – Type of boundary condition to assign to the curve (see above).

  • bc_value (callable / complex) – Values assigned at the boundary condition. It can be either a constant or a variable value defined through a function.

  • order (float) – Order of sampling refinement at the edges, 1 for no refinement (uniform distribution). For example, if the curve is \([0,1]\) and we want to refine on the right side, then the sampled points are distributed as \(u^{1/order}\), where \(u \sim \mathcal{U}(0,1)\) and \(order\ge1\).

  • ref_loc (str) – Where to apply refinement. ‘center’ for symmetric refinement (i.e., both edges), ‘start’ only at the first edge and ‘end’ only at the second edge.

  • check_consistency (bool) – If False, the current curve is excluded from the pihnn.geometries.boundary.check_consistency() check.

  • on_boundary (bool) – Set to False if the current curve is not really part of the domain boundary.

  • sampling_ratio (float) – Number of sampled points on the curve with respect to the total sampled points on the boundary. By default, it’s the ratio between the curve length and the boundary perimeter.