GeometryXTime#

class pinnx.geometry.GeometryXTime(geometry, timedomain)[source]#
boundary_normal(x)[source]#

Compute the unit normal at x for Neumann or Robin boundary conditions.

Parameters:

x – A 2D array of shape (n, dim), where n is the number of points and dim is the dimension of the geometry.

inside(x)[source]#

Check if x is inside the geometry (including the boundary).

Parameters:

x – A 2D array of shape (n, dim), where n is the number of points and dim is the dimension of the geometry.

Returns:

A boolean array of shape (n,) where each element is True if the point is inside the geometry.

on_boundary(x)[source]#

Check if x is on the geometry boundary.

Parameters:

x – A 2D array of shape (n, dim), where n is the number of points and dim is the dimension of the geometry.

Returns:

A boolean array of shape (n,) where each element is True if the point is on the boundary.

periodic_point(x, component)[source]#

Compute the periodic image of x for periodic boundary condition.

Parameters:
  • x – A 2D array of shape (n, dim), where n is the number of points and dim is the dimension of the geometry.

  • component – The component of the periodic direction.

random_boundary_points(n, random='pseudo')[source]#

Compute the random point locations on the boundary.

random_points(n, random='pseudo')[source]#

Compute the random point locations in the geometry.

Parameters:
  • n – The number of points.

  • random – The random distribution. One of the following: “pseudo” (pseudorandom), “LHS” (Latin hypercube sampling), “Halton” (Halton sequence), “Hammersley” (Hammersley sequence), or “Sobol” (Sobol sequence

uniform_boundary_points(n)[source]#

Uniform boundary points on the spatio-temporal domain.

Geometry surface area ~ bbox. Time surface area ~ diam.

uniform_points(n, boundary=True)[source]#

Uniform points on the spatio-temporal domain.

Geometry volume ~ bbox. Time volume ~ diam.