-
Notifications
You must be signed in to change notification settings - Fork 31
Quad spin push #1219
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
base: development
Are you sure you want to change the base?
Quad spin push #1219
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
| using namespace amrex::literals; // for _prt | ||
|
|
||
| // Compute quaternion coefficients | ||
| amrex::ParticleReal angle = std::sqrt(lambdax*lambdax+lambday*lambday+lambdaz*lambdaz); |
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.
Can the angle ever be zero (e.g., for m_k == 0)?
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.
Yes, it can. I handle that case in lines 55-57 below.
Co-authored-by: Axel Huebl <[email protected]>
src/elements/Quad.H
Outdated
| */ | ||
| template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t> | ||
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | ||
| void operator() ( |
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.
Change to a named function.
This PR adds the update of the spin vector in a (linear) Quad element.
This relies on PR#1226.