Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
A base class for implementing force calculations. More...
#include <baseForce.h>
Public Member Functions | |
force () | |
virtual void | computeForces (GPUArray< dVec > &forces, bool zeroOutForce=true, int type=0) |
the call to compute forces, and store them in the referenced variable More... | |
virtual void | setForceParameters (vector< scalar > ¶ms) |
some generic function to set parameters 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... | |
virtual scalar | computeEnergy (bool verbose=false) |
compute the energy associated with this force More... | |
virtual MatrixDxD | computePressureTensor () |
compute the system-averaged pressure tensor; return identity if the force hasn't defined this yet More... | |
virtual void | setGPU (bool _useGPU=true) |
Enforce GPU operation. More... | |
void | setNeighborList (shared_ptr< neighborList > _neighbor) |
tell the force to use a neighbor list More... | |
virtual void | setNThreads (int n) |
allow for setting multiple threads More... | |
virtual scalar | getClassSize () |
Public Attributes | |
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... | |
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... | |
scalar | energy |
Forces might update the total energy associated with them. More... | |
GPUArray< scalar > | energyPerParticle |
on the gpu, this is per particle and then a reduction can be called More... | |
bool | useNeighborList |
does the force get an assist from a neighbor list? More... | |
shared_ptr< neighborList > | neighbors |
a pointer to a neighbor list the force might use More... | |
int | nThreads =1 |
number of threads to use if compiled with openmp More... | |
A base class for implementing force calculations.
force::force | ( | ) |
|
virtual |
the call to compute forces, and store them in the referenced variable
Reimplemented in landauDeGennesLC, and baseLatticeForce.
|
virtual |
some generic function to set parameters
|
inline |
set the simulation
References sim.
|
inlinevirtual |
virtual function to allow the model to be a derived class
References model.
|
inlinevirtual |
compute the energy associated with this force
Reimplemented in baseLatticeForce.
|
inlinevirtual |
compute the system-averaged pressure tensor; return identity if the force hasn't defined this yet
|
inlinevirtual |
Enforce GPU operation.
References neighbors, useGPU, and useNeighborList.
|
inline |
tell the force to use a neighbor list
References neighbors, and useNeighborList.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in landauDeGennesLC, and baseLatticeForce.
References energyPerParticle, GPUArray< T >::getNumElements(), and scalar.
Referenced by baseLatticeForce::getClassSize().
shared_ptr<basicSimulation> force::sim |
A pointer to the governing simulation.
Referenced by setSimulation().
shared_ptr<simpleModel> force::model |
A pointer to a simpleModel that the updater acts on.
Referenced by landauDeGennesLC::setModel(), setModel(), and baseLatticeForce::setModel().
bool force::useGPU |
whether the updater does its work on the GPU or not
Referenced by baseLatticeForce::computeEnergy(), landauDeGennesLC::computeFirstDerivatives(), baseLatticeForce::computeForces(), landauDeGennesLC::computeForces(), landauDeGennesLC::computeObjectForces(), force(), and setGPU().
bool force::neverGPU |
whether the updater never does work on the GPU
Referenced by landauDeGennesLC::landauDeGennesLC().
scalar force::energy |
Forces might update the total energy associated with them.
Referenced by baseLatticeForce::computeEnergy(), baseLatticeForce::computeEnergyCPU(), landauDeGennesLC::computeEnergyCPU(), baseLatticeForce::computeEnergyGPU(), and landauDeGennesLC::computeEnergyGPU().
on the gpu, this is per particle and then a reduction can be called
Referenced by getClassSize(), and landauDeGennesLC::landauDeGennesLC().
bool force::useNeighborList |
does the force get an assist from a neighbor list?
Referenced by landauDeGennesLC::baseInitialization(), baseLatticeForce::baseLatticeForce(), force(), setGPU(), and setNeighborList().
shared_ptr<neighborList> force::neighbors |
a pointer to a neighbor list the force might use
Referenced by landauDeGennesLC::computeBoundaryForcesCPU(), baseLatticeForce::computeEnergyCPU(), landauDeGennesLC::computeEnergyCPU(), landauDeGennesLC::computeEorHFieldForcesCPU(), landauDeGennesLC::computeFirstDerivatives(), baseLatticeForce::computeForceCPU(), setGPU(), and setNeighborList().
int force::nThreads =1 |
number of threads to use if compiled with openmp
Referenced by setNThreads().