Skip to content

Commit

Permalink
rename DataIntegralProblem to SampledIntegralProblem
Browse files Browse the repository at this point in the history
  • Loading branch information
IlianPihlajamaa committed Sep 16, 2023
1 parent d3619db commit 124d3be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/SciMLBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ export solve, solve!, init, discretize, symbolic_discretize

export LinearProblem,
NonlinearProblem, IntervalNonlinearProblem,
IntegralProblem, DataIntegralProblem, OptimizationProblem
IntegralProblem, SampledIntegralProblem, OptimizationProblem

export DiscreteProblem, ImplicitDiscreteProblem
export SteadyStateProblem, SteadyStateSolution
Expand Down
10 changes: 5 additions & 5 deletions src/problems/basic_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Documentation Page: https://docs.sciml.ai/Integrals/stable/
## Mathematical Specification of a data Integral Problem
Data integral problems are defined as:
Sampled integral problems are defined as:
```math
\sum_i w_i y_i
Expand All @@ -413,7 +413,7 @@ assigned by a quadrature rule, which depend on sampling points `x`.
### Constructors
```
DataIntegralProblem(x::AbstractVector, y::AbstractArray; dim=1, kwargs...)
SampledIntegralProblem(x::AbstractVector, y::AbstractArray; dim=1, kwargs...)
```
- y: The sampled integrand, must be a subtype of `AbstractArray`.
It is assumed that the values of `y` along dimension `dim`
Expand All @@ -426,12 +426,12 @@ DataIntegralProblem(x::AbstractVector, y::AbstractArray; dim=1, kwargs...)
The fields match the names of the constructor arguments.
"""
struct DataIntegralProblem{Y, X, D, K} <: AbstractIntegralProblem{false}
struct SampledIntegralProblem{Y, X, D, K} <: AbstractIntegralProblem{false}
y::Y
x::X
dim::D
kwargs::K
@add_kwonly function DataIntegralProblem(y::AbstractArray, x::AbstractVector;
@add_kwonly function SampledIntegralProblem(y::AbstractArray, x::AbstractVector;
dim = 1,
kwargs...)
@assert dim <= ndims(y) "The integration dimension `dim` is larger than the number of dimensions of the integrand `y`"
Expand All @@ -441,7 +441,7 @@ struct DataIntegralProblem{Y, X, D, K} <: AbstractIntegralProblem{false}
end
end

TruncatedStacktraces.@truncate_stacktrace DataIntegralProblem 1 4
TruncatedStacktraces.@truncate_stacktrace SampledIntegralProblem 1 4

@doc doc"""
Expand Down
4 changes: 2 additions & 2 deletions test/function_building_error_messages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ IntegralProblem(intf, [0.0], [1.0], p)

x = [1.0, 2.0]
y = rand(2, 2)
DataIntegralProblem(y, x)
DataIntegralProblem(y, x; dim=2)
SampledIntegralProblem(y, x)
SampledIntegralProblem(y, x; dim=2)

# Optimization

Expand Down

0 comments on commit 124d3be

Please sign in to comment.