MPS-Basic
Loading...
Searching...
No Matches
bucket.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "common.hpp"
4#include "domain.hpp"
5#include "particles.hpp"
6
7#include <iostream>
8#include <vector>
9
17class Bucket {
18private:
19public:
20 int num{}, numX{}, numY{}, numZ{};
21 double length{};
23 std::vector<int> next, first, last;
24
25 Bucket() = default;
26
27 Bucket(const double& reMax, const Domain& domain, const size_t& particleSize);
28 void generate(const int& particleNum);
34 void storeParticles(Particles& particles);
35};
Class for bucket for neighbor search.
Definition bucket.hpp:17
Bucket()=default
void storeParticles(Particles &particles)
store particles in the bucket
Definition bucket.cpp:24
std::vector< int > next
Definition bucket.hpp:23
int numY
Definition bucket.hpp:20
int num
Definition bucket.hpp:20
std::vector< int > last
Definition bucket.hpp:23
int numZ
Definition bucket.hpp:20
double length
Definition bucket.hpp:21
std::vector< int > first
Definition bucket.hpp:23
void generate(const int &particleNum)
Definition bucket.cpp:6
int numX
Definition bucket.hpp:20
Domain domain
Definition bucket.hpp:22
represents the domain of the simulation
Definition domain.hpp:8
A collection of particles.
Definition particles.hpp:10