mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 20:57:06 +01:00
Namespace
This commit is contained in:
@ -28,30 +28,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
See the full license in the file "LICENSE" in the top level distribution
|
See the full license in the file "LICENSE" in the top level distribution
|
||||||
directory
|
directory
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
/*! @file HMC.h
|
/*! @file HMC.h
|
||||||
* @brief Classes for Hybrid Monte Carlo update
|
* @brief Classes for Hybrid Monte Carlo update
|
||||||
*
|
*
|
||||||
* @author Guido Cossu
|
* @author Guido Cossu
|
||||||
*/
|
*/
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
#ifndef HMC_INCLUDED
|
#ifndef HMC_INCLUDED
|
||||||
#define HMC_INCLUDED
|
#define HMC_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <Grid/qcd/hmc/integrators/Integrator.h>
|
#include <Grid/qcd/hmc/integrators/Integrator.h>
|
||||||
#include <Grid/qcd/hmc/integrators/Integrator_algorithm.h>
|
#include <Grid/qcd/hmc/integrators/Integrator_algorithm.h>
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
namespace QCD {
|
|
||||||
|
|
||||||
struct HMCparameters: Serializable {
|
struct HMCparameters: Serializable {
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(HMCparameters,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(HMCparameters,
|
||||||
Integer, StartTrajectory,
|
Integer, StartTrajectory,
|
||||||
Integer, Trajectories, /* @brief Number of sweeps in this run */
|
Integer, Trajectories, /* @brief Number of sweeps in this run */
|
||||||
bool, MetropolisTest,
|
bool, MetropolisTest,
|
||||||
@ -71,13 +68,13 @@ struct HMCparameters: Serializable {
|
|||||||
|
|
||||||
template <class ReaderClass >
|
template <class ReaderClass >
|
||||||
HMCparameters(Reader<ReaderClass> & TheReader){
|
HMCparameters(Reader<ReaderClass> & TheReader){
|
||||||
initialize(TheReader);
|
initialize(TheReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class ReaderClass >
|
template < class ReaderClass >
|
||||||
void initialize(Reader<ReaderClass> &TheReader){
|
void initialize(Reader<ReaderClass> &TheReader){
|
||||||
std::cout << GridLogMessage << "Reading HMC\n";
|
std::cout << GridLogMessage << "Reading HMC\n";
|
||||||
read(TheReader, "HMC", *this);
|
read(TheReader, "HMC", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -94,20 +91,20 @@ struct HMCparameters: Serializable {
|
|||||||
|
|
||||||
template <class IntegratorType>
|
template <class IntegratorType>
|
||||||
class HybridMonteCarlo {
|
class HybridMonteCarlo {
|
||||||
private:
|
private:
|
||||||
const HMCparameters Params;
|
const HMCparameters Params;
|
||||||
|
|
||||||
typedef typename IntegratorType::Field Field;
|
typedef typename IntegratorType::Field Field;
|
||||||
typedef std::vector< HmcObservable<Field> * > ObsListType;
|
typedef std::vector< HmcObservable<Field> * > ObsListType;
|
||||||
|
|
||||||
//pass these from the resource manager
|
//pass these from the resource manager
|
||||||
GridSerialRNG &sRNG;
|
GridSerialRNG &sRNG;
|
||||||
GridParallelRNG &pRNG;
|
GridParallelRNG &pRNG;
|
||||||
|
|
||||||
Field &Ucur;
|
Field &Ucur;
|
||||||
|
|
||||||
IntegratorType &TheIntegrator;
|
IntegratorType &TheIntegrator;
|
||||||
ObsListType Observables;
|
ObsListType Observables;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
// Metropolis step
|
// Metropolis step
|
||||||
@ -179,7 +176,7 @@ class HybridMonteCarlo {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// Constructor
|
// Constructor
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
@ -238,10 +235,7 @@ class HybridMonteCarlo {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
} // QCD
|
|
||||||
} // Grid
|
|
||||||
|
|
||||||
|
|
||||||
// april 11 2017 merge, Guido, commenting out
|
// april 11 2017 merge, Guido, commenting out
|
||||||
//#include <Grid/parallelIO/NerscIO.h>
|
//#include <Grid/parallelIO/NerscIO.h>
|
||||||
|
Reference in New Issue
Block a user