SPH
DensityIndependentSolver.h
Go to the documentation of this file.
1 #pragma once
2 
7 
10 #include "sph/kernel/Kernel.h"
11 #include "thread/ThreadLocal.h"
12 #include "timestepping/ISolver.h"
13 
15 
25 private:
26  IScheduler& scheduler;
27 
28  AutoPtr<IBasicFinder> finder;
29 
31  EquationHolder equations;
32 
34  DerivativeHolder derivatives;
35 
37 
38  struct ThreadData {
41 
43  Array<Size> idxs;
44 
46  Array<Vector> grads;
47  };
48 
49  ThreadLocal<ThreadData> threadData;
50 
51 public:
52  explicit DensityIndependentSolver(IScheduler& scheduler, const RunSettings& settings);
53 
55 
56  virtual void integrate(Storage& storage, Statistics& stats) override;
57 
58  virtual void create(Storage& storage, IMaterial& material) const override;
59 };
60 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
Right-hand side term of SPH equations.
Base interface for all solvers.
SPH kernels.
#define NAMESPACE_SPH_END
Definition: Object.h:12
Template for thread-local storage.
Density-independent SPH solver.
DensityIndependentSolver(IScheduler &scheduler, const RunSettings &settings)
virtual void integrate(Storage &storage, Statistics &stats) override
Computes derivatives of all time-dependent quantities.
virtual void create(Storage &storage, IMaterial &material) const override
Initializes all quantities needed by the solver in the storage.
Container holding derivatives and the storage they accumulate to.
Definition: Derivative.h:173
Container holding equation terms.
Definition: EquationTerm.h:238
Material settings and functions specific for one material.
Definition: IMaterial.h:110
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Definition: Scheduler.h:27
Base class for all solvers.
Definition: ISolver.h:20
Object holding various statistics about current run.
Definition: Statistics.h:22
Container storing all quantities used within the simulations.
Definition: Storage.h:230