-
Notifications
You must be signed in to change notification settings - Fork 62
Tests and examples for Bessel beams #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- removes redundant EOL in multi-line beam descriptions - fixes incorrect calculation of incident plane wave for grazing incidence in surface mode (when prop_z is on the order of 1e-16). For that the code was completely rewritten to specifically calculate potentially small quantities (e.g., expm1 instead of exp and rcp1=rc+1 instead of rc). Small tests indicate that - removes duplicate initialization of `prIncRefl` - mentions `vorticity` in instructions for adding new beam - in several places (when accounting for `beam_center`) `LinComb()` was replaced by `vSubtr()`. Other changes: - updates ignores in `comp2exec` so that all tests pass - fixes a typo in `suite_sparse` - adds functions `imExpM1()` and `cExpM1()` to `cmplx.h` - definitions of `prIncRelf` and `prIncTran` are now semi-global (only in `GenerateB.c` and `param.c`) - updates copyright year in `param.c`
commit 4575248ea7770093b9a2c12d4beb4c893704843b Author: stefaniagl <[email protected]> Date: Fri Feb 4 17:50:12 2022 +0700 minor changes commit 62be280 Author: stefaniagl <[email protected]> Date: Fri Feb 4 16:45:55 2022 +0700 New equiv tests + fixed TML bb commit 63c59c8 Author: stefaniagl <[email protected]> Date: Sat Jan 29 19:48:43 2022 +0300 New examples and paper graphs representation codes commit 5a6044d Author: stefaniagl <[email protected]> Date: Wed Jan 19 16:15:07 2022 +0700 minor changes commit 53918e6 Author: stefaniagl <[email protected]> Date: Wed Jan 19 15:52:55 2022 +0700 Added examples for Bessel beams commit 3e8591d Author: Maxim Yurkin <[email protected]> Date: Sun Jan 2 22:17:33 2022 +0700 Corrections in `GenerateB.c`: - removes redundant EOL in multi-line beam descriptions - fixes incorrect calculation of incident plane wave for grazing incidence in surface mode (when prop_z is on the order of 1e-16). For that the code was completely rewritten to specifically calculate potentially small quantities (e.g., expm1 instead of exp and rcp1=rc+1 instead of rc). Small tests indicate that - removes duplicate initialization of `prIncRefl` - mentions `vorticity` in instructions for adding new beam - in several places (when accounting for `beam_center`) `LinComb()` was replaced by `vSubtr()`. Other changes: - updates ignores in `comp2exec` so that all tests pass - fixes a typo in `suite_sparse` - adds functions `imExpM1()` and `cExpM1()` to `cmplx.h` - definitions of `prIncRelf` and `prIncTran` are now semi-global (only in `GenerateB.c` and `param.c`) - updates copyright year in `param.c` commit 3882a11 Author: stefaniagl <[email protected]> Date: Mon Dec 27 19:12:03 2021 +0700 Changed suite files commit ba33b01 Author: stefaniagl <[email protected]> Date: Wed Dec 22 21:01:53 2021 +0700 Minor changes in tests commit abfffed Author: stefaniagl <[email protected]> Date: Wed Dec 22 20:21:12 2021 +0700 Minor changes in tests commit f93a2ed Merge: 32eafa5 42bc5da Author: stefaniagl <[email protected]> Date: Wed Dec 22 15:02:23 2021 +0700 Merge remote-tracking branch 'upstream/master' commit 32eafa5 Author: stefaniagl <[email protected]> Date: Wed Dec 22 12:27:17 2021 +0700 Fixed compiling problem commit 9eb3a81 Merge: 20ee6df 7f5284b Author: stefaniagl <[email protected]> Date: Wed Dec 22 11:48:15 2021 +0700 Merge remote-tracking branch 'upstream/master' commit 20ee6df Author: Maxim Yurkin <[email protected]> Date: Sun Dec 19 14:21:59 2021 +0700 - corrects additional phase factor for Y-polarization of incident Bessel beams - corrects accounting for beam vorticity, when computing amplitude matrix (for scat_plane and scat_grid) - renames variables for Bessel beams to avoid confusion - slightly changes alignment in the code and descriptive string for Bessel beams - merges two cases for Bessel beams in InitBeam() into one - replaces several cexp(I*...) by imExp(...) - adds several TODO comments for further improvement - quick tests show that amplitude matrix remains invariant under 90-degree rotation for symmetric shapes (comparing commit 51aac9e Author: stefaniagl <[email protected]> Date: Wed Dec 15 19:55:31 2021 +0700 minor changes commit de78d36 Author: stefaniagl <[email protected]> Date: Wed Dec 15 16:25:45 2021 +0700 minor changes commit 5791530 Author: stefaniagl <[email protected]> Date: Wed Dec 15 16:21:26 2021 +0700 minor changes commit 4ea4e1a Author: stefaniagl <[email protected]> Date: Wed Dec 15 15:30:40 2021 +0700 minor changes commit f59da27 Author: stefaniagl <[email protected]> Date: Wed Dec 15 12:29:24 2021 +0700 minor changes commit 192db9b Author: stefaniagl <[email protected]> Date: Sat Dec 11 15:54:28 2021 +0700 minor changes commit c66f195 Author: Maxim Yurkin <[email protected]> Date: Tue Dec 7 10:20:24 2021 +0700 visible changes: - disables all code related to Bessel beams when NO_FORTRAN is used - edits a lot of help and information messages, including names of some Bessel beams types - beam center in laboratory reference frame is now specified always (even when at origin) - calculation of Cext through F(0) is now used only for default position of the plane wave - fixes processing of imaginary part of matrix M (for Bessel beams), by changing the type to doublecomplex - removes beam-center position in descriptive strings for beams (since it is printed separately in param.c) - plane wave in surface mode now works fine with -beam_center. Removes a lot of redundant code there (probably was used long ago for alternative calculation of Cext) minor/stylistic changes: - shortens define handles for Bessel beams - changes required number of subarguments for '-beam dipole' to UNDEF - moves beam_center below beam in lists of command line options (to be in alphabetical order) - renames use_beam_center and use_beam_subopt into beam_center_used and deprecated_bc_used, respectively - adds auxiliary function ScanDouble3Error() in param.c - removes redundant checks for number of arguments for most Bessel beam types - processing of deprecated specification of beam center as an argument to '-beam' is now in param.c - updates instructions for adding new beams - updates .gitignore - removes mentioning of eIncRefl[3],eIncTran[3] from crosssec.c - beam_center_0 is now defined in vars.c/h commit 1c4323e Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:46:01 2021 +0700 minor changes commit bede24c Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:42:36 2021 +0700 minor changes commit b2a40b0 Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:36:55 2021 +0700 minor changes commit 9d2dc6e Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:31:58 2021 +0700 Delete githash.h commit e0887a4 Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:30:30 2021 +0700 minor changes commit 736010c Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:29:13 2021 +0700 minor changes commit bad2a81 Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:23:26 2021 +0700 minor changes commit 3401982 Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:22:06 2021 +0700 minor changes commit 9b87dd4 Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:17:35 2021 +0700 minor changes commit 836fa5c Author: stefaniagl <[email protected]> Date: Sun Dec 5 16:15:18 2021 +0700 minor changes commit 84297f0 Author: stefaniagl <[email protected]> Date: Mon Nov 22 22:11:01 2021 +0700 minor changes commit 0f2143d Author: stefaniagl <[email protected]> Date: Fri Nov 12 14:39:54 2021 +0700 Delete .DS_Store commit 945f7a7 Author: stefaniagl <[email protected]> Date: Fri Nov 12 14:39:10 2021 +0700 trying to remove .DS_Store commit 2cc046f Author: stefaniagl <[email protected]> Date: Fri Nov 12 14:00:05 2021 +0700 Deleted misc files commit bc2963d Author: stefaniagl <[email protected]> Date: Thu Nov 11 13:45:17 2021 +0700 Extracted bessel ASD commit 1e58292 Author: stefaniagl <[email protected]> Date: Thu Nov 11 13:24:54 2021 +0700 Added negative orders of BBs commit 899eeb6 Author: stefaniagl <[email protected]> Date: Tue Nov 9 15:45:50 2021 +0700 minor changes commit 99523db Author: Stefania Glukhova <[email protected]> Date: Thu Sep 30 17:11:18 2021 +0700 Added vortex phase + minor changes Redefined a parallel polarization of BB taking into account its additional phase. commit 1df9ca2 Author: Stefania Glukhova <[email protected]> Date: Wed Aug 25 12:53:39 2021 +0700 Added -beam center commit 93df21c Author: Stefania Glukhova <[email protected]> Date: Wed Jul 21 01:09:19 2021 +0700 Command line changes commit 505dd45 Author: Stefania Glukhova <[email protected]> Date: Thu Jul 8 12:59:02 2021 +0700 Fixed some bugs commit d515d92 Author: Stefania Glukhova <[email protected]> Date: Thu Jul 1 15:59:49 2021 +0700 Fixed some problems commit 44cd648 Merge: 88f15bc 1016574 Author: Stefania Glukhova <[email protected]> Date: Tue Jun 29 17:06:15 2021 +0700 Merge branch 'master' of https://github.com/stefaniagl/adda commit 88f15bc Author: Stefania Glukhova <[email protected]> Date: Tue Jun 29 17:01:27 2021 +0700 Improved field expressions commit 25b9461 Author: Stefania Glukhova <[email protected]> Date: Tue Jun 29 12:50:13 2021 +0700 Added CS' type commit 1016574 Merge: 97852cd 61e931e Author: Stefania Glukhova <[email protected]> Date: Mon Jun 28 11:52:03 2021 +0700 Merge branch 'master' of https://github.com/stefaniagl/adda commit 97852cd Author: Stefania Glukhova <[email protected]> Date: Mon Jun 28 11:49:19 2021 +0700 minor fixes commit 61e931e Author: Stefania Glukhova <[email protected]> Date: Thu Apr 15 16:52:34 2021 +0700 Changed besselGen -> besselM commit 3fcc7c6 Author: Stefania Glukhova <[email protected]> Date: Wed Apr 7 23:31:54 2021 +0700 Fixed besselGen initialization commit 21b201d Merge: 597fd7f beb3d69 Author: Stefania Glukhova <[email protected]> Date: Wed Mar 31 19:07:48 2021 +0700 Merge remote-tracking branch 'upstream/master' commit 597fd7f Author: Stefania Glukhova <[email protected]> Date: Wed Mar 24 17:44:43 2021 +0700 Fixed beam description commit bb4f787 Author: Stefania Glukhova <[email protected]> Date: Thu Dec 24 13:15:06 2020 +0700 Removed ASD code commit 15d3f60 Author: Stefania Glukhova <[email protected]> Date: Wed Dec 23 18:43:50 2020 +0700 merging from upstream commit 8b49f8d Merge: 7dffe17 125ec57 Author: Stefania Glukhova <[email protected]> Date: Wed Dec 23 18:43:41 2020 +0700 Merge remote-tracking branch 'upstream/master' commit 7dffe17 Author: Stefania Glukhova <[email protected]> Date: Wed Dec 23 18:21:47 2020 +0700 fixing Makefiles commit 2958bf9 Author: Stefania Glukhova <[email protected]> Date: Wed Dec 23 17:18:50 2020 +0700 cleaning commit 51bfec3 Author: Stefania Glukhova <[email protected]> Date: Fri Sep 11 16:23:20 2020 +0700 Added Generalized BB commit f7238e1 Author: Stefania Glukhova <[email protected]> Date: Wed Jun 10 14:51:53 2020 +0700 Examined Bessel beams commit 0a7ff48 Author: Stefania Glukhova <[email protected]> Date: Wed Jun 10 14:49:21 2020 +0700 1 commit b5e2eb0 Author: Stefania Glukhova <[email protected]> Date: Wed Apr 1 22:50:34 2020 +0700 Log file parameters have been changed a bit for BBs commit 4ee2f85 Merge: 8e74216 5292e62 Author: stefanyagl <[email protected]> Date: Wed Mar 25 18:37:15 2020 +0700 Merge pull request #2 from stefanyagl/bessel_1 Added other BB types (trial version). commit 5292e62 Author: Stefania Glukhova <[email protected]> Date: Wed Mar 25 17:50:23 2020 +0700 Added other BB types (not tested) commit 8e74216 Merge: 56a22f3 3372bc2 Author: stefanyagl <[email protected]> Date: Tue Jun 11 21:27:06 2019 +0700 Merge pull request #1 from stefanyagl/stefanyagl-patch-1 Add files via upload commit 3372bc2 Author: stefanyagl <[email protected]> Date: Sun Jun 9 00:08:30 2019 +0700 Add files via upload Test version of Bessel beams implementation in ADDA
myurkin
reviewed
Feb 15, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just pushed some minor changes. Additionally the following need to be done:
- synchonize with current master
test/equiv/bessel
- move them to one folder above. Hence, merge corresponding README files.
- add more digits to the used pi constant (maybe use some built-in variable)
- try to make the output agree with smaller threshold, e.g., 1e-8
- hide ADDA output when running tests (direct it to /dev/null but make portable)
- further reduce output to stdout from the script itself, so only the essential information is given (like compared lines and whether the test passed)
- more detailed output would go only to results.txt (as now), but this file should be added to .gitignore (in the same folder)
examples/bessel/
- add some basic comments before "run_options = ...", so an user can play with it without referring to the manual
- all output files should be added to .gitignore (create the latter in this folder)
- the plot of incident field should be accurate in what is shown (now it is the squared amplitude)
- maybe add the specific command line for options 1 and 2 on top of the plot, so the latter would be self-contained
- add more description in README.md, including the common parameters of a simulation (like "wavelength-sized sphere"), which files are produced, and what is included in the graph. Use Markdown for formatting where appropriate.
examples/papers/
- update README.md with a short description similar to the already present for the WKBr (in the current master)
- rename folder bessel into 2022_bessel
- 2022_bessel/README.md should describe all files present in this folder (also see the WKBr example)
- it would be great to have a separate Python script for each of Figs. 12-15 from the paper (named by this figures). They can use some common script to not duplicate the code.
- improvements in README and comments - fixes the list of grids in fig14_extrapolation.py (and sets run=1 by default)
I have pushed some more corrections. Remaining issues are:
examples/papers/2022_bessel:
|
stefaniagl
added a commit
to stefaniagl/adda
that referenced
this pull request
Mar 29, 2022
commit 581bec6 Author: stefaniagl <[email protected]> Date: Tue Mar 29 00:03:24 2022 +0700 Bessel 0 (adda-team#315) Tests and examples for Bessel beams: - test using equivalent command line strings `tests/equiv/bb_equiv.py` - simple examples `examples/bessel` - scripts to reproduce 4 figures in a recent paper (submitted) Fixes a bug in TML type of Bessel beams. commit d7e6169 Author: Maxim Yurkin <[email protected]> Date: Mon Feb 21 23:35:49 2022 +0700 Makes the test for inconsistencies in the input shape format more sensitive. Detects extra number present in a line for ADDA formats (both single- and multi-domain). The formats themselves are now defines instead of static strings. commit 887a63c Author: Maxim Yurkin <[email protected]> Date: Mon Feb 21 14:48:46 2022 +0700 - All math constants are now given to 35 significant digits (was 32 in most places) - This includes the LDR constants (for which a separate calculation procedure was performed) - Improves a few related comments commit a993a91 Author: Maxim Yurkin <[email protected]> Date: Tue Feb 15 10:21:53 2022 +0700 - renames find_adda.sh into find_adda (and sets executable flag) - this script now returns ADDA path to stdout, hence does not need to be sourced (was a bad idea due to potential variables collision) - updates all calling scripts commit c8ea4ed Author: Maxim Yurkin <[email protected]> Date: Mon Jan 31 14:52:02 2022 +0700 minor formatting changes commit a6be5f4 Author: Maxim Yurkin <[email protected]> Date: Mon Jan 31 14:31:10 2022 +0700 - adds a special script to locate ADDA binaries (to be used by various examples). - updates existing examples in `examples/papers/2021_WKBr/` and `misc/near_field/` accordingly - other minor changes to `examples/papers/2021_WKBr/calc.sh` commit 2896575 Author: inzhevatkin <[email protected]> Date: Sun Jan 30 11:40:56 2022 +0700 WKBr scripts (adda-team#311) * Adds scripts to reproduce Figs.15 and 16 from paper (Inzhevatkin & Yurkin, 2022) * Includes general-purpose scripts to generate internal field in a sphere in the framework of the WKBr approximation (two modifications). * Also includes interface with Mie-theory calculations. Co-authored-by: Maxim Yurkin <[email protected]>
stefaniagl
added a commit
to stefaniagl/adda
that referenced
this pull request
Mar 29, 2022
commit 443f00a Author: Maxim Yurkin <[email protected]> Date: Tue Mar 29 13:34:30 2022 +0700 Minor changes in figure spacing commit 581bec6 Author: stefaniagl <[email protected]> Date: Tue Mar 29 00:03:24 2022 +0700 Bessel 0 (adda-team#315) Tests and examples for Bessel beams: - test using equivalent command line strings `tests/equiv/bb_equiv.py` - simple examples `examples/bessel` - scripts to reproduce 4 figures in a recent paper (submitted) Fixes a bug in TML type of Bessel beams. commit d7e6169 Author: Maxim Yurkin <[email protected]> Date: Mon Feb 21 23:35:49 2022 +0700 Makes the test for inconsistencies in the input shape format more sensitive. Detects extra number present in a line for ADDA formats (both single- and multi-domain). The formats themselves are now defines instead of static strings. commit 887a63c Author: Maxim Yurkin <[email protected]> Date: Mon Feb 21 14:48:46 2022 +0700 - All math constants are now given to 35 significant digits (was 32 in most places) - This includes the LDR constants (for which a separate calculation procedure was performed) - Improves a few related comments commit a993a91 Author: Maxim Yurkin <[email protected]> Date: Tue Feb 15 10:21:53 2022 +0700 - renames find_adda.sh into find_adda (and sets executable flag) - this script now returns ADDA path to stdout, hence does not need to be sourced (was a bad idea due to potential variables collision) - updates all calling scripts commit c8ea4ed Author: Maxim Yurkin <[email protected]> Date: Mon Jan 31 14:52:02 2022 +0700 minor formatting changes commit a6be5f4 Author: Maxim Yurkin <[email protected]> Date: Mon Jan 31 14:31:10 2022 +0700 - adds a special script to locate ADDA binaries (to be used by various examples). - updates existing examples in `examples/papers/2021_WKBr/` and `misc/near_field/` accordingly - other minor changes to `examples/papers/2021_WKBr/calc.sh` commit 2896575 Author: inzhevatkin <[email protected]> Date: Sun Jan 30 11:40:56 2022 +0700 WKBr scripts (adda-team#311) * Adds scripts to reproduce Figs.15 and 16 from paper (Inzhevatkin & Yurkin, 2022) * Includes general-purpose scripts to generate internal field in a sphere in the framework of the WKBr approximation (two modifications). * Also includes interface with Mie-theory calculations. Co-authored-by: Maxim Yurkin <[email protected]> commit 6c0b401 Merge: 49e6c23 deebdbf Author: Maxim Yurkin <[email protected]> Date: Tue Jan 11 19:11:38 2022 +0700 Merge branch 'master' of github.com:adda-team/adda commit 49e6c23 Author: Maxim Yurkin <[email protected]> Date: Tue Jan 11 19:09:51 2022 +0700 Updates extracting of gcc version in Makefile to be compatible with all possible configurations of gcc. commit deebdbf Author: stefaniagl <[email protected]> Date: Fri Jan 7 17:44:39 2022 +0700 Changes in tests (adda-team#310) - updates ignores in `comp2exec` so that all tests pass (after recent adda-team#304) - adds -beam_center to various lines in test suites * Corrections in `GenerateB.c`: - removes redundant EOL in multi-line beam descriptions - fixes incorrect calculation of incident plane wave for grazing incidence in surface mode (when prop_z is on the order of 1e-16). For that the code was completely rewritten to specifically calculate potentially small quantities (e.g., expm1 instead of exp and rcp1=rc+1 instead of rc). - removes duplicate initialization of `prIncRefl` - mentions `vorticity` in instructions for adding new beam - in several places (when accounting for `beam_center`) `LinComb()` was replaced by `vSubtr()`. * Other changes: - adds functions `imExpM1()` and `cExpM1()` to `cmplx.h` - definitions of `prIncRelf` and `prIncTran` are now semi-global (only in `GenerateB.c` and `param.c`) - updates copyright year in `param.c` Co-authored-by: Maxim Yurkin <[email protected]> commit 6a9ec2e Author: Maxim Yurkin <[email protected]> Date: Mon Jan 3 00:02:33 2022 +0700 adds ignoring of errors when getting commit hash (i.e. when compiling from downloaded source code, not from git repository)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added tests and examples of the usage of Bessel beams.
Related issues
Related to #209
Types of changes
Checklist
make seq
)NO_FORTRAN
orNO_CPP
preprocessor macros, respectively.README.md
in corresponding folders.make seq OPTIONS=DEBUG
, but betterdevtools/build_debug
) or they are discussed belowsh comp2exec seq
intests/2exec
, but betterdevtools/test_new [seq]
). If any errors appear, they are discussed below.tests/2exec
(and potentially new ignore patterns). In some cases, it is desirable to add new tests totests/equiv
.git diff
or, better, some GUI tool, to ensure that no unexpected changes are introduced.Further comments