-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Multi-surface mode] #312
base: master
Are you sure you want to change the base?
[Multi-surface mode] #312
Conversation
initial commit
minor improvements and fixes
fixed a comment
# Conflicts: # src/GenerateB.c # src/crosssec.c # src/interaction.c # src/vars.c # src/vars.h
further merge fix
…ach new layer adds three arguments to the end. Also a number of minor textual changes.
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 added one more comment (related to the existing one) and have just pushed a few corrections. The latter also replaces spaces with tabs in indents in some places (where I noticed).
But please check all your code additions for that (this may require changing the settings in your IDE). Also, please do not use space after commas in function arguments
if (ReflRelation==(enum refl)UNDEF) ReflRelation = msubInf ? GR_IMG : GR_SOM; | ||
else if (msubInf && ReflRelation!=GR_IMG) PrintError("For perfectly reflecting surface interaction is always " | ||
if (ReflRelation==(enum refl)UNDEF) ReflRelation = sub.mInf ? GR_IMG : GR_SOM; | ||
else if (sub.mInf && ReflRelation!=GR_IMG) PrintError("For perfectly reflecting surface interaction is always " |
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.
When you change this one, the help string for -int_surf should also be updated.
Added a function to calculate fresnel coefficients in the case of two-layer substrate. Added corresponding corrections for plane beam generation.
The procedure of generalized fresnel coefficients calculation in crossec.c is changed. Added minor code improvements and comments.
In SubstrateFresnel function "restrict" keyword is replaced with "const" for destination pointers: NULL could be passed multiple times to the function and cause UB.
Generalized Fresnel coefficients were redefined and supplied with libcheck unit tests. Added initial files for creation of python wrappers of ADDA functions
Tested the calculation of the incidence field and scattered field in the case of a multi-layer substrate.
added full support for calculations with a two-layer substrate by the image method
Multi surface mode (work in progress)