NEllipsoid

Class which is used to implement N dimensional ellipsoids.

NEllipsoid

Bases: domain

Class for solving purely spatial problems on N dimensional ellipsoids

__init__(dim, center, semilengths)

Constructor for class

Parameters:
  • dim (int) –

    Spatial dimension of domain.

  • center (list) –

    Center of ellipsoid in list for, e.g, [0, 0].

  • semilengths (list) –

    semi-axi lengths of ellipsoid, e.g, [1, 1].

isInside(point)

Parameters:
  • point (list) –

    Point in spatial dimensions of the ellipsoid

Returns:
  • bool

    True if point is interior to the ellipsoid, False otherwise

onBoundary(point)

Parameters:
  • point (list) –

    Point in spatial dimensions of the ellipsoid

Returns:
  • bool

    True if point is on the boundary of the ellipsoid, False otherwise

sampleBoundary(n_bc)

Samples boundary of ellipsoid

Parameters:
  • n_bc (int) –

    Number of points to sample in the boundary.

Returns:
  • tensor

    Sampled boundary points.

sampleDomain(n_clp)

Samples interior of ellipsoid

Parameters:
  • n_clp (int) –

    Number of points to sample in the interior of the ellipsoid.

Returns:
  • tensor

    Sampled interior points.