PeriodicBC#

class pinnx.icbc.PeriodicBC(component_y, component_x, on_boundary=<function PeriodicBC.<lambda>>, derivative_order=0)[source]#

Periodic boundary conditions.

Parameters:
  • component_y (str) – The component of the output.

  • component_x (str) – The component of the input.

  • on_boundary (Callable[[Dict[str, Union[Array, ndarray, bool, number, bool, int, float, complex, Quantity]], array], array]) – (x, Geometry.on_boundary(x)) -> True/False.

  • derivative_order (int) – The order of the derivative. Can be 0 or 1.

collocation_points(X)[source]#

Return the collocation points for boundary conditions.

Parameters:

X – Collocation points.

Returns:

Collocation points for boundary conditions.

error(bc_inputs, bc_outputs, **kwargs)[source]#

Returns the loss for each component at the initial or boundary conditions.