Skip to content

integrate() does not respect boundary conditions #106

@jbphyswx

Description

@jbphyswx

Similar to #97 , integrate() does not respect spline boundary conditions

Example:

using Dierckx
FT = Float64

x = FT[0,1];
y = FT[1,1];

spl = Dierckx.Spline1D(x, y, k=1; bc="extrapolate");

int_0_1 = Dierckx.integrate(spl, 0.0, 1.0);
int_1_2 = Dierckx.integrate(spl, 1.0, 2.0);

@info "integrals" int_0_1 int_1_2

@info "spline" spl(1) spl(2)

yields

julia> @info "integrals" int_0_1 int_1_2
┌ Info: integrals
│   int_0_1 = 1.0
└   int_1_2 = 0.0

julia> @info "spline" spl(1) spl(2)
┌ Info: spline
│   spl(1) = 1.0
└   spl(2) = 1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions