Function1s::Table: slight improvement to integration with outOfBounds repeat

This commit is contained in:
Henry Weller
2023-06-22 15:28:27 +01:00
parent 3d95d179ea
commit 6f38550879

View File

@ -243,8 +243,7 @@ Type Foam::Function1s::Table<Type>::integral
{
const scalar t0 = values_.first().first();
const scalar t1 = values_.last().first();
const scalar dt = t1 - t0;
const label n = floor((x2 - x1 - (bx2 - bx1))/dt);
const label n = floor(((x2 - x1) - (bx2 - bx1))/(t1 - t0) + 0.5);
if (n != 0)
{