Interface IBoundaryCondition<T>
- Namespace
- AiDotNet.PhysicsInformed.Interfaces
- Assembly
- AiDotNet.dll
Defines boundary conditions for a PDE problem.
public interface IBoundaryCondition<T>
Type Parameters
TThe numeric type.
Remarks
For Beginners: Boundary conditions specify what happens at the edges of your problem domain. For example, in a heat equation, you might specify the temperature at the boundaries of a rod. Common types:
- Dirichlet: The value is specified at the boundary (e.g., temperature = 100°C)
- Neumann: The derivative is specified at the boundary (e.g., heat flux = 0, meaning insulated)
- Robin: A combination of value and derivative
Properties
Name
Gets the name of the boundary (e.g., "Left Wall", "Top Edge").
string Name { get; }
Property Value
Methods
ComputeBoundaryResidual(T[], T[], PDEDerivatives<T>)
Computes the boundary condition residual. For a perfect solution, this should be zero at all boundary points.
T ComputeBoundaryResidual(T[] inputs, T[] outputs, PDEDerivatives<T> derivatives)
Parameters
inputsT[]The boundary point coordinates.
outputsT[]The predicted solution at the boundary.
derivativesPDEDerivatives<T>The derivatives at the boundary (needed for Neumann/Robin conditions).
Returns
- T
The boundary residual (should be zero for a perfect solution).
IsOnBoundary(T[])
Determines if a point is on the boundary.
bool IsOnBoundary(T[] inputs)
Parameters
inputsT[]The coordinates to check.
Returns
- bool
True if the point is on the boundary.