"platforms/common/vscode:/vscode.git/clone" did not exist on "46098e353cf905532ebb91bb98881852602a7cf4"
Commit c3e1acf8 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Changed several brookPlatform copy statements to references in brook kernel files

Commented out static platform variable, which may have caused initialization problems
Some of the Brook tests now succeed on my computer for the first time.
parent ff7874d7
......@@ -66,7 +66,7 @@ BrookCalcGBSAOBCForceKernel::BrookCalcGBSAOBCForceKernel( std::string name, cons
_numberOfParticles = 0;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -62,7 +62,7 @@ BrookCalcHarmonicAngleForceKernel::BrookCalcHarmonicAngleForceKernel( std::strin
_brookBondParameters = NULL;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -62,7 +62,7 @@ BrookCalcHarmonicBondForceKernel::BrookCalcHarmonicBondForceKernel( std::string
_brookBondParameters = NULL;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -69,7 +69,7 @@ BrookCalcNonbondedForceKernel::BrookCalcNonbondedForceKernel( std::string name,
_brookBondParameters = NULL;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -63,7 +63,7 @@ BrookCalcPeriodicTorsionForceKernel::BrookCalcPeriodicTorsionForceKernel( std::s
_log = NULL;
_openMMBrookInterface.setNumberOfParticles( system.getNumParticles() );
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -63,7 +63,7 @@ BrookCalcRBTorsionForceKernel::BrookCalcRBTorsionForceKernel( std::string name,
_log = NULL;
_openMMBrookInterface.setNumberOfParticles( system.getNumParticles() );
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -313,7 +313,7 @@ void BrookCommon::_getParticleStreamDimensions( const Platform& platform ){
// get particle stream size
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookStreamFactory& brookStreamFactory = dynamic_cast<const BrookStreamFactory&> (platform.getDefaultStreamFactory() );
_particleStreamWidth = brookStreamFactory.getDefaultParticleStreamWidth();
_particleStreamSize = brookPlatform.getStreamSize( getNumberOfParticles(), _particleStreamWidth, NULL );
......
......@@ -63,7 +63,7 @@ BrookInitializeForcesKernel::BrookInitializeForcesKernel( std::string name, cons
_numberOfParticles = 0;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -60,7 +60,7 @@ BrookIntegrateLangevinStepKernel::BrookIntegrateLangevinStepKernel( std::string
_brookRandomNumberGenerator = NULL;
_log = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -58,7 +58,7 @@ BrookIntegrateVerletStepKernel::BrookIntegrateVerletStepKernel( std::string name
_brookVerletDynamics = NULL;
_brookShakeAlgorithm = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
} else {
......
......@@ -815,7 +815,7 @@ int BrookLangevinDynamics::setup( const std::vector<double>& masses, const Platf
// ---------------------------------------------------------------------------------------
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
setLog( brookPlatform.getLog() );
int numberOfParticles = (int) masses.size();
......
......@@ -190,7 +190,7 @@ BrookPlatform* registerBrookPlatform( void ){
return platform;
}
BrookPlatform* staticPlatform = registerBrookPlatform( );
// BrookPlatform* staticPlatform = registerBrookPlatform( );
/**
* BrookPlatform constructor
......
......@@ -942,7 +942,7 @@ int BrookRandomNumberGenerator::_initializeStreamSizes( int numberOfParticles, c
// get randomNumber stream dimensions
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookStreamFactory& brookStreamFactory = dynamic_cast<const BrookStreamFactory&> (platform.getDefaultStreamFactory() );
_randomNumberStreamWidth = brookStreamFactory.getDefaultRandomNumberStreamWidth();
_randomNumberStreamSize = brookStreamFactory.getDefaultRandomNumberStreamSize();
......@@ -1023,7 +1023,7 @@ int BrookRandomNumberGenerator::setup( int numberOfParticles, const Platform& pl
// ---------------------------------------------------------------------------------------
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
setLog( brookPlatform.getLog() );
// set stream sizes and then create streams
......
......@@ -60,7 +60,7 @@ BrookRemoveCMMotionKernel::BrookRemoveCMMotionKernel( std::string name, const Pl
_log = NULL;
_brookVelocityCenterOfMassRemoval = NULL;
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
if( brookPlatform.getLog() != NULL ){
setLog( brookPlatform.getLog() );
}
......
......@@ -354,7 +354,7 @@ int BrookVelocityCenterOfMassRemoval::setup( const std::vector<double>& masses,
// ---------------------------------------------------------------------------------------
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
setLog( brookPlatform.getLog() );
int numberOfParticles = (int) masses.size();
......
......@@ -373,7 +373,7 @@ int BrookVerletDynamics::setup( const std::vector<double>& masses, const Platfor
// ---------------------------------------------------------------------------------------
const BrookPlatform brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
const BrookPlatform& brookPlatform = dynamic_cast<const BrookPlatform&> (platform);
setLog( brookPlatform.getLog() );
int numberOfParticles = (int) masses.size();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment