SPH
|
Generic external force given by lambda function. More...
#include <Potentials.h>
Public Member Functions | |
ExternalForce (TFunctor &&functor) | |
virtual void | setDerivatives (DerivativeHolder &UNUSED(derivatives), const RunSettings &UNUSED(settings)) override |
virtual void | initialize (IScheduler &UNUSED(scheduler), Storage &UNUSED(storage), const Float UNUSED(t)) override |
virtual void | finalize (IScheduler &UNUSED(scheduler), Storage &storage, const Float t) override |
virtual void | create (Storage &UNUSED(storage), IMaterial &UNUSED(material)) const override |
![]() | |
virtual void | setDerivatives (DerivativeHolder &derivatives, const RunSettings &settings)=0 |
Sets derivatives required by this term. More... | |
virtual void | initialize (IScheduler &scheduler, Storage &storage, const Float t)=0 |
Initialize all the derivatives and/or quantity values before derivatives are computed. More... | |
virtual void | finalize (IScheduler &scheduler, Storage &storage, const Float t)=0 |
Computes all the derivatives and/or quantity values based on accumulated derivatives. More... | |
virtual void | create (Storage &storage, IMaterial &material) const =0 |
Creates all quantities needed by the term using given material. More... | |
![]() | |
virtual | ~Polymorphic () |
Generic external force given by lambda function.
Adds an acceleration term to every particle given by user-specified function. The term can only depend on particle positions (not speed nor any other quantity). Energy is not modified by the force. The term is given in template parameter of the class, takes particle position as an argument and returns the acceleration. The type be copyable or moveable as the functor is stored as member variable.
To utilize type deduction, use helper function makeExternalForce
Definition at line 22 of file Potentials.h.
|
inline |
Definition at line 27 of file Potentials.h.
|
inlineoverridevirtual |
Definition at line 46 of file Potentials.h.
|
inlineoverridevirtual |
Definition at line 37 of file Potentials.h.
|
inlineoverridevirtual |
Definition at line 33 of file Potentials.h.
|
inlineoverridevirtual |
Definition at line 30 of file Potentials.h.