Skip to content

Commit

Permalink
start fixing build errors
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Hahn <[email protected]>
  • Loading branch information
quantumsteve committed Sep 28, 2023
1 parent 3cfac4a commit 4ea486e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 338 deletions.
1 change: 0 additions & 1 deletion src/Particle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set(PARTICLE
InitMolecularSystem.cpp
InitMolecularSystemT.cpp
SimulationCellT.cpp
ParticleSetPool.cpp
ParticleSetPoolT.cpp
ParticleSetT.cpp
PSdispatcher.cpp
Expand Down
239 changes: 0 additions & 239 deletions src/Particle/ParticleSetPool.cpp

This file was deleted.

100 changes: 3 additions & 97 deletions src/Particle/ParticleSetPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,107 +18,13 @@
#ifndef QMCPLUSPLUS_PARTICLESETPOOL_H
#define QMCPLUSPLUS_PARTICLESETPOOL_H

#include "OhmmsData/OhmmsElementBase.h"
#include "Particle/MCWalkerConfiguration.h"
#include "Message/MPIObjectBase.h"
#include "SimulationCell.h"
#include "Configuration.h"
#include "Particle/ParticleSetPoolT.h"

namespace qmcplusplus
{
/** @ingroup qmcapp
* @brief Manage a collection of ParticleSet objects
*
* This object handles \<particleset\> elements and
* functions as a builder class for ParticleSet objects.
*/
class ParticleSetPool : public MPIObjectBase
{
public:
using PoolType = std::map<std::string, const std::unique_ptr<ParticleSet>>;

/** constructor
* @param aname xml tag
*/
ParticleSetPool(Communicate* c, const char* aname = "particleset");
~ParticleSetPool();

ParticleSetPool(const ParticleSetPool&) = delete;
ParticleSetPool& operator=(const ParticleSetPool&) = delete;
ParticleSetPool(ParticleSetPool&& pset) noexcept;
ParticleSetPool& operator=(ParticleSetPool&&) = default;

bool put(xmlNodePtr cur);
bool get(std::ostream& os) const;
void reset();

void output_particleset_info(Libxml2Document& doc, xmlNodePtr root);

/** initialize the supercell shared by all the particle sets
*
* return value is never checked anywhere
* side effect simulation_cell_ UPtr<ParticleLayout> is set
* to particle layout created on heap.
* This is later directly assigned to pset member variable Lattice.
*/
bool readSimulationCellXML(xmlNodePtr cur);

///return true, if the pool is empty
inline bool empty() const { return myPool.empty(); }

/** add a ParticleSet* to the pool with its ownership transferred
* ParticleSet built outside the ParticleSetPool must be constructed with
* the simulation cell from this->simulation_cell_.
*/
void addParticleSet(std::unique_ptr<ParticleSet>&& p);

/** get a named ParticleSet
* @param pname name of the ParticleSet
* @return a MCWalkerConfiguration object with pname
*
* When the named ParticleSet is not in this object, return 0.
*/
ParticleSet* getParticleSet(const std::string& pname);

/** get a named MCWalkerConfiguration
* @param pname name of the MCWalkerConfiguration
* @return a MCWalkerConfiguration object with pname
*
* When the named MCWalkerConfiguration is not in this object, return 0.
*/
MCWalkerConfiguration* getWalkerSet(const std::string& pname);

/** get the Pool object
*/
inline const PoolType& getPool() const { return myPool; }

/// get simulation cell
const auto& getSimulationCell() const { return *simulation_cell_; }

/// set simulation cell
void setSimulationCell(const SimulationCell& simulation_cell) { *simulation_cell_ = simulation_cell; }

/** randomize a particleset particleset/@random='yes' && particleset@random_source exists
*/
void randomize();
using ParticleSetPool = ParticleSetPoolT<QMCTraits::ValueType>;

private:
/** global simulation cell
*
* updated by
* - readSimulationCellXML() parsing <simulationcell> element
* - setSimulationCell()
*/
std::unique_ptr<SimulationCell> simulation_cell_;
/** List of ParticleSet owned
*
* Each ParticleSet has to have a unique name which is used as a key for the map.
*/
PoolType myPool;
/** xml node for random initialization.
*
* randomize() process initializations just before starting qmc sections
*/
std::vector<xmlNodePtr> randomize_nodes;
};
} // namespace qmcplusplus
#endif
1 change: 0 additions & 1 deletion src/Particle/ParticleSetT.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class ParticleSetT : public OhmmsElementBase
using ParticleIndex = typename LatticeParticleTraits<T>::ParticleIndex;
using ParticlePos = typename LatticeParticleTraits<T>::ParticlePos;
using ParticleScalar = typename LatticeParticleTraits<T>::ParticleScalar;
using ParticleTensor = ParticleAttrib<Tensor_t>;
using ParticleGradient =
typename LatticeParticleTraits<T>::ParticleGradient;
using ParticleLaplacian =
Expand Down

0 comments on commit 4ea486e

Please sign in to comment.