-
Notifications
You must be signed in to change notification settings - Fork 4
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
Mb/charge exchange kernel new #205
base: main
Are you sure you want to change the base?
Conversation
…ast. Ready for momentum conservation test to be constructed
inline void compute(int step) { | ||
if (momentum_recording_step > 0) { | ||
if (step % momentum_recording_step == 0) { | ||
const double momentum_particles_0 = this->compute_particle_momentum_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.
Guessing these should be calls to get_initial_*
and the calls to get_initial_*
should in turn call compute_initial_*
and/or call the compute methods in some setup/constructor.
NESO_PARTICLES_KERNEL_START | ||
const INT cellx = NESO_PARTICLES_KERNEL_CELL; | ||
const INT layerx = NESO_PARTICLES_KERNEL_LAYER; | ||
|
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 wouldn't store momentum when we have mass and velocity already stored on the particles. Unless we need momentum in enough places to amortise the cost of the extra data movement.
|
||
|
||
|
||
inline double compute_fluid_0_momentum() { |
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 think you should generalise this class for n dimensions (where the number of dimensions are passed in the constructor). Otherwise we will end up with 2,3 copies of the same function with the only difference being an index.
@@ -152,11 +152,11 @@ TEST(ParticleFunctionProjection, DisContScalarExpQuantity) { | |||
.wait_and_throw(); | |||
|
|||
// create projection object | |||
auto field_project = std::make_shared<FieldProject<DisContField>>( | |||
auto src_field_project = std::make_shared<FieldProject<DisContField>>( |
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.
These diffs look like a find/replace edited an additional file?
Description
Please include a summary of changes, motivation and context for this PR.
Fixes #178
Fixes #194
Type of change
Please delete options that are not relevant.
Testing
Please describe the tests that you ran to verify your changes and provide instructions for reproducibility. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist:
cmake
clang-format
against my*.hpp
and*.cpp
changescmake-format
against my changes toCMakeLists.txt
black
against changes to*.py