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

Analysis Refactoring - Part 2 #1795

Merged
merged 121 commits into from Mar 11, 2024
Merged

Analysis Refactoring - Part 2 #1795

merged 121 commits into from Mar 11, 2024

Conversation

jws-1
Copy link
Member

@jws-1 jws-1 commented Feb 11, 2024

This PR continues work towards #1769, following on from #1789.

Addresses the following:

  • Refactor angle
  • Add angle system test
  • Refactor axisAngle
  • Add axisAngle system test
  • Refactor dAngle

@jws-1 jws-1 marked this pull request as ready for review March 3, 2024 15:15
@jws-1 jws-1 requested a review from trisyoungs March 4, 2024 09:47
Copy link
Member

@trisyoungs trisyoungs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More fine work - the positive difference in readability between the two still makes me very happy!

src/analyser/dataNormaliser2D.cpp Outdated Show resolved Hide resolved
src/analyser/dataNormaliser2D.h Outdated Show resolved Hide resolved
Comment on lines +107 to +110
// Normalise by A site population
dAxisAngleNormaliser.normaliseDivide(double(a.sites().size()));
// Normalise by B site population density
dAxisAngleNormaliser.normaliseDivide(double(b.sites().size()) / targetConfiguration_->box()->volume());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at all these uses of the DataNormaliserND classes it feels more and more like we should rename them to reflect what they are actually doing, and that is (for the most part) just "operating" on data. Normalisation to a value or to spherical shell are specific examples of operations, but normaliseDivide is actually just divide in reality. As a follow-on issue I'd suggest we do a rename of the classes to DataOperatorND which can contain both the specific functions (e.g. normaliseTo and normaliseBySphericalShell) as well as generics like divide() and multiply().

src/modules/dAngle/process.cpp Outdated Show resolved Hide resolved
src/analyser/dataExporter.h Show resolved Hide resolved
jws-1 and others added 3 commits March 11, 2024 15:34
@jws-1 jws-1 merged commit 8e13ca7 into develop Mar 11, 2024
10 checks passed
@jws-1 jws-1 deleted the dev-analysis-02 branch March 11, 2024 22:08
rhinoella pushed a commit that referenced this pull request Apr 2, 2024
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
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.

None yet

2 participants