Skip to content
ForCADDocumentation

normalize_rational_basis Interface

public interface normalize_rational_basis

Normalize polynomial values and optional gradients over a supplied weight list. Used for element-local weights by the existing low-level basis interfaces.


Module Procedures

private pure subroutine normalize_rational_basis_tensor(basis, weights, gradient)

Apply R=Q/W and R_,a=(Q_,a-R*W_,a)/W with exact radix-power scaling. Values scale the weighted contributions, so inactive large weights cannot erase endpoint interpolation. Derivatives retain their common weight gauge. Values and gradient rows must match the finite positive weight list. A zero denominator or invalid shape/weights produces zero outputs.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: basis(:)
real(kind=rk), intent(in) :: weights(:)
real(kind=rk), intent(inout), optional :: gradient(:,:)

private pure subroutine normalize_rational_basis_curve(basis, weights, gradient)

View a curve gradient as one column, sharing the tensor calculation without a copy.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: basis(:)
real(kind=rk), intent(in) :: weights(:)
real(kind=rk), intent(inout), target :: gradient(:)