Skip to content

Commit

Permalink
v0.1.0 (#236)
Browse files Browse the repository at this point in the history
* updated submodule for NP to v0.5.0 release commit

* updated NESO-Spack submodule to main

* fixed bad error code checking in generic hdf5 writer

* bugfix replaced numeric_limits::min with the correct numeric_limits::lowest

* updated NESO-Spack submodule

* Update nektar version number to reflect NESO-Spack change.

---------

Co-authored-by: Owen Parry <[email protected]>
  • Loading branch information
will-saunders-ukaea and oparry-ukaea authored May 2, 2024
1 parent 202f039 commit db278a4
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/nektar_interface/bounding_box_intersection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ inline void reset_bounding_box(std::array<double, ARRAY_LENGTH> &bounding_box) {

for (int dimx = 0; dimx < ndim; dimx++) {
bounding_box[dimx] = std::numeric_limits<double>::max();
bounding_box[dimx + ndim] = std::numeric_limits<double>::min();
bounding_box[dimx + ndim] = std::numeric_limits<double>::lowest();
}
}

Expand Down Expand Up @@ -206,7 +206,7 @@ class MeshHierarchyBoundingBoxIntersection {
// owned cells.
for (int dimx = 0; dimx < 3; dimx++) {
this->bounding_box[dimx] = std::numeric_limits<double>::max();
this->bounding_box[dimx + 3] = std::numeric_limits<double>::min();
this->bounding_box[dimx + 3] = std::numeric_limits<double>::lowest();
}
const int num_cells = owned_cells.size();
this->bounding_boxes.resize(num_cells);
Expand Down
2 changes: 1 addition & 1 deletion include/nektar_interface/cell_id_translation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CellIDTranslation {
inline void construct_maps(std::map<int, std::shared_ptr<T>> &geoms) {
const int nelements = geoms.size();
int id_min = std::numeric_limits<int>::max();
int id_max = std::numeric_limits<int>::min();
int id_max = std::numeric_limits<int>::lowest();

this->map_to_nektar.resize(nelements);
this->dh_map_to_geom_type.realloc_no_copy(nelements);
Expand Down
2 changes: 1 addition & 1 deletion include/nektar_interface/particle_boundary_conditions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NektarCartesianPeriodic {
double extent[3];
for (int dimx = 0; dimx < 3; dimx++) {
origin[dimx] = std::numeric_limits<double>::max();
extent[dimx] = std::numeric_limits<double>::min();
extent[dimx] = std::numeric_limits<double>::lowest();
}

for (auto &vx : verticies) {
Expand Down
2 changes: 1 addition & 1 deletion include/nektar_interface/particle_mesh_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class ParticleMeshInterface : public HMesh {

// Compute a set of coarse mesh sizes and dimensions for the mesh hierarchy
double min_extent = std::numeric_limits<double>::max();
double max_extent = std::numeric_limits<double>::min();
double max_extent = std::numeric_limits<double>::lowest();
for (int dimx = 0; dimx < this->ndim; dimx++) {
const double tmp_global_extent =
this->global_bounding_box[dimx + 3] - this->global_bounding_box[dimx];
Expand Down
2 changes: 1 addition & 1 deletion neso-particles
Submodule neso-particles updated 77 files
+311 −0 .cmake-format
+108 −105 CMakeLists.txt
+116 −3 docs/sphinx/source/guide-developer/developer_landing.rst
+39 −38 include/neso_particles.hpp
+0 −0 include/neso_particles/access.hpp
+2 −4 include/neso_particles/boundary_conditions.hpp
+1 −2 include/neso_particles/cartesian_mesh.hpp
+1 −3 include/neso_particles/cell_binning.hpp
+0 −0 include/neso_particles/cell_dat.hpp
+1 −2 include/neso_particles/cell_dat_compression.hpp
+1 −2 include/neso_particles/cell_dat_move.hpp
+0 −1 include/neso_particles/cell_dat_move_impl.hpp
+0 −0 include/neso_particles/communication.hpp
+2 −5 include/neso_particles/compute_target.hpp
+3 −3 include/neso_particles/containers/blocked_binary_tree.hpp
+0 −0 include/neso_particles/containers/cell_dat.hpp
+0 −0 include/neso_particles/containers/cell_dat_const.hpp
+0 −0 include/neso_particles/containers/cell_data.hpp
+0 −0 include/neso_particles/containers/descendant_products.hpp
+0 −0 include/neso_particles/containers/global_array.hpp
+0 −0 include/neso_particles/containers/local_array.hpp
+0 −0 include/neso_particles/containers/product_matrix.hpp
+0 −0 include/neso_particles/containers/sym_vector.hpp
+0 −0 include/neso_particles/containers/tuple.hpp
+1 −2 include/neso_particles/departing_particle_identification.hpp
+0 −1 include/neso_particles/departing_particle_identification_impl.hpp
+0 −0 include/neso_particles/domain.hpp
+0 −0 include/neso_particles/error_propagate.hpp
+1 −2 include/neso_particles/global_mapping.hpp
+0 −0 include/neso_particles/global_mapping_impl.hpp
+1 −2 include/neso_particles/global_move.hpp
+1 −2 include/neso_particles/global_move_exchange.hpp
+1 −2 include/neso_particles/local_mapping.hpp
+1 −2 include/neso_particles/local_move.hpp
+0 −0 include/neso_particles/loop/access_descriptors.hpp
+8 −7 include/neso_particles/loop/particle_loop.hpp
+0 −0 include/neso_particles/loop/particle_loop_base.hpp
+0 −0 include/neso_particles/loop/particle_loop_index.hpp
+0 −0 include/neso_particles/loop/pli_particle_dat.hpp
+0 −0 include/neso_particles/mesh_hierarchy.hpp
+0 −0 include/neso_particles/mesh_interface.hpp
+0 −0 include/neso_particles/mesh_interface_local_decomp.hpp
+1 −1 include/neso_particles/packing_unpacking.hpp
+0 −0 include/neso_particles/parallel_initialisation.hpp
+1 −3 include/neso_particles/particle_dat.hpp
+4 −3 include/neso_particles/particle_group.hpp
+0 −0 include/neso_particles/particle_group_impl.hpp
+0 −0 include/neso_particles/particle_io.hpp
+0 −0 include/neso_particles/particle_remover.hpp
+0 −0 include/neso_particles/particle_set.hpp
+0 −0 include/neso_particles/particle_spec.hpp
+0 −0 include/neso_particles/particle_sub_group.hpp
+1 −3 include/neso_particles/profiling.hpp
+11 −0 include/neso_particles/sycl_typedefs.hpp
+4 −2 include/neso_particles/typedefs.hpp
+0 −0 include/neso_particles/utility.hpp
+0 −0 include/neso_particles/utility_mesh_hierarchy_plotting.hpp
+6 −1 test/CMakeLists.txt
+1 −1 test/main.cpp
+0 −1 test/test_boundary_pbc.cpp
+0 −1 test/test_buffers.cpp
+0 −1 test/test_cell_dat.cpp
+0 −1 test/test_error_propagate.cpp
+0 −1 test/test_examples.cpp
+0 −1 test/test_global_array.cpp
+0 −1 test/test_int_key_value_map.cpp
+0 −1 test/test_local_array.cpp
+0 −1 test/test_local_decomp_mesh.cpp
+0 −1 test/test_mesh_hierarchy.cpp
+0 −1 test/test_parallel_initialisation.cpp
+0 −1 test/test_particle_dat.cpp
+0 −1 test/test_particle_h5part.cpp
+43 −1 test/test_particle_loop.cpp
+0 −1 test/test_particle_remover.cpp
+0 −1 test/test_particle_set.cpp
+0 −1 test/test_sycl_target.cpp
+0 −1 test/test_utility.cpp
7 changes: 5 additions & 2 deletions solvers/Electrostatic2D3V/Diagnostics/generic_hdf5_writer.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __GENERIC_HDF5_WRITER_H_
#define __GENERIC_HDF5_WRITER_H_

#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <hdf5.h>
#include <string>

Expand All @@ -12,7 +13,9 @@ class GenericHDF5Writer {
hid_t group_steps;
hid_t group_step;
hid_t group_global;
inline void ghw_H5CHK(const bool flag) { ASSERTL1((cmd) >= 0, "HDF5 ERROR"); }
inline void ghw_H5CHK(const bool flag) {
ASSERTL0((flag) >= 0, "HDF5 ERROR");
}

inline void write_dataspace(hid_t group, std::string key, hid_t dataspace,
double *value) {
Expand Down Expand Up @@ -52,7 +55,7 @@ class GenericHDF5Writer {
: filename(filename), step(-1), group_step(-1) {
this->file = H5Fcreate(this->filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT);
ASSERTL1(this->file != H5I_INVALID_HID, "Invalid HDF5 file identifier");
ASSERTL0(this->file != H5I_INVALID_HID, "Invalid HDF5 file identifier");
// Create the group for global data.
std::string group_name = "global_data";
this->group_global = H5Gcreate(this->file, group_name.c_str(), H5P_DEFAULT,
Expand Down
2 changes: 1 addition & 1 deletion spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ spack:
path: .
spec: neso@working
nektar:
spec: nektar@5.2.0-2022-09-03
spec: nektar@5.3.0-2022-09-03
neso-particles:
spec: neso-particles@working
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TEST(ParticleGeometryInterface, BoundingBox) {
std::array<double, 6> bounding_box;
for (int dimx = 0; dimx < 3; dimx++) {
bounding_box[dimx] = std::numeric_limits<double>::max();
bounding_box[dimx + 3] = std::numeric_limits<double>::min();
bounding_box[dimx + 3] = std::numeric_limits<double>::lowest();
}

expand_bounding_box(e0, bounding_box);
Expand Down

0 comments on commit db278a4

Please sign in to comment.