-
Notifications
You must be signed in to change notification settings - Fork 55
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
Snake case consistency #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two tiny clarifications, but LGTM 🐍
idx, Timer::Duration(Timer::Now() - t0).count()); | ||
|
||
// Form and solve the linear system for a prescribed current on the specified source. | ||
Mpi::Print("\n"); | ||
A[step].SetSize(RHS.Size()); | ||
A[step].UseDevice(true); | ||
A[step] = 0.0; | ||
curlcurlop.GetExcitationVector(idx, RHS); | ||
curlcurl_op.GetExcitationVector(idx, RHS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not curl_curl_op
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could go either way on this really but curlcurl
seemed OK as a variable name. The big gain is separating op
from the core subject.
S_ij *= std::exp(1i * src_data.kn0 * src_data.d_offset); | ||
S_ij *= std::exp(1i * data.kn0 * data.d_offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the convention (which I agree with), is not snake once within a subscript _
. Namely, not S_i_j
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, double subscripts make more sense to me, S_i_j
reads S
-sub-i
-sub-j
which is different than S_ij
. S_ij
is closer to how you'd actually write it in tex.
650aae4
to
ce06cfa
Compare
f3eab2e
to
f4998ea
Compare
69ef14a
to
fb91f0f
Compare
f4998ea
to
e285f87
Compare
e285f87
to
9903742
Compare
We have slowly moved towards consistent use of snake case across all variable naming, especially in the higher level classes and functions where variable names are longer and more descriptive. Though not explicitly enforced in the developer documentation or in PR reviews, this PR goes through some old code and updates variable names to be match the guidance.
The same change is also made for some output variables, namely the field names in the ParaView visualization files.
One name left unchanged is
iodata
, which could/should be renamed toio_data
. I didn't have particular feelings either way, but if changing it is preferable I can make that change here as well.Note: Based on #240