Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into 91-add-field-ionization
Browse files Browse the repository at this point in the history
Merge devel into the field ionization branch.
  • Loading branch information
Brandon Medina committed Jan 4, 2024
2 parents 1b2e090 + 04e2361 commit aeefc0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")

# Add Release flags to VPIC_CXX_FLAGS
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(VPIC_CXX_FLAGS "${VPIC_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
endif("${CMAKE_BUILD_TYPE}" STREQUAL "Release")

string(REPLACE ";" " " string_libraries "${MPI_CXX_LIBRARIES} ${MPI_C_LIBRARIES}")
set(VPIC_CXX_LIBRARIES "${string_libraries}")

Expand Down
20 changes: 6 additions & 14 deletions src/species_advance/species_advance.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,9 @@ move_p_kokkos(
// momentum and remaining displacement and keep moving the
// particle.
k_particles(pi, particle_var::ux + axis) = -k_particles(pi, particle_var::ux + axis);

// TODO: make this safer
//(&(pm->dispx))[axis] = -(&(pm->dispx))[axis];
//k_local_particle_movers(0, particle_mover_var::dispx + axis) = -k_local_particle_movers(0, particle_mover_var::dispx + axis);
// TODO: replace this, it's horrible
(&(pm->dispx))[axis] = -(&(pm->dispx))[axis];

// Clearer and works with AMD GPUs
float* disp = static_cast<float*>(&(pm->dispx));
disp[axis] = -disp[axis];

continue;
}
Expand Down Expand Up @@ -877,13 +873,9 @@ move_p_kokkos_host_serial(
// momentum and remaining displacement and keep moving the
// particle.
k_particles(pi, particle_var::ux + axis) = -k_particles(pi, particle_var::ux + axis);

// TODO: make this safer
//(&(pm->dispx))[axis] = -(&(pm->dispx))[axis];
//k_local_particle_movers(0, particle_mover_var::dispx + axis) = -k_local_particle_movers(0, particle_mover_var::dispx + axis);
// TODO: replace this, it's horrible
(&(pm->dispx))[axis] = -(&(pm->dispx))[axis];

// Clearer and works with AMD GPUs
float* disp = static_cast<float*>(&(pm->dispx));
disp[axis] = -disp[axis];

continue;
}
Expand Down

0 comments on commit aeefc0f

Please sign in to comment.