OperatorBC

OperatorBC#

class pinnx.icbc.OperatorBC(func, on_boundary=<function OperatorBC.<lambda>>)[source]#

General operator boundary conditions: func(inputs, outputs) = 0.

Parameters:

Warning

If you use X in func, then do not set num_test when you define pinnx.problem.PDE or pinnx.problem.TimePDE, otherwise DeepXDE would throw an error. In this case, the training points will be used for testing, and this will not affect the network training and training loss. This is a bug of DeepXDE, which cannot be fixed in an easy way for all backends.

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

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