|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
#include <barnes_hut.hpp>
Public Types | |
| using | Octree = BlockOctree< Dim, Bits > |
| using | M = typename Octree::M |
| using | Code = typename Octree::Code |
| using | Coord = typename Octree::Coord |
Public Member Functions | |
| void | build (const std::vector< Vec< Dim > > &pos, const std::vector< double > &mass, const AmrGeometry< Dim > &geo, unsigned lmax, double theta, double soft=1e-3) |
Build the tree from particle positions (+ masses) inside the world box described by geo (origin + h0; the box spans 2^lmax fine cells per axis). | |
| Vec< Dim > | acceleration (Index pi) const |
Approximate acceleration on particle pi. | |
| std::vector< Vec< Dim > > | accelerations () const |
| Vec< Dim > | accelerationDirect (Index pi) const |
Direct O(N^2) reference acceleration on particle pi (for validation). | |
| const Octree & | octree () const |
Definition at line 32 of file barnes_hut.hpp.
| using peclet::core::amr::BarnesHut< Dim, Bits >::Octree = BlockOctree<Dim, Bits> |
Definition at line 34 of file barnes_hut.hpp.
| using peclet::core::amr::BarnesHut< Dim, Bits >::M = typename Octree::M |
Definition at line 35 of file barnes_hut.hpp.
| using peclet::core::amr::BarnesHut< Dim, Bits >::Code = typename Octree::Code |
Definition at line 36 of file barnes_hut.hpp.
| using peclet::core::amr::BarnesHut< Dim, Bits >::Coord = typename Octree::Coord |
Definition at line 37 of file barnes_hut.hpp.
|
inline |
Build the tree from particle positions (+ masses) inside the world box described by geo (origin + h0; the box spans 2^lmax fine cells per axis).
Definition at line 41 of file barnes_hut.hpp.
References peclet::core::amr::BlockOctree< Dim, Bits >::code(), peclet::core::amr::BlockOctree< Dim, Bits >::init(), peclet::core::amr::BlockOctree< Dim, Bits >::level(), peclet::core::amr::BlockOctree< Dim, Bits >::numLeaves(), and peclet::core::amr::BlockOctree< Dim, Bits >::refineIf().
|
inline |
Approximate acceleration on particle pi.
Definition at line 104 of file barnes_hut.hpp.
Referenced by peclet::core::amr::BarnesHut< Dim, Bits >::accelerations().
|
inline |
Definition at line 110 of file barnes_hut.hpp.
References peclet::core::amr::BarnesHut< Dim, Bits >::acceleration().
|
inline |
Direct O(N^2) reference acceleration on particle pi (for validation).
Definition at line 118 of file barnes_hut.hpp.
|
inline |
Definition at line 126 of file barnes_hut.hpp.