SPH
ISolver.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "common/ForwardDecl.h"
10 #include "quantities/Storage.h"
11 
13 
20 class ISolver : public Polymorphic {
21 public:
38  virtual void integrate(Storage& storage, Statistics& stats) = 0;
39 
54  virtual void collide(Storage& UNUSED(storage), Statistics& UNUSED(stats), const Float UNUSED(dt)) {}
55 
66  virtual void create(Storage& storage, IMaterial& material) const = 0;
67 };
68 
69 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Definition: Globals.h:13
#define UNUSED(x)
Definition: Object.h:37
#define NAMESPACE_SPH_END
Definition: Object.h:12
Container for storing particle quantities and materials.
Basic vector algebra. Computations are accelerated using SIMD.
Material settings and functions specific for one material.
Definition: IMaterial.h:110
Base class for all solvers.
Definition: ISolver.h:20
virtual void integrate(Storage &storage, Statistics &stats)=0
Computes derivatives of all time-dependent quantities.
virtual void create(Storage &storage, IMaterial &material) const =0
Initializes all quantities needed by the solver in the storage.
virtual void collide(Storage &UNUSED(storage), Statistics &UNUSED(stats), const Float UNUSED(dt))
Detects the collisions and computes new positions of particles.
Definition: ISolver.h:54
Object holding various statistics about current run.
Definition: Statistics.h:22
Container storing all quantities used within the simulations.
Definition: Storage.h:230
Base class for all polymorphic objects.
Definition: Object.h:88