25#include "core/DataTypes.h"
26#include "core/logging/Logging.h"
28#include "blockforest/StructuredBlockForest.h"
29#include "core/debug/Debug.h"
30#include "domain_decomposition/BlockDataID.h"
31#include "domain_decomposition/IBlock.h"
32#include "field/FlagField.h"
33#include "field/GhostLayerField.h"
40#define RESTRICT __restrict__
45#ifdef WALBERLA_BUILD_WITH_HALF_PRECISION_SUPPORT
63 return x ==
o.x &&
y ==
o.y &&
z ==
o.z &&
dir ==
o.dir &&
76 return other.cpuVectors_ == cpuVectors_;
82 return cpuVectors_[t].empty() ?
nullptr : cpuVectors_[t].data();
88 std::vector<CpuIndexVector> cpuVectors_{
NUM_TYPES};
92 const std::shared_ptr<StructuredBlockForest> &
blocks,
94 std::function<
double(
const Cell &,
95 const shared_ptr<StructuredBlockForest> &, IBlock &)>
98 auto createIdxVector = [](IBlock *
const, StructuredBlockStorage *
const) {
116 "Boundary condition was not generated including force calculation.")
121 return [
this](IBlock *b) { this->
run(b); };
125 return [
this](IBlock *b) { this->
inner(b); };
129 return [
this](IBlock *b) { this->
outer(b); };
132 template <
typename FlagField_T>
141 template <
typename FlagField_T>
197 std::function<
double(
const Cell &,
const shared_ptr<StructuredBlockForest> &,
auto & indexVector(Type t)
auto const & indexVector(Type t) const
bool operator==(IndexVectors const &other) const
std::vector< IndexInfo > CpuIndexVector
IndexInfo * pointerCpu(Type t)
std::function< void(IBlock *)> getSweep()
void fillFromFlagField(const shared_ptr< StructuredBlockForest > &blocks, IBlock *block, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
void outer(IBlock *block)
Vector3< double > getForce(IBlock *)
void fillFromFlagField(const std::shared_ptr< StructuredBlockForest > &blocks, ConstBlockDataID flagFieldID, FlagUID boundaryFlagUID, FlagUID domainFlagUID)
Dirichlet_double_precision(const std::shared_ptr< StructuredBlockForest > &blocks, BlockDataID fieldID_, std::function< double(const Cell &, const shared_ptr< StructuredBlockForest > &, IBlock &)> &dirichletCallback)
void operator()(IBlock *block)
std::function< void(IBlock *)> getInnerSweep()
std::function< void(IBlock *)> getOuterSweep()
void inner(IBlock *block)
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils
bool operator==(const IndexInfo &o) const
IndexInfo(int32_t x_, int32_t y_, int32_t z_, int32_t dir_)