SPH
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IAsymmetricSolver Class Referenceabstract

Base class for asymmetric SPH solvers. More...

#include <AsymmetricSolver.h>

Inheritance diagram for IAsymmetricSolver:
ISolver Polymorphic AsymmetricSolver EnergyConservingSolver GradHSolver

Public Member Functions

 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

Float getMaxSearchRadius (const Storage &storage) const
 
virtual RawPtr< const IBasicFindergetFinder (ArrayView< const Vector > r)
 Returns a finder, already build using the provided positions. More...
 
virtual void beforeLoop (Storage &storage, Statistics &stats)=0
 
virtual void loop (Storage &storage, Statistics &stats)=0
 
virtual void afterLoop (Storage &storage, Statistics &stats)=0
 
virtual void sanityCheck (const Storage &storage) const =0
 

Protected Attributes

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

Base class for asymmetric SPH solvers.

Definition at line 45 of file AsymmetricSolver.h.

Constructor & Destructor Documentation

◆ IAsymmetricSolver()

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

Definition at line 58 of file AsymmetricSolver.cpp.

Member Function Documentation

◆ afterLoop()

virtual void IAsymmetricSolver::afterLoop ( Storage storage,
Statistics stats 
)
protectedpure virtual

Implemented in AsymmetricSolver.

◆ beforeLoop()

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

Implemented in AsymmetricSolver.

◆ create()

void IAsymmetricSolver::create ( Storage storage,
IMaterial material 
) const
overridevirtual

Initializes all quantities needed by the solver in the storage.

When called, storage already contains particle positions and their masses. All remaining quantities must be created by the solver. The function is called once for every body in the run. The given storage is guaranteed to be homogeneous; it contains only a single material.

Parameters
storageParticle storage that shall be modified as needed by the solver.
materialMaterial containing parameters of the body being created. The solver can also set up necessary timestepping parameters of the material (ranges and minimal values of quantities).

Implements ISolver.

Reimplemented in GradHSolver.

Definition at line 98 of file AsymmetricSolver.cpp.

◆ getFinder()

RawPtr< const IBasicFinder > IAsymmetricSolver::getFinder ( ArrayView< const Vector r)
protectedvirtual

Returns a finder, already build using the provided positions.

Derived classes might override this function to return generally different finder that the member finder, implementations should therefore use this function instead of accessing the finder directly.

Definition at line 113 of file AsymmetricSolver.cpp.

◆ getMaxSearchRadius()

Float IAsymmetricSolver::getMaxSearchRadius ( const Storage storage) const
protected

Definition at line 104 of file AsymmetricSolver.cpp.

◆ integrate()

void IAsymmetricSolver::integrate ( Storage storage,
Statistics stats 
)
overridevirtual

Computes derivatives of all time-dependent quantities.

The solver can also modify the quantities arbitrarily. It is however not recommended to perform the integration in the solver (using the time step stored in Statistics) as this is a job for timestepping. The solver can modify quantities using boundary conditions, inter-quantity relationships (such as the summation equation for density in SPH), clamping of values etc. It is also possible to add or remove particles in the storage and modify materials. Threads running concurrently with the solver must assume the solver can modify the storage at any time, so accessing the storage from different threads is only allowed before or after integrate; the is no locking for performance reasons.

All highest order derivatives are guaranteed to be set to zero when integrate is called (this is a responsibility of ITimeStepping implementation).

Parameters
storageStorage containing all quantities.
statsObject where the solver saves all computed statistics of the run.

Implements ISolver.

Definition at line 71 of file AsymmetricSolver.cpp.

◆ loop()

virtual void IAsymmetricSolver::loop ( Storage storage,
Statistics stats 
)
protectedpure virtual

Implemented in GradHSolver, and AsymmetricSolver.

◆ sanityCheck()

virtual void IAsymmetricSolver::sanityCheck ( const Storage storage) const
protectedpure virtual

Implemented in AsymmetricSolver.

Member Data Documentation

◆ equations

EquationHolder IAsymmetricSolver::equations
protected

Holds all equation terms evaluated by the solver.

Definition at line 56 of file AsymmetricSolver.h.

◆ finder

AutoPtr<ISymmetricFinder> IAsymmetricSolver::finder
protected

Structure used to search for neighbouring particles.

Should not be accessed by derived classes directly, use getFinder instead.

Definition at line 50 of file AsymmetricSolver.h.

◆ kernel

LutKernel<DIMENSIONS> IAsymmetricSolver::kernel
protected

Selected SPH kernel.

Definition at line 59 of file AsymmetricSolver.h.

◆ radiiMap

Optional<RadiiHashMap> IAsymmetricSolver::radiiMap
protected

Hash map used to determine search radii of particles.

Definition at line 62 of file AsymmetricSolver.h.

◆ scheduler

IScheduler& IAsymmetricSolver::scheduler
protected

Scheduler used to parallelize the solver.

Definition at line 53 of file AsymmetricSolver.h.


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