Skip to content
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

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

[Multi-surface mode] #312

wants to merge 12 commits into from

Conversation

palatni
Copy link

@palatni palatni commented Jan 17, 2022

Multi surface mode (work in progress)

initial commit
src/const.h Outdated Show resolved Hide resolved
src/types.h Outdated Show resolved Hide resolved
src/types.h Outdated Show resolved Hide resolved
src/types.h Outdated Show resolved Hide resolved
src/types.h Outdated Show resolved Hide resolved
src/param.c Show resolved Hide resolved
src/param.c Outdated Show resolved Hide resolved
src/param.c Outdated Show resolved Hide resolved
src/param.c Outdated Show resolved Hide resolved
src/calculator.c Outdated Show resolved Hide resolved
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
@myurkin myurkin marked this pull request as draft February 1, 2022 13:58
@myurkin myurkin self-assigned this Feb 1, 2022
@myurkin myurkin added the feature Allows new functionality label Feb 1, 2022
@myurkin myurkin added this to the 1.6 milestone Feb 1, 2022
@myurkin myurkin added the pri-Medium Worth assigning to a milestone label Feb 1, 2022
…ach new layer adds three arguments to the end. Also a number of minor textual changes.
@myurkin myurkin marked this pull request as ready for review February 14, 2022 08:08
@myurkin myurkin marked this pull request as draft February 14, 2022 08:28
Copy link
Member

@myurkin myurkin left a 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 "
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Allows new functionality pri-Medium Worth assigning to a milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants