-
Notifications
You must be signed in to change notification settings - Fork 155
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
Feature/regionwise gammaLL #315
Open
jsampaio
wants to merge
10
commits into
mumax:3.11
Choose a base branch
from
jsampaio:feature/regionwiseGammaLL
base: 3.11
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2bd3b7f
Update constants.h
jsampaio 7351b86
Update lltorque.go
jsampaio 2ca7693
Update zhangli.go
jsampaio df28acd
Update zhangli2.cu
jsampaio 1673553
Update temperature.go
jsampaio 6da8633
Update temperature2.cu
jsampaio 9410315
Create scalegamma.cu
jsampaio 7476804
Update torque.go
jsampaio 9c3eb92
Update temperature.go
jsampaio c8334b2
Update zhangli.go
jsampaio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "amul.h" | ||
#include "float3.h" | ||
#include <stdint.h> | ||
|
||
// scale torque by scalar parameter GammaFactor | ||
extern "C" __global__ void | ||
scalegamma(float* __restrict__ tx, float* __restrict__ ty, float* __restrict__ tz, | ||
float* __restrict__ scalegamma_, float scalegamma_mul, int N) { | ||
|
||
int i = ( blockIdx.y*gridDim.x + blockIdx.x ) * blockDim.x + threadIdx.x; | ||
if (i < N) { | ||
float gammaf = amul(scalegamma_, scalegamma_mul,i); | ||
tx[i] = tx[i]*gammaf; | ||
ty[i] = ty[i]*gammaf; | ||
tz[i] = tz[i]*gammaf; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this new calculation of
PREFACTOR
correct?The only place where
PREFACTOR
is used is a bit further in this file, where it is now divided byg
. As far as I understand it,g
should be 1 by default, so shouldPREFACTOR
then not stay the same?The previous factor
MUB/GAMMA0 == 5.27082077425405e-35
but the new factorHBAR == 1.05457173e-34
.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.
Hi Jonathan,
I think you're right... The only place where this
PREFACTOR
is used is on line ~41, which is changed(-)
float b = invMs * PREFACTOR / (1.0f + xi*xi);
(+)
float b = invMs * PREFACTOR / (g*(1.0f + xi*xi));
So, the new value of
PREFACTOR
should be the old one times the default value ofg
(which is 1.), and not twice its value.I think the problem came about because initially (and in the code I use) I defined g as the physical Landé g-factor (=2.00 by default) and removed the parameter
GammaLL
. In this case, the newPREFACTOR
should indeed be twice the old value. This definition makes much more sense, asg
would be the physical well-known g-factor, but breaks the backwards compatibility in scripts that use the parameterGammaLL
. I think I might have mixed the files when uploading this change, and I'm surprised it wasn't caught in the validation tests...~~ João