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

Random improvements #92

Merged
merged 4 commits into from
Jun 24, 2021
Merged

Random improvements #92

merged 4 commits into from
Jun 24, 2021

Conversation

jmaglic
Copy link
Member

@jmaglic jmaglic commented Jun 23, 2021

Adds minor improvements to the code. Some light restructuring for clarity.

jmaglic and others added 4 commits June 18, 2021 11:00
The function "generateChemicalFormula()" that was previously a method of
the Model class was rewritten. It is now slightly shorter and no longer
part of Model. These changes aim to improve readability. Previously the
function took no arguments, so the input and output was obscured. With
this change, the function has a return value and input arguments. Hence,
when the function is called in generateVolumeData(), it is clear where
the output is stored.

The scope of the function has also been limited, because it was only
called once. Therefore, it is not necessary to have the function be
available to the entire Model class. The function declaration has been
placed before the definition of generateVolumeData().
Changes have been made to the chain of functions that were called in
order to begin the type assignment algorithm. Previously, there was a
long chain of functions that were called in sequence.

runCalculation() calls generateData() calls generateVolumeData() calls
calcVolume(), and only then is the function called that begins the type
assignment. This is somewhat confusing. The contents of calcVolume()
have been moved to generateVolumeData(). The part of
generateVolumeData() that was tasked with making preparations for the
calculation has been placed in a separate function.
One "L" was missing in supercell.
@jmaglic jmaglic requested a review from rlavendomme June 23, 2021 14:32
@rlavendomme rlavendomme merged commit 6d4782f into master Jun 24, 2021
@jmaglic jmaglic deleted the random-improvements branch June 24, 2021 16:14
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