Skip to content

Commit

Permalink
Explicitly override virtual methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mphoward committed Nov 25, 2024
1 parent 12d3834 commit 37015a9
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions hoomd/mpcd/ATCollisionMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ class PYBIND11_EXPORT ATCollisionMethod : public mpcd::CollisionMethod
std::shared_ptr<Variant> m_T; //!< Temperature for thermostat

//! Implementation of the collision rule
virtual void rule(uint64_t timestep);
virtual void rule(uint64_t timestep) override;

//! Draw velocities for particles in each cell
virtual void drawVelocities(uint64_t timestep);
virtual void drawVelocities(uint64_t timestep) override;

//! Apply the random velocities to particles in each cell
virtual void applyVelocities();
virtual void applyVelocities() override;

//! Attach callback signals
void attachCallbacks();
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/ATCollisionMethodGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class PYBIND11_EXPORT ATCollisionMethodGPU : public mpcd::ATCollisionMethod

protected:
//! Draw velocities for particles in each cell on the GPU
virtual void drawVelocities(uint64_t timestep);
virtual void drawVelocities(uint64_t timestep) override;

//! Apply the random velocities to particles in each cell on the GPU
virtual void applyVelocities();
virtual void applyVelocities() override;

private:
std::shared_ptr<Autotuner<1>> m_tuner_draw; //!< Tuner for drawing random velocities
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/BounceBackNVE.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ class PYBIND11_EXPORT BounceBackNVE : public hoomd::md::IntegrationMethodTwoStep
virtual ~BounceBackNVE();

//! Performs the first step of the integration
virtual void integrateStepOne(uint64_t timestep);
virtual void integrateStepOne(uint64_t timestep) override;

//! Performs the second step of the integration
virtual void integrateStepTwo(uint64_t timestep);
virtual void integrateStepTwo(uint64_t timestep) override;

//! Get the streaming geometry
std::shared_ptr<Geometry> getGeometry()
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/BounceBackNVEGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ template<class Geometry> class PYBIND11_EXPORT BounceBackNVEGPU : public BounceB
}

//! Performs the first step of the integration
virtual void integrateStepOne(uint64_t timestep);
virtual void integrateStepOne(uint64_t timestep) override;

//! Performs the second step of the integration
virtual void integrateStepTwo(uint64_t timestep);
virtual void integrateStepTwo(uint64_t timestep) override;

private:
std::shared_ptr<Autotuner<1>> m_tuner_1;
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/BounceBackStreamingMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class PYBIND11_EXPORT BounceBackStreamingMethod : public mpcd::StreamingMethod
}

//! Implementation of the streaming rule
virtual void stream(uint64_t timestep);
virtual void stream(uint64_t timestep) override;

//! Get the streaming geometry
std::shared_ptr<Geometry> getGeometry() const
Expand All @@ -90,7 +90,7 @@ class PYBIND11_EXPORT BounceBackStreamingMethod : public mpcd::StreamingMethod
}

//! Check that particles lie inside the geometry
virtual bool checkParticles();
virtual bool checkParticles() override;

protected:
std::shared_ptr<Geometry> m_geom; //!< Streaming geometry
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/BounceBackStreamingMethodGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PYBIND11_EXPORT BounceBackStreamingMethodGPU
}

//! Implementation of the streaming rule
virtual void stream(uint64_t timestep);
virtual void stream(uint64_t timestep) override;

protected:
std::shared_ptr<Autotuner<1>> m_tuner;
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/CellListGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PYBIND11_EXPORT CellListGPU : public mpcd::CellList

protected:
//! Compute the cell list of particles on the GPU
virtual void buildCellList();
virtual void buildCellList() override;

//! Callback to sort cell list on the GPU when particle data is sorted
virtual void sort(uint64_t timestep,
Expand Down
8 changes: 4 additions & 4 deletions hoomd/mpcd/CellThermoComputeGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ class PYBIND11_EXPORT CellThermoComputeGPU : public mpcd::CellThermoCompute
protected:
#ifdef ENABLE_MPI
//! Begin the calculation of outer cell properties on the GPU
virtual void beginOuterCellProperties();
virtual void beginOuterCellProperties() override;

//! Finish the calculation of outer cell properties on the GPU
virtual void finishOuterCellProperties();
virtual void finishOuterCellProperties() override;
#endif // ENABLE_MPI

//! Calculate the inner cell properties on the GPU
virtual void calcInnerCellProperties();
virtual void calcInnerCellProperties() override;

//! Compute the net properties from the cell properties
virtual void computeNetProperties();
virtual void computeNetProperties() override;

private:
std::shared_ptr<Autotuner<2>> m_begin_tuner; //!< Tuner for cell begin kernel
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/CommunicatorGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PYBIND11_EXPORT CommunicatorGPU : public mpcd::Communicator
//@{

//! Migrate particle data to local domain
virtual void migrateParticles(uint64_t timestep);
virtual void migrateParticles(uint64_t timestep) override;
//@}

//! Set maximum number of communication stages
Expand All @@ -71,7 +71,7 @@ class PYBIND11_EXPORT CommunicatorGPU : public mpcd::Communicator

protected:
//! Set the communication flags for the particle data on the GPU
virtual void setCommFlags(const BoxDim& box);
virtual void setCommFlags(const BoxDim& box) override;

private:
/* General communication */
Expand Down
6 changes: 3 additions & 3 deletions hoomd/mpcd/Integrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class PYBIND11_EXPORT Integrator : public hoomd::md::IntegratorTwoStep
virtual ~Integrator();

//! Take one timestep forward
virtual void update(uint64_t timestep);
virtual void update(uint64_t timestep) override;

//! Change the timestep
virtual void setDeltaT(Scalar deltaT);
virtual void setDeltaT(Scalar deltaT) override;

//! Prepare for the run
virtual void prepRun(uint64_t timestep);
virtual void prepRun(uint64_t timestep) override;

//! Get the MPCD cell list shared by all methods
std::shared_ptr<mpcd::CellList> getCellList() const
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/ParallelPlateGeometryFiller.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class PYBIND11_EXPORT ParallelPlateGeometryFiller : public mpcd::ManualVirtualPa
unsigned int m_N_hi; //!< number of particles to fill above channel

//! Compute the total number of particles to fill
virtual void computeNumFill();
virtual void computeNumFill() override;

//! Draw particles within the fill volume
virtual void drawParticles(uint64_t timestep);
virtual void drawParticles(uint64_t timestep) override;
};
} // end namespace mpcd
} // end namespace hoomd
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/ParallelPlateGeometryFillerGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PYBIND11_EXPORT ParallelPlateGeometryFillerGPU : public mpcd::ParallelPlat

protected:
//! Draw particles within the fill volume on the GPU
virtual void drawParticles(uint64_t timestep);
virtual void drawParticles(uint64_t timestep) override;

private:
std::shared_ptr<hoomd::Autotuner<1>> m_tuner; //!< Autotuner for drawing particles
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/PlanarPoreGeometryFiller.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class PYBIND11_EXPORT PlanarPoreGeometryFiller : public mpcd::ManualVirtualParti
GPUArray<uint2> m_ranges; //!< Particle tag ranges for filling

//! Compute the total number of particles to fill
virtual void computeNumFill();
virtual void computeNumFill() override;

//! Draw particles within the fill volume
virtual void drawParticles(uint64_t timestep);
virtual void drawParticles(uint64_t timestep) override;

private:
bool m_needs_recompute;
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/PlanarPoreGeometryFillerGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PYBIND11_EXPORT PlanarPoreGeometryFillerGPU : public mpcd::PlanarPoreGeome

protected:
//! Draw particles within the fill volume on the GPU
virtual void drawParticles(uint64_t timestep);
virtual void drawParticles(uint64_t timestep) override;

private:
std::shared_ptr<hoomd::Autotuner<1>> m_tuner; //!< Autotuner for drawing particles
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/RejectionVirtualParticleFiller.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PYBIND11_EXPORT RejectionVirtualParticleFiller : public mpcd::VirtualParti
}

//! Fill the particles outside the confinement
virtual void fill(uint64_t timestep);
virtual void fill(uint64_t timestep) override;

protected:
std::shared_ptr<const Geometry> m_geom;
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/RejectionVirtualParticleFillerGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PYBIND11_EXPORT RejectionVirtualParticleFillerGPU

protected:
//! Fill the volume outside the confinement
virtual void fill(uint64_t timestep);
virtual void fill(uint64_t timestep) override;

private:
GPUArray<bool> m_keep_particles; // Track whether particles are in/out of bounds for geometry
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/SRDCollisionMethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class PYBIND11_EXPORT SRDCollisionMethod : public mpcd::CollisionMethod
GPUVector<double> m_factors; //!< Cell-level rescale factors

//! Implementation of the collision rule
virtual void rule(uint64_t timestep);
virtual void rule(uint64_t timestep) override;

//! Randomly draw cell rotation vectors
virtual void drawRotationVectors(uint64_t timestep);
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/SRDCollisionMethodGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class PYBIND11_EXPORT SRDCollisionMethodGPU : public mpcd::SRDCollisionMethod

protected:
//! Randomly draw cell rotation vectors
virtual void drawRotationVectors(uint64_t timestep);
virtual void drawRotationVectors(uint64_t timestep) override;

//! Apply rotation matrix to velocities
virtual void rotate(uint64_t timestep);
virtual void rotate(uint64_t timestep) override;

private:
std::shared_ptr<Autotuner<1>> m_tuner_rotvec; //!< Tuner for drawing rotation vectors
Expand Down
2 changes: 1 addition & 1 deletion hoomd/mpcd/Sorter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PYBIND11_EXPORT Sorter : public Tuner
virtual ~Sorter();

//! Update the particle data order
virtual void update(uint64_t timestep);
virtual void update(uint64_t timestep) override;

//! Set the cell list used for sorting
virtual void setCellList(std::shared_ptr<mpcd::CellList> cl)
Expand Down
4 changes: 2 additions & 2 deletions hoomd/mpcd/SorterGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class PYBIND11_EXPORT SorterGPU : public mpcd::Sorter
std::shared_ptr<Autotuner<1>> m_apply_tuner;

//! Compute the sorting order at the current timestep on the GPU
virtual void computeOrder(uint64_t timestep);
virtual void computeOrder(uint64_t timestep) override;

//! Apply the sorting order on the GPU
virtual void applyOrder() const;
virtual void applyOrder() const override;
};
} // end namespace mpcd
} // end namespace hoomd
Expand Down

0 comments on commit 37015a9

Please sign in to comment.