SPH
|
Generic SPH solver, evaluating equations for each particle separately. More...
#include <AsymmetricSolver.h>
Classes | |
struct | ThreadData |
Public Member Functions | |
AsymmetricSolver (IScheduler &scheduler, const RunSettings &settings, const EquationHolder &eqs) | |
AsymmetricSolver (IScheduler &scheduler, const RunSettings &settings, const EquationHolder &eqs, AutoPtr< IBoundaryCondition > &&bc) | |
~AsymmetricSolver () | |
![]() | |
IAsymmetricSolver (IScheduler &scheduler, const RunSettings &settings, const EquationHolder &eqs) | |
virtual void | integrate (Storage &storage, Statistics &stats) override |
Computes derivatives of all time-dependent quantities. More... | |
virtual void | create (Storage &storage, IMaterial &material) const override |
Initializes all quantities needed by the solver in the storage. More... | |
![]() | |
virtual void | collide (Storage &UNUSED(storage), Statistics &UNUSED(stats), const Float UNUSED(dt)) |
Detects the collisions and computes new positions of particles. More... | |
![]() | |
virtual | ~Polymorphic () |
Protected Member Functions | |
virtual void | beforeLoop (Storage &storage, Statistics &stats) override |
virtual void | loop (Storage &storage, Statistics &stats) override |
virtual void | afterLoop (Storage &storage, Statistics &stats) override |
virtual void | sanityCheck (const Storage &storage) const override |
![]() | |
Float | getMaxSearchRadius (const Storage &storage) const |
virtual RawPtr< const IBasicFinder > | getFinder (ArrayView< const Vector > r) |
Returns a finder, already build using the provided positions. More... | |
Protected Attributes | |
DerivativeHolder | derivatives |
Holds all derivatives (shared for all threads) More... | |
AutoPtr< IBoundaryCondition > | bc |
ThreadLocal< ThreadData > | threadData |
![]() | |
AutoPtr< ISymmetricFinder > | finder |
Structure used to search for neighbouring particles. More... | |
IScheduler & | scheduler |
Scheduler used to parallelize the solver. More... | |
EquationHolder | equations |
Holds all equation terms evaluated by the solver. More... | |
LutKernel< DIMENSIONS > | kernel |
Selected SPH kernel. More... | |
Optional< RadiiHashMap > | radiiMap |
Hash map used to determine search radii of particles. More... | |
Generic SPH solver, evaluating equations for each particle separately.
Contrary to SymmetricSolver, this solver computes the derivatives for each particle separately, meaning each particle pair is evaluated twice (or not at all, of course). This leads to generally slower evaluation, as we have to compute twice as much interactions. However, the solver is more versatile and can solve equations with asymmetric derivatives. This allows to use helper terms (like strain rate correction tensor) that require two passes over the particle neighbours; the derivative is completed after the neighbours are summed up, as the list of neighbours contains ALL of the neighbouring particles (as opposed to SymmetricSolver, where the list of neighbours only contains the particles with lower smoothing length).
Another benefit is lower memory overhead (all threads can write into the same buffers) and generally higher CPU usage.
Definition at line 103 of file AsymmetricSolver.h.
AsymmetricSolver::AsymmetricSolver | ( | IScheduler & | scheduler, |
const RunSettings & | settings, | ||
const EquationHolder & | eqs | ||
) |
Definition at line 119 of file AsymmetricSolver.cpp.
AsymmetricSolver::AsymmetricSolver | ( | IScheduler & | scheduler, |
const RunSettings & | settings, | ||
const EquationHolder & | eqs, | ||
AutoPtr< IBoundaryCondition > && | bc | ||
) |
Definition at line 124 of file AsymmetricSolver.cpp.
|
default |
|
overrideprotectedvirtual |
Implements IAsymmetricSolver.
Definition at line 201 of file AsymmetricSolver.cpp.
|
overrideprotectedvirtual |
Implements IAsymmetricSolver.
Definition at line 139 of file AsymmetricSolver.cpp.
|
overrideprotectedvirtual |
Implements IAsymmetricSolver.
Reimplemented in GradHSolver.
Definition at line 153 of file AsymmetricSolver.cpp.
|
overrideprotectedvirtual |
Implements IAsymmetricSolver.
Definition at line 225 of file AsymmetricSolver.cpp.
|
protected |
Definition at line 108 of file AsymmetricSolver.h.
|
protected |
Holds all derivatives (shared for all threads)
Definition at line 106 of file AsymmetricSolver.h.
|
protected |
Definition at line 121 of file AsymmetricSolver.h.