Skip to content

[Multi-surface mode]#312

Draft
palatni wants to merge 12 commits into
adda-team:masterfrom
palatni:multi-surface
Draft

[Multi-surface mode]#312
palatni wants to merge 12 commits into
adda-team:masterfrom
palatni:multi-surface

Conversation

@palatni

@palatni palatni commented Jan 17, 2022

Copy link
Copy Markdown

Multi surface mode (work in progress)

initial commit
Comment thread src/const.h Outdated
Comment thread src/types.h Outdated
Comment thread src/types.h Outdated
Comment thread src/types.h Outdated
Comment thread src/types.h Outdated
Comment thread src/param.c
Comment thread src/param.c Outdated
Comment thread src/param.c Outdated
Comment thread src/param.c Outdated
Comment thread src/calculator.c Outdated
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 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

@myurkin myurkin left a comment

Copy link
Copy Markdown
Member

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

Comment thread src/param.c
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
Copy Markdown
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
@myurkin myurkin added comp-Logic Related to internal code logic and removed feature labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-Logic Related to internal code logic pri-Medium Worth assigning to a milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants