37template <
typename FloatType, lbmpy::Arch Architecture>
38std::optional<Utils::Vector3d>
41 assert(not(consider_ghosts and m_pending_ghost_comm.test(GhostComm::VEL)));
42 assert(not(consider_ghosts and m_pending_ghost_comm.test(GhostComm::UBB)));
43 if (m_has_boundaries) {
44 auto const is_boundary = get_node_is_boundary(node, consider_ghosts);
45 if (is_boundary and *is_boundary) {
46 return get_node_velocity_at_boundary(node, consider_ghosts);
53 auto field = bc->block->template uncheckedFastGetData<VectorField>(
59template <
typename FloatType, lbmpy::Arch Architecture>
62 m_pending_ghost_comm.set(GhostComm::PDF);
63 m_pending_ghost_comm.set(GhostComm::VEL);
69 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
71 bc->block->template getData<VectorField>(m_velocity_field_id);
73 bc->block->template getData<VectorField>(m_last_applied_force_field_id);
74 auto vel = to_vector3<FloatType>(v);
81template <
typename FloatType, lbmpy::Arch Architecture>
84 assert(not(consider_ghosts and m_pending_ghost_comm.test(GhostComm::PDF)));
90 bc->block->template uncheckedFastGetData<PdfField>(m_pdf_field_id);
96template <
typename FloatType, lbmpy::Arch Architecture>
99 m_pending_ghost_comm.set(GhostComm::PDF);
104 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
111template <
typename FloatType, lbmpy::Arch Architecture>
112std::optional<std::vector<double>>
115 assert(not(consider_ghosts and m_pending_ghost_comm.test(GhostComm::PDF)));
120 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
122 std::vector<double> population(Stencil::Size);
123 for (uint_t f = 0u; f < Stencil::Size; ++f) {
124 population[f] = double_c(pop[f]);
127 return {std::move(population)};
130template <
typename FloatType, lbmpy::Arch Architecture>
133 m_pending_ghost_comm.set(GhostComm::PDF);
134 m_pending_ghost_comm.set(GhostComm::VEL);
139 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
141 bc->block->template getData<VectorField>(m_last_applied_force_field_id);
143 bc->block->template getData<VectorField>(m_velocity_field_id);
144 std::array<FloatType, Stencil::Size> pop;
145 for (uint_t f = 0u; f < Stencil::Size; ++f) {
146 pop[f] = FloatType_c(population[f]);
154template <
typename FloatType, lbmpy::Arch Architecture>
155std::optional<Utils::Vector3d>
163 bc->block->template getData<VectorField>(m_force_to_be_applied_id);
168template <
typename FloatType, lbmpy::Arch Architecture>
169std::optional<Utils::Vector3d>
172 assert(not(consider_ghosts and m_pending_ghost_comm.test(GhostComm::LAF)));
178 bc->block->template getData<VectorField>(m_last_applied_force_field_id);
183template <
typename FloatType, lbmpy::Arch Architecture>
186 m_pending_ghost_comm.set(GhostComm::VEL);
187 m_pending_ghost_comm.set(GhostComm::LAF);
192 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
194 bc->block->template getData<VectorField>(m_last_applied_force_field_id);
196 bc->block->template getData<VectorField>(m_velocity_field_id);
197 auto const vec = to_vector3<FloatType>(force);
204template <
typename FloatType, lbmpy::Arch Architecture>
205std::optional<Utils::VectorXd<9>>
212 auto pdf_field = bc->block->template getData<PdfField>(m_pdf_field_id);
215 pressure_tensor_correction(tensor);
Vector implementation and trait types for boost qvm interoperability.
std::optional< Utils::Vector3d > get_node_last_applied_force(Utils::Vector3i const &node, bool consider_ghosts=false) const override
std::optional< Utils::Vector3d > get_node_velocity(Utils::Vector3i const &node, bool consider_ghosts=false) const override
bool set_node_last_applied_force(Utils::Vector3i const &node, Utils::Vector3d const &force) override
bool set_node_density(Utils::Vector3i const &node, double density) override
std::optional< std::vector< double > > get_node_population(Utils::Vector3i const &node, bool consider_ghosts=false) const override
std::optional< double > get_node_density(Utils::Vector3i const &node, bool consider_ghosts=false) const override
std::optional< Utils::Vector3d > get_node_force_to_be_applied(Utils::Vector3i const &node) const override
bool set_node_velocity(Utils::Vector3i const &node, Utils::Vector3d const &v) override
bool set_node_population(Utils::Vector3i const &node, std::vector< double > const &population) override
std::optional< Utils::VectorXd< 9 > > get_node_pressure_tensor(Utils::Vector3i const &node) const override
void set(GhostLayerField< double, uint_t{19u}> *pdf_field, double const rho_in, double const density, Cell const &cell)
double get(GhostLayerField< double, uint_t{19u}> const *pdf_field, double const density, Cell const &cell)
void set(GhostLayerField< double, uint_t{19u}> const *pdf_field, GhostLayerField< double, uint_t{3u}> *velocity_field, GhostLayerField< double, uint_t{3u}> *force_field, Vector3< double > const &force, double const density, Cell const &cell)
void set(GhostLayerField< double, uint_t{19u}> *pdf_field, std::array< double, 19u > const &pop, Cell const &cell)
auto get(GhostLayerField< double, uint_t{19u}> const *pdf_field, Cell const &cell)
auto get(GhostLayerField< double, uint_t{19u}> const *pdf_field, double const density, Cell const &cell)
auto get(GhostLayerField< double, uint_t{3u}> const *vec_field, Cell const &cell)
void set(GhostLayerField< double, uint_t{19u}> *pdf_field, GhostLayerField< double, uint_t{3u}> *velocity_field, GhostLayerField< double, uint_t{3u}> const *force_field, Vector3< double > const &u, Cell const &cell)
\file PackInfoPdfDoublePrecision.cpp \author pystencils
auto to_vector3d(Vector3< T > const &v) noexcept
std::optional< BlockAndCell > get_block_and_cell(::LatticeWalberla const &lattice, signed_integral_vector auto const &node, bool consider_ghost_layers)
auto to_vector9d(Matrix3< T > const &m) noexcept