Skip to content

Commit

Permalink
Update operator.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraDysis committed Feb 23, 2025
1 parent 02c539d commit 49fa0d7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/fdm/operator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ end
end
end

"""
fdm_operator(::Type{TF}, derivative_order::Integer, accuracy_order::Integer, dx::TF) -> FiniteDifferenceOperator{TF}
Create a finite difference operator with specified derivative and accuracy orders.
# Arguments
- `TF`: The element type of the operator
- `derivative_order::Integer`: The order of the derivative
- `accuracy_order::Integer`: The order of accuracy
- `dx::TF`: The grid spacing
"""
function fdm_operator(
::Type{TF}, derivative_order::Integer, accuracy_order::Integer, dx::TF
) where {TF<:AbstractFloat}
Expand All @@ -61,6 +72,17 @@ function fdm_operator(
)
end

"""
fdm_dissipation_operator(::Type{TF}, dissipation_order::Integer, σ::TF, dx::TF) -> FiniteDifferenceOperator{TF}
Create a finite difference dissipation operator with specified dissipation order.
# Arguments
- `TF`: The element type of the operator
- `dissipation_order::Integer`: The order of the dissipation operator
- `σ::TF`: The dissipation coefficient
- `dx::TF`: The grid spacing
"""
function fdm_dissipation_operator(
::Type{TF}, dissipation_order::Integer, σ::TF, dx::TF
) where {TF<:AbstractFloat}
Expand Down

0 comments on commit 49fa0d7

Please sign in to comment.