SPH
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AsymmetricSolver Class Reference

Generic SPH solver, evaluating equations for each particle separately. More...

#include <AsymmetricSolver.h>

Inheritance diagram for AsymmetricSolver:
IAsymmetricSolver ISolver Polymorphic GradHSolver

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 ()
 
- Public Member Functions inherited from IAsymmetricSolver
 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...
 
- Public Member Functions inherited from ISolver
virtual void collide (Storage &UNUSED(storage), Statistics &UNUSED(stats), const Float UNUSED(dt))
 Detects the collisions and computes new positions of particles. More...
 
- Public Member Functions inherited from Polymorphic
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
 
- Protected Member Functions inherited from IAsymmetricSolver
Float getMaxSearchRadius (const Storage &storage) const
 
virtual RawPtr< const IBasicFindergetFinder (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< IBoundaryConditionbc
 
ThreadLocal< ThreadDatathreadData
 
- Protected Attributes inherited from IAsymmetricSolver
AutoPtr< ISymmetricFinderfinder
 Structure used to search for neighbouring particles. More...
 
ISchedulerscheduler
 Scheduler used to parallelize the solver. More...
 
EquationHolder equations
 Holds all equation terms evaluated by the solver. More...
 
LutKernel< DIMENSIONSkernel
 Selected SPH kernel. More...
 
Optional< RadiiHashMapradiiMap
 Hash map used to determine search radii of particles. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AsymmetricSolver() [1/2]

AsymmetricSolver::AsymmetricSolver ( IScheduler scheduler,
const RunSettings settings,
const EquationHolder eqs 
)

Definition at line 119 of file AsymmetricSolver.cpp.

◆ AsymmetricSolver() [2/2]

AsymmetricSolver::AsymmetricSolver ( IScheduler scheduler,
const RunSettings settings,
const EquationHolder eqs,
AutoPtr< IBoundaryCondition > &&  bc 
)

Definition at line 124 of file AsymmetricSolver.cpp.

◆ ~AsymmetricSolver()

AsymmetricSolver::~AsymmetricSolver ( )
default

Member Function Documentation

◆ afterLoop()

void AsymmetricSolver::afterLoop ( Storage storage,
Statistics stats 
)
overrideprotectedvirtual

Implements IAsymmetricSolver.

Definition at line 201 of file AsymmetricSolver.cpp.

◆ beforeLoop()

void AsymmetricSolver::beforeLoop ( Storage storage,
Statistics stats 
)
overrideprotectedvirtual
Todo:
this structure is probably not needed, we only use it by EnergyConservingSolver anyway

Implements IAsymmetricSolver.

Definition at line 139 of file AsymmetricSolver.cpp.

◆ loop()

void AsymmetricSolver::loop ( Storage storage,
Statistics stats 
)
overrideprotectedvirtual

Implements IAsymmetricSolver.

Reimplemented in GradHSolver.

Definition at line 153 of file AsymmetricSolver.cpp.

◆ sanityCheck()

void AsymmetricSolver::sanityCheck ( const Storage storage) const
overrideprotectedvirtual

Implements IAsymmetricSolver.

Definition at line 225 of file AsymmetricSolver.cpp.

Member Data Documentation

◆ bc

AutoPtr<IBoundaryCondition> AsymmetricSolver::bc
protected

Definition at line 108 of file AsymmetricSolver.h.

◆ derivatives

DerivativeHolder AsymmetricSolver::derivatives
protected

Holds all derivatives (shared for all threads)

Definition at line 106 of file AsymmetricSolver.h.

◆ threadData

ThreadLocal<ThreadData> AsymmetricSolver::threadData
protected

Definition at line 121 of file AsymmetricSolver.h.


The documentation for this class was generated from the following files: