Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
child class just need to implement the CPU and GPU functions More...
#include <equationOfMotion.h>
Public Member Functions | |
virtual void | performUpdate () |
The function which performs the update. More... | |
virtual void | integrateEquationOfMotion () |
virtual void | integrateEOMGPU () |
virtual void | integrateEOMCPU () |
virtual void | initializeFromModel () |
by default, set Ndof More... | |
virtual scalar | getClassSize () |
virtual void | Update (int timestep) |
The fundamental function that a controlling Simulation can call. More... | |
void | setSimulation (shared_ptr< basicSimulation > _sim) |
set the simulation More... | |
virtual void | setModel (shared_ptr< simpleModel > _model) |
virtual function to allow the model to be a derived class More... | |
void | setPeriod (int _p) |
set the period More... | |
void | setPhase (int _p) |
set the phase More... | |
virtual void | spatialSorting () |
allow for spatial sorting to be called if necessary... More... | |
virtual void | setReproducible (bool rep) |
Allow for a reproducibility call to be made. More... | |
virtual void | setGPU (bool _useGPU=true) |
Enforce GPU operation. More... | |
int | getNdof () |
Get the number of degrees of freedom of the equation of motion. More... | |
void | setNdof (int _n) |
Set the number of degrees of freedom of the equation of motion. More... | |
virtual void | setDeltaT (scalar dt) |
allow all updaters to potentially implement an internal time scale More... | |
virtual void | setNThreads (int n) |
allow for setting multiple threads More... | |
virtual scalar | getMaxForce () |
void | setMaximumIterations (int maxIt) |
Set the maximum number of iterations before terminating (or set to -1 to ignore) More... | |
int | getCurrentIterations () |
int | getMaxIterations () |
void | setCurrentIterations (int newIterations) |
int | getNTotal () |
communicate the number of non-object sites across ranks More... | |
Public Attributes | |
GPUArray< dVec > | displacement |
an array of displacements More... | |
shared_ptr< basicSimulation > | sim |
A pointer to the governing simulation. More... | |
shared_ptr< simpleModel > | model |
A pointer to a simpleModel that the updater acts on. More... | |
vector< scalar > | updaterData |
int | iterations |
The number of iterations performed. More... | |
Protected Attributes | |
int | nThreads =1 |
number of threads to use More... | |
int | Period |
The period of the updater... the updater will work every Period timesteps. More... | |
int | Phase |
The phase of the updater... the updater will work every Period timesteps offset by a phase. More... | |
bool | useGPU |
whether the updater does its work on the GPU or not More... | |
bool | neverGPU |
whether the updater never does work on the GPU More... | |
int | Ndof |
some measure of the number of degrees of freedom the equations of motion might need to know about locally More... | |
int | nTotal |
the total number of non-object sites across all ranks More... | |
bool | reproducible |
whether the RNGs give reproducible results More... | |
scalar | deltaT |
The internal time step size. More... | |
int | maxIterations |
The maximum number of iterations allowed. More... | |
child class just need to implement the CPU and GPU functions
|
inlinevirtual |
The function which performs the update.
Reimplemented from updater.
Reimplemented in energyMinimizerFIRE, energyMinimizerGradientDescent, energyMinimizerLoLBFGS, energyMinimizerNesterovAG, and energyMinimizerAdam.
References integrateEquationOfMotion().
|
inlinevirtual |
References initializeFromModel(), integrateEOMCPU(), integrateEOMGPU(), updater::model, updater::Ndof, and updater::useGPU.
Referenced by energyMinimizerFIRE::minimize(), and performUpdate().
|
inlinevirtual |
Reimplemented in velocityVerlet.
Referenced by integrateEquationOfMotion().
|
inlinevirtual |
Reimplemented in velocityVerlet.
Referenced by integrateEquationOfMotion().
|
inlinevirtual |
by default, set Ndof
Reimplemented from updater.
Reimplemented in energyMinimizerFIRE, energyMinimizerGradientDescent, energyMinimizerLoLBFGS, energyMinimizerNesterovAG, and energyMinimizerAdam.
References displacement, updater::model, updater::Ndof, updater::neverGPU, GPUArray< T >::noGPU, and GPUArray< T >::resize().
Referenced by integrateEquationOfMotion().
|
inlinevirtual |
Reimplemented from updater.
Reimplemented in energyMinimizerFIRE, energyMinimizerLoLBFGS, and energyMinimizerGradientDescent.
References displacement, updater::getClassSize(), GPUArray< T >::getNumElements(), and scalar.
Referenced by energyMinimizerGradientDescent::getClassSize(), energyMinimizerLoLBFGS::getClassSize(), and energyMinimizerFIRE::getClassSize().
|
inlinevirtualinherited |
The fundamental function that a controlling Simulation can call.
References updater::performUpdate(), updater::Period, and updater::Phase.
|
inlineinherited |
set the simulation
References updater::sim.
|
inlinevirtualinherited |
virtual function to allow the model to be a derived class
References updater::initializeFromModel(), and updater::model.
Referenced by energyMinimizerFIRE::energyMinimizerFIRE(), energyMinimizerGradientDescent::energyMinimizerGradientDescent(), energyMinimizerLoLBFGS::energyMinimizerLoLBFGS(), and energyMinimizerNesterovAG::energyMinimizerNesterovAG().
|
inlineinherited |
set the period
References updater::Period.
|
inlineinherited |
set the phase
References updater::Phase.
|
inlinevirtualinherited |
allow for spatial sorting to be called if necessary...
|
inlinevirtualinherited |
Allow for a reproducibility call to be made.
References updater::reproducible.
|
inlinevirtualinherited |
Enforce GPU operation.
References updater::useGPU.
Referenced by energyMinimizerNesterovAG::initializeParameters(), energyMinimizerLoLBFGS::initializeParameters(), energyMinimizerGradientDescent::initializeParameters(), and energyMinimizerFIRE::initializeParameters().
|
inlineinherited |
Get the number of degrees of freedom of the equation of motion.
References updater::Ndof.
|
inlineinherited |
Set the number of degrees of freedom of the equation of motion.
References updater::Ndof.
|
inlinevirtualinherited |
allow all updaters to potentially implement an internal time scale
Reimplemented in energyMinimizerFIRE.
References updater::deltaT.
Referenced by energyMinimizerGradientDescent::initializeParameters(), and energyMinimizerGradientDescent::setGradientDescentParameters().
|
inlinevirtualinherited |
allow for setting multiple threads
References n, and updater::nThreads.
|
inlinevirtualinherited |
Reimplemented in energyMinimizerFIRE, energyMinimizerGradientDescent, energyMinimizerLoLBFGS, energyMinimizerNesterovAG, and energyMinimizerAdam.
|
inlineinherited |
Set the maximum number of iterations before terminating (or set to -1 to ignore)
References updater::maxIterations.
Referenced by energyMinimizerNesterovAG::initializeParameters(), energyMinimizerLoLBFGS::initializeParameters(), energyMinimizerGradientDescent::initializeParameters(), and energyMinimizerFIRE::initializeParameters().
|
inlineinherited |
References updater::iterations.
|
inlineinherited |
References updater::maxIterations.
|
inlineinherited |
References updater::iterations.
|
inherited |
communicate the number of non-object sites across ranks
References access_location::host, updater::model, updater::Ndof, updater::nTotal, access_mode::read, updater::sim, and updater::updaterData.
GPUArray<dVec> equationOfMotion::displacement |
an array of displacements
Referenced by energyMinimizerAdam::adamStepCPU(), energyMinimizerAdam::adamStepGPU(), getClassSize(), energyMinimizerAdam::initializeFromModel(), initializeFromModel(), energyMinimizerGradientDescent::initializeFromModel(), energyMinimizerFIRE::initializeFromModel(), velocityVerlet::integrateEOMCPU(), and velocityVerlet::integrateEOMGPU().
|
inherited |
A pointer to the governing simulation.
Referenced by energyMinimizerAdam::adamStepCPU(), energyMinimizerAdam::adamStepGPU(), energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getNTotal(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), velocityVerlet::integrateEOMCPU(), velocityVerlet::integrateEOMGPU(), energyMinimizerLoLBFGS::lineSearchCPU(), energyMinimizerLoLBFGS::LoLBFGSStepCPU(), energyMinimizerLoLBFGS::LoLBFGSStepGPU(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerGradientDescent::minimize(), energyMinimizerFIRE::minimize(), energyMinimizerNesterovAG::nesterovStepCPU(), energyMinimizerNesterovAG::nesterovStepGPU(), updater::performUpdate(), and updater::setSimulation().
|
inherited |
A pointer to a simpleModel that the updater acts on.
Referenced by energyMinimizerAdam::adamStepCPU(), energyMinimizerAdam::adamStepGPU(), energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getNTotal(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), energyMinimizerAdam::initializeFromModel(), energyMinimizerNesterovAG::initializeFromModel(), energyMinimizerLoLBFGS::initializeFromModel(), initializeFromModel(), energyMinimizerGradientDescent::initializeFromModel(), energyMinimizerFIRE::initializeFromModel(), updater::initializeFromModel(), velocityVerlet::integrateEOMCPU(), velocityVerlet::integrateEOMGPU(), integrateEquationOfMotion(), energyMinimizerLoLBFGS::lineSearchCPU(), energyMinimizerLoLBFGS::LoLBFGSStepCPU(), energyMinimizerLoLBFGS::LoLBFGSStepGPU(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerLoLBFGS::minimize(), energyMinimizerGradientDescent::minimize(), energyMinimizerFIRE::minimize(), energyMinimizerNesterovAG::nesterovStepCPU(), energyMinimizerNesterovAG::nesterovStepGPU(), and updater::setModel().
|
inherited |
Referenced by energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getNTotal(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), energyMinimizerGradientDescent::initializeParameters(), and energyMinimizerFIRE::initializeParameters().
|
inherited |
The number of iterations performed.
Referenced by energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getCurrentIterations(), energyMinimizerAdam::initializeFromModel(), energyMinimizerNesterovAG::initializeParameters(), energyMinimizerLoLBFGS::initializeParameters(), energyMinimizerGradientDescent::initializeParameters(), energyMinimizerFIRE::initializeParameters(), energyMinimizerLoLBFGS::LoLBFGSStepCPU(), energyMinimizerLoLBFGS::LoLBFGSStepGPU(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerLoLBFGS::minimize(), energyMinimizerGradientDescent::minimize(), energyMinimizerFIRE::minimize(), and updater::setCurrentIterations().
|
protectedinherited |
number of threads to use
Referenced by updater::setNThreads().
|
protectedinherited |
The period of the updater... the updater will work every Period timesteps.
Referenced by updater::setPeriod(), updater::Update(), and updater::updater().
|
protectedinherited |
The phase of the updater... the updater will work every Period timesteps offset by a phase.
Referenced by updater::setPhase(), updater::Update(), and updater::updater().
|
protectedinherited |
whether the updater does its work on the GPU or not
Referenced by energyMinimizerFIRE::fireStep(), energyMinimizerGradientDescent::gradientDescentStep(), integrateEquationOfMotion(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerLoLBFGS::minimize(), updater::setGPU(), and updater::updater().
|
protectedinherited |
whether the updater never does work on the GPU
Referenced by initializeFromModel(), energyMinimizerGradientDescent::initializeFromModel(), and energyMinimizerFIRE::initializeFromModel().
|
protectedinherited |
some measure of the number of degrees of freedom the equations of motion might need to know about locally
Referenced by energyMinimizerAdam::adamStepCPU(), energyMinimizerAdam::adamStepGPU(), energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getNdof(), updater::getNTotal(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), energyMinimizerAdam::initializeFromModel(), energyMinimizerNesterovAG::initializeFromModel(), energyMinimizerLoLBFGS::initializeFromModel(), initializeFromModel(), energyMinimizerGradientDescent::initializeFromModel(), energyMinimizerFIRE::initializeFromModel(), updater::initializeFromModel(), energyMinimizerFIRE::initializeParameters(), velocityVerlet::integrateEOMCPU(), velocityVerlet::integrateEOMGPU(), integrateEquationOfMotion(), energyMinimizerLoLBFGS::lineSearchCPU(), energyMinimizerLoLBFGS::LoLBFGSStepCPU(), energyMinimizerLoLBFGS::LoLBFGSStepGPU(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerLoLBFGS::minimize(), energyMinimizerGradientDescent::minimize(), energyMinimizerFIRE::minimize(), energyMinimizerNesterovAG::nesterovStepCPU(), energyMinimizerNesterovAG::nesterovStepGPU(), and updater::setNdof().
|
protectedinherited |
the total number of non-object sites across all ranks
Referenced by energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), updater::getNTotal(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), and energyMinimizerFIRE::initializeParameters().
|
protectedinherited |
whether the RNGs give reproducible results
Referenced by updater::setReproducible(), and updater::updater().
|
protectedinherited |
The internal time step size.
Referenced by energyMinimizerAdam::adamStepCPU(), energyMinimizerAdam::adamStepGPU(), energyMinimizerFIRE::fireStepCPU(), energyMinimizerFIRE::fireStepGPU(), energyMinimizerGradientDescent::gradientDescentCPU(), energyMinimizerGradientDescent::gradientDescentGPU(), velocityVerlet::integrateEOMCPU(), velocityVerlet::integrateEOMGPU(), energyMinimizerLoLBFGS::minimize(), energyMinimizerFIRE::minimize(), energyMinimizerNesterovAG::nesterovStepCPU(), energyMinimizerNesterovAG::nesterovStepGPU(), energyMinimizerAdam::setAdamParameters(), energyMinimizerFIRE::setDeltaT(), updater::setDeltaT(), energyMinimizerFIRE::setFIREParameters(), energyMinimizerGradientDescent::setGradientDescentParameters(), energyMinimizerLoLBFGS::setLoLBFGSParameters(), and energyMinimizerNesterovAG::setNesterovAGParameters().
|
protectedinherited |
The maximum number of iterations allowed.
Referenced by updater::getMaxIterations(), energyMinimizerAdam::minimize(), energyMinimizerNesterovAG::minimize(), energyMinimizerLoLBFGS::minimize(), and updater::setMaximumIterations().