ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
lb_kernels.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2026 The ESPResSo project
3 *
4 * This file is part of ESPResSo.
5 *
6 * ESPResSo is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ESPResSo is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
23
36
37#ifdef __AVX2__
42#else
47#endif
48
49namespace walberla {
50namespace detail {
51
52template <typename FT = double, lbmpy::Arch AT = lbmpy::Arch::CPU>
53struct KernelTrait {
54#ifdef __AVX2__
55 using StreamCollisionModelThermalized =
56 pystencils::StreamCollideSweepThermalizedDoublePrecisionAVX;
57 using StreamCollisionModelLeesEdwards =
58 pystencils::StreamCollideSweepLeesEdwardsDoublePrecisionAVX;
59#else
60 using StreamCollisionModelThermalized =
61 pystencils::StreamCollideSweepThermalizedDoublePrecision;
62 using StreamCollisionModelLeesEdwards =
63 pystencils::StreamCollideSweepLeesEdwardsDoublePrecision;
64#endif
65 using InitialPDFsSetter = pystencils::InitialPDFsSetterDoublePrecision;
66 using UpdateVelFromPDF = pystencils::UpdateVelFromPDFDoublePrecision;
67 using PackInfoPdf = pystencils::PackInfoPdfDoublePrecision;
68 using PackInfoVec = pystencils::PackInfoVecDoublePrecision;
69 using DynamicUBB = lbm::DynamicUBBDoublePrecision;
70};
71
72template <> struct KernelTrait<float, lbmpy::Arch::CPU> {
73#ifdef __AVX2__
74 using StreamCollisionModelThermalized =
75 pystencils::StreamCollideSweepThermalizedSinglePrecisionAVX;
76 using StreamCollisionModelLeesEdwards =
77 pystencils::StreamCollideSweepLeesEdwardsSinglePrecisionAVX;
78#else
79 using StreamCollisionModelThermalized =
80 pystencils::StreamCollideSweepThermalizedSinglePrecision;
81 using StreamCollisionModelLeesEdwards =
82 pystencils::StreamCollideSweepLeesEdwardsSinglePrecision;
83#endif
84 using InitialPDFsSetter = pystencils::InitialPDFsSetterSinglePrecision;
85 using UpdateVelFromPDF = pystencils::UpdateVelFromPDFSinglePrecision;
86 using PackInfoPdf = pystencils::PackInfoPdfSinglePrecision;
87 using PackInfoVec = pystencils::PackInfoVecSinglePrecision;
88 using DynamicUBB = lbm::DynamicUBBSinglePrecision;
89};
90
91} // namespace detail
92} // namespace walberla
\file PackInfoPdfDoublePrecision.cpp \author pystencils