pihnn.bc.dirichlet_neumann_bc#
- class pihnn.bc.dirichlet_neumann_bc#
Bases:
scalar_bc
Dirichlet-Neumann boundary condition:
\[u=u_d, \nabla u \cdot n= u_n,\]where \(u\) is the solution, \(n\) is the outward normal vector and \(u_d,u_n\) are the assigned RHS values.To be used for the biharmonic problem.- __call__(z, u, normal, rhs)#
Calculate residual of the boundary condition.
- Parameters:
z (
torch.tensor
) – Coordinates of the points where the BC is evaluated.u (
torch.tensor
) – Solution evaluated at the ‘z’ coordinates.normal (
torch.tensor
) – Boundary outward normal vectors at the ‘z’ coordinates.rhs (
torch.tensor
) – Boundary condition RHS assigned value at the ‘z’ coordinates.
- Returns:
error (
torch.tensor
) - Residual of the boundary condition at the ‘z’ coordinates.