PDEOperatorCartesianProd#

class pinnx.problem.PDEOperatorCartesianProd(geometry, pde, constraints, function_space, evaluation_points, num_function, function_variables=None, num_test=None, approximator=None, solution=None, num_domain=0, num_boundary=0, num_initial=0, num_fn_test=None, train_distribution='Hammersley', anchors=None, exclusions=None, loss_fn='MSE', loss_weights=None, batch_size=None)[source]#

PDE solution operator with problem in the format of Cartesian product.

Parameters:
  • pde (Callable[[Any, Any, Any], Any]) – Instance of pinnx.problem.PDE or pinnx.problem.TimePDE.

  • function_space (FunctionSpace) – Instance of pinnx.problem.FunctionSpace.

  • evaluation_points – A NumPy array of shape (n_points, dim). Discretize the input function sampled from function_space using pointwise evaluations at a set of points as the input of the branch net.

  • num_function (int) – The number of functions for training.

  • function_variables (Optional[Sequence[int]]) – None or a list of integers. The functions in the function_space may not have the same domain as the PDE. For example, the PDE is defined on a spatio-temporal domain (x, t), but the function is IC, which is only a function of x. In this case, we need to specify the variables of the function by function_variables=[0], where 0 indicates the first variable x. If None, then we assume the domains of the function and the PDE are the same.

  • num_test (int) – The number of functions for testing PDE loss. The testing functions for BCs/ICs are the same functions used for training. If None, then the training functions will be used for testing.

  • batch_size (int) – Integer or None.

train_x#

A tuple of two Numpy arrays (v, x) fed into PIDeepONet for training. v is the function input to the branch net and has the shape (N1, dim1); x is the point input to the trunk net and has the shape (N2, dim2).

test()[source]#

Return a test dataset.

train_next_batch(batch_size=None)[source]#

Return a training dataset of the size batch_size.