MPS-Basic
Loading...
Searching...
No Matches
implicit.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../particles.hpp"
4#include "../refvalues.hpp"
6#include "interface.hpp"
8
9#include <Eigen/Sparse>
10#include <memory>
11#include <vector>
12
13namespace PressureCalculator {
14
21class Implicit : public Interface {
22public:
27 std::vector<double> calc(Particles& particles) override;
28 ~Implicit() override;
29
31 int dimension,
32 double particleDistance,
33 double re_forGradient,
34 double re_forLaplacian,
35 double dt,
36 double compressibility,
37 double relaxationCoefficient,
38 std::unique_ptr<DirichletBoundaryConditionGenerator::Interface>&& dirichletBoundaryConditionGenerator
39 );
40
41private:
43 std::vector<double> pressure;
44 std::unique_ptr<DirichletBoundaryConditionGenerator::Interface> dirichletBoundaryConditionGenerator;
46
51};
52
53} // namespace PressureCalculator
A collection of particles.
Definition particles.hpp:10
Class for implicit pressure calculation.
Definition implicit.hpp:21
void removeNegativePressure()
remove negative pressure for stability
Definition implicit.cpp:51
std::vector< double > pressure
Solution of pressure calculation.
Definition implicit.hpp:43
PressurePoissonEquation pressurePoissonEquation
Definition implicit.hpp:45
std::unique_ptr< DirichletBoundaryConditionGenerator::Interface > dirichletBoundaryConditionGenerator
Definition implicit.hpp:44
Implicit(int dimension, double particleDistance, double re_forGradient, double re_forLaplacian, double dt, double compressibility, double relaxationCoefficient, std::unique_ptr< DirichletBoundaryConditionGenerator::Interface > &&dirichletBoundaryConditionGenerator)
Definition implicit.cpp:13
std::vector< double > calc(Particles &particles) override
calculate pressure
Definition implicit.cpp:39
Pressure calculator interface.
Definition interface.hpp:15
Class for setting up and solving pressure Poisson equation.