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

Print cleed output using only Python functions #47

Merged
merged 10 commits into from
Aug 7, 2024

Conversation

yakutovicha
Copy link
Member

No description provided.

@yakutovicha
Copy link
Member Author

I started to observe certain stochasticity in the results of the CLEED simulation. Running the same input several times might lead to different results. At first, I thought the problem came from those lines I changed in the PR:

From this:

            if( ((beams_all+i_beams_all)->ind_1 == (beams_now+i_beams_now)->ind_1) && ((beams_all+i_beams_all)->ind_2 == (beams_now+i_beams_now)->ind_2)  )
            {
                if ((beams_now+i_beams_now)->k_par <= k_r)
                {
                    if(Int->rel[i_beams_now + 1] > INT_TOLERANCE)
                        beam_intensities[i_beams_all] = Int->rel[i_beams_now + 1];
                    else
                        beam_intensities[i_beams_all] = 0.;
                }
                else
                    beam_intensities[i_beams_all] = 0.;
                break;
            } /* if index = index */

To this:

            if( ((beams_all+i_beams_all)->ind_1 == (beams_now+i_beams_now)->ind_1) && ((beams_all+i_beams_all)->ind_2 == (beams_now+i_beams_now)->ind_2)  )
            {
                if (((beams_now+i_beams_now)->k_par <= k_r) && (Int->rel[i_beams_now + 1] > INT_TOLERANCE))
                    beam_intensities[i_beams_all] = Int->rel[i_beams_now + 1];
                else
                    beam_intensities[i_beams_all] = 0.;
                break;
            }

Unfortunately, this is not the case. After reverting the change the issue persists. The next thing is to try to understand whether the problem was present before this PR.

@yakutovicha yakutovicha requested a review from GeorgHeld August 6, 2024 09:29
@GeorgHeld
Copy link
Collaborator

GeorgHeld commented Aug 6, 2024 via email

@yakutovicha yakutovicha merged commit 6292204 into main Aug 7, 2024
7 checks passed
@yakutovicha yakutovicha deleted the update/return-beam-intencities-from-leed-function branch August 7, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants