Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
A lattice-based force specialized to lattices (which support getNiehgbor function) More...
#include <baseLatticeForce.h>
Public Member Functions | |
baseLatticeForce () | |
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 | computeForceGPU (GPUArray< dVec > &forces, bool zeroOutForce=true) |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions. More... | |
virtual void | computeForceCPU (GPUArray< dVec > &forces, bool zeroOutForce=true) |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions. More... | |
void | setJ (scalar _j) |
virtual scalar | computeEnergy (bool verbose=false) |
compute the energy associated with this force More... | |
virtual void | computeEnergyCPU (bool verbose=false) |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions. More... | |
virtual void | computeEnergyGPU (bool verbose=false) |
virtual void | setModel (shared_ptr< cubicLattice > _model) |
virtual function to allow the model to be a derived class More... | |
virtual scalar | getClassSize () |
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 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... | |
Public Attributes | |
shared_ptr< kernelTuner > | forceTuner |
kernelTuner object 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... | |
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... | |
Protected Attributes | |
shared_ptr< cubicLattice > | lattice |
scalar | J |
if all lattice interactions are uniform More... | |
A lattice-based force specialized to lattices (which support getNiehgbor function)
baseLatticeForce::baseLatticeForce | ( | ) |
References forceTuner, J, and force::useNeighborList.
|
inlinevirtual |
the call to compute forces, and store them in the referenced variable
Reimplemented from force.
Reimplemented in landauDeGennesLC.
References computeForceCPU(), computeForceGPU(), and force::useGPU.
|
virtual |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions.
Reimplemented in landauDeGennesLC.
References ArrayHandle< T >::data, access_location::device, forceTuner, gpu_lattice_spin_force_nn(), J, lattice, access_mode::read, and access_mode::readwrite.
Referenced by computeForces().
|
virtual |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions.
References ArrayHandle< T >::data, J, lattice, make_dVec(), and force::neighbors.
Referenced by computeForces().
|
inlinevirtual |
compute the energy associated with this force
Reimplemented from force.
References computeEnergyCPU(), computeEnergyGPU(), force::energy, and force::useGPU.
|
virtual |
As an example of usage, we'll implement an n-Vector model force w/ nearest-neighbor interactions.
Reimplemented in landauDeGennesLC.
References dot(), force::energy, J, lattice, and force::neighbors.
Referenced by computeEnergy().
|
inlinevirtual |
|
inlinevirtual |
virtual function to allow the model to be a derived class
Reimplemented in landauDeGennesLC.
References lattice, and force::model.
|
inlinevirtual |
Reimplemented from force.
Reimplemented in landauDeGennesLC.
References force::getClassSize(), and scalar.
Referenced by landauDeGennesLC::getClassSize().
|
virtualinherited |
some generic function to set parameters
|
inlineinherited |
set the simulation
References force::sim.
|
inlinevirtualinherited |
virtual function to allow the model to be a derived class
References force::model.
|
inlinevirtualinherited |
compute the system-averaged pressure tensor; return identity if the force hasn't defined this yet
|
inlinevirtualinherited |
Enforce GPU operation.
References force::neighbors, force::useGPU, and force::useNeighborList.
|
inlineinherited |
tell the force to use a neighbor list
References force::neighbors, and force::useNeighborList.
|
inlinevirtualinherited |
allow for setting multiple threads
References n, and force::nThreads.
shared_ptr<kernelTuner> baseLatticeForce::forceTuner |
|
protected |
Referenced by landauDeGennesLC::computeAllDistortionTermsBoundaryCPU(), landauDeGennesLC::computeAllDistortionTermsBulkCPU(), landauDeGennesLC::computeBoundaryForcesCPU(), landauDeGennesLC::computeBoundaryForcesGPU(), computeEnergyCPU(), landauDeGennesLC::computeEnergyCPU(), landauDeGennesLC::computeEnergyGPU(), landauDeGennesLC::computeEorHFieldForcesCPU(), landauDeGennesLC::computeEorHFieldForcesGPU(), landauDeGennesLC::computeFirstDerivatives(), computeForceCPU(), landauDeGennesLC::computeForceCPU(), computeForceGPU(), landauDeGennesLC::computeForceGPU(), landauDeGennesLC::computeL1BoundaryCPU(), landauDeGennesLC::computeL1BulkCPU(), landauDeGennesLC::computeObjectForces(), landauDeGennesLC::printTuners(), landauDeGennesLC::setModel(), and setModel().
|
protected |
if all lattice interactions are uniform
Referenced by baseLatticeForce(), computeEnergyCPU(), computeForceCPU(), computeForceGPU(), and setJ().
|
inherited |
A pointer to the governing simulation.
Referenced by force::setSimulation().
|
inherited |
A pointer to a simpleModel that the updater acts on.
Referenced by landauDeGennesLC::setModel(), force::setModel(), and setModel().
|
inherited |
whether the updater does its work on the GPU or not
Referenced by computeEnergy(), landauDeGennesLC::computeFirstDerivatives(), computeForces(), landauDeGennesLC::computeForces(), landauDeGennesLC::computeObjectForces(), force::force(), and force::setGPU().
|
inherited |
whether the updater never does work on the GPU
Referenced by landauDeGennesLC::landauDeGennesLC().
|
inherited |
Forces might update the total energy associated with them.
Referenced by computeEnergy(), computeEnergyCPU(), landauDeGennesLC::computeEnergyCPU(), computeEnergyGPU(), and landauDeGennesLC::computeEnergyGPU().
on the gpu, this is per particle and then a reduction can be called
Referenced by force::getClassSize(), and landauDeGennesLC::landauDeGennesLC().
|
inherited |
does the force get an assist from a neighbor list?
Referenced by landauDeGennesLC::baseInitialization(), baseLatticeForce(), force::force(), force::setGPU(), and force::setNeighborList().
|
inherited |
a pointer to a neighbor list the force might use
Referenced by landauDeGennesLC::computeBoundaryForcesCPU(), computeEnergyCPU(), landauDeGennesLC::computeEnergyCPU(), landauDeGennesLC::computeEorHFieldForcesCPU(), landauDeGennesLC::computeFirstDerivatives(), computeForceCPU(), force::setGPU(), and force::setNeighborList().
|
inherited |
number of threads to use if compiled with openmp
Referenced by force::setNThreads().