[go: up one dir, main page]

Menu

#92 Functor improvements

0.5 goal
open
nobody
None
nobody
2024-04-01
2017-04-23
Ulf Lorenz
No

Note: Strong overlap with [#191]

The functors are currently lacking in several respects. This issue should simplify the use of them.

As it has turned out, there are two main uses for functors. One is initial wave functions, where a grid is supplied as input and a one-dimensional wave function returned. The other is supplying a value or a tensor and returning another value/tensor e.g. for a time-dependent coefficient or a potential.

These use-cases are currently separated and should be joined. also, some common functors are missing. For that, the following changes should be done:

  • Put all functors in a common directory (functor).
  • Every functor takes a double and returns a double or a cdouble. Clients, such as Potential1D do not supply a tensor to the functor, but operate on every single tensor element.
  • add missing functors. In particular, there is no Gaussian() yet. Preferably one that can deal with rms width and half-width.
  • There are some different but similar functors, e.g., Interval1D and Rectangular is almost the same

Related

Tickets: #191

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2020-01-01
    • Milestone: Backlog --> 0.4 goal
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-06-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,9 +2,8 @@
    
     As it has turned out, there are two main uses for functors. One is initial wave functions, where a grid is supplied as input and a one-dimensional wave function returned. The other is supplying a value or a tensor and returning another value/tensor e.g. for a time-dependent coefficient or a potential.
    
    -While the handling of initial states is special and has to remain so, the other two use-cases are currently separated and should be joined. also, some common functors are missing. For that, the following changes should be done:
    +These use-cases are currently separated and should be joined. also, some common functors are missing. For that, the following changes should be done:
    
    -* Put all functors except the state functors in a common directory (functor).
    +* Put all functors in a common directory (functor).
     * Every functor takes a double and returns a double or a cdouble. Clients, such as Potential1D do not supply a tensor to the functor, but operate on every single tensor element.
     * add missing functors. In particular, there is no Gaussian() yet. Preferably one that can deal with rms width and half-width.
    -* For the state generators, interpolation (no longer) exists. Add it there. Is it possible to create overlap with normal functors in that the StateBuilder takes either a functor that converts a grid into an initial state or a functor that converts a double into an initial state?
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-06-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,3 +7,4 @@
     * Put all functors in a common directory (functor).
     * Every functor takes a double and returns a double or a cdouble. Clients, such as Potential1D do not supply a tensor to the functor, but operate on every single tensor element.
     * add missing functors. In particular, there is no Gaussian() yet. Preferably one that can deal with rms width and half-width.
    +* There are some different but similar functors, e.g., Interval1D and Rectangular is almost the same
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-06-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +Note: Strong overlap with [#191]
    +
     The functors are currently lacking in several respects. This issue should simplify the use of them.
    
     As it has turned out, there are two main uses for functors. One is initial wave functions, where a grid is supplied as input and a one-dimensional wave function returned. The other is supplying a value or a tensor and returning another value/tensor e.g. for a time-dependent coefficient or a potential.
    
     

    Related

    Tickets: #191


Log in to post a comment.