JuliaApproximation / JuliaApproximation/ContinuumArrays.jl

Boundary conditions in axes?

Open
#20 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
31
Forks
6
Avg merge
9d 22h
Merged PRs (30d)
2

Description

EDIT: This was my original motivation, see next post for a more generalized take on the problem.

The Schrödinger equation in spherical coordinates

image

is singular at the origin. The solution has to obey the following boundary conditions:

image

In finite-differences, it is common to adjust the upper-left corner of the derivative matrices for \ell = 0 to implement this and preserve the convergence order (see refs below). I wonder how I could accomplish this with ContinuumArrays.jl, namely I wish to dispatch an expression like

R = ...
D = Derivative(axes(R,1))
Δ = R'D'D*R

correctly such that I get the correct boundary conditions? One idea could be to introduce

abstract type AbstractDerivative{T} <: LazyQuasiMatrix{T} end

struct Derivative{T,D} <: AbstractDerivative{T}
    axis::Inclusion{T,D}
end
...

# Then I could have my own type
struct SingularDerivative{T} <: AbstractDerivative{T}
    axis::Inclusion{T,D}
end
  • If R is aware of SingularDerivative
    • If \ell == 0, apply correction
    • Else, return uncorrected matrix
  • If R is not aware of SingularDerivative, proceed as normal

The problem with this approach is that suddenly all basis libraries will need to dispatch on AbstractDerivative.

A better alternative would of course be if I could somehow attach boundary conditions to the derivative operator:

D = Derivative(axes(R,1), :singular, :regular)

Are there better approaches?

References

  • Schafer, K. J., Gaarde, M. B., Kulander, K. C., Sheehy, B., &
    DiMauro, L. F. (2000). Calculations of strong field multiphoton
    processes in alkali metal atoms. AIP Conference Proceedings, 525(1),
    45–58. http://dx.doi.org/10.1063/1.1291925

  • Schafer, K. J. (2009). Numerical methods in strong field physics. In
    T. Brabec (Eds.), (pp. 111–145). : Springer.

  • Muller, H. G. (1999). An Efficient Propagation Scheme for the
    Time-Dependent Schrödinger equation in the Velocity Gauge. Laser
    Physics, 9(1), 138–148.

  • Patchkovskii, S., & Muller, H. (2016). Simple, accurate, and
    efficient implementation of 1-electron atomic time-dependent
    Schrödinger equation in spherical coordinates. Computer Physics
    Communications, 199(nil),
    153–169. http://dx.doi.org/10.1016/j.cpc.2015.10.014

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the definitions of Derivative, LazyQuasiMatrix, Inclusion, and the axes(R, 1) usage described in the issue, then inspect how basis libraries currently dispatch on derivative operators. The issue does not name files or tests; done would require an agreed design and documented behavior for singular boundary conditions without forcing every basis library to add bespoke dispatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.