PDEOperator#

class pinnx.problem.PDEOperator(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)[source]#

PDE solution operator.

Parameters:
  • function_space (FunctionSpace) – Instance of pinnx.fnspace.FunctionSpace.

  • evaluation_points – A NumPy array of shape (n_points, dim). Discretize the input function sampled from function_space using point-wise 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_fn_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.

resample_train_points(pde_points=True, bc_points=True)[source]#

Resample the training points for the operator.

test()[source]#

Return a test dataset.

train_next_batch(batch_size=None)[source]#

Return a training dataset of the size batch_size.