ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ek_walberla_init.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022-2023 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#include "EKinWalberlaImpl.hpp"
23
28
29#include <utils/Vector.hpp>
30
31#include <memory>
32
33namespace walberla {
34
35std::shared_ptr<EKinWalberlaBase>
36new_ek_walberla(std::shared_ptr<LatticeWalberla> const &lattice,
37 double diffusion, double kT, double valency,
38 Utils::Vector3d ext_efield, double density, bool advection,
39 bool friction_coupling, bool single_precision, bool thermalized,
40 unsigned int seed) {
41 if (single_precision) {
42 return std::make_shared<EKinWalberlaImpl<13, float>>(
43 lattice, diffusion, kT, valency, ext_efield, density, advection,
44 friction_coupling, thermalized, seed);
45 }
46
47 return std::make_shared<EKinWalberlaImpl<13, double>>(
48 lattice, diffusion, kT, valency, ext_efield, density, advection,
49 friction_coupling, thermalized, seed);
50}
51
52std::shared_ptr<EKReactionBase>
53new_ek_reaction_bulk(std::shared_ptr<LatticeWalberla> const &lattice,
54 typename EKReactionBase::reactants_type const &reactants,
55 double coefficient) {
56 return std::make_shared<EKReactionImplBulk>(lattice, reactants, coefficient);
57}
58
59std::shared_ptr<EKReactionBaseIndexed> new_ek_reaction_indexed(
60 std::shared_ptr<LatticeWalberla> const &lattice,
61 typename EKReactionBase::reactants_type const &reactants,
62 double coefficient) {
63 return std::make_shared<EKReactionImplIndexed>(lattice, reactants,
64 coefficient);
65}
66
67} // namespace walberla
Vector implementation and trait types for boost qvm interoperability.
std::vector< std::shared_ptr< EKReactant > > reactants_type
\file PackInfoPdfDoublePrecision.cpp \author pystencils
std::shared_ptr< EKinWalberlaBase > new_ek_walberla(std::shared_ptr< LatticeWalberla > const &lattice, double diffusion, double kT, double valency, Utils::Vector3d ext_efield, double density, bool advection, bool friction_coupling, bool single_precision, bool thermalized, unsigned int seed)
std::shared_ptr< EKReactionBase > new_ek_reaction_bulk(std::shared_ptr< LatticeWalberla > const &lattice, typename EKReactionBase::reactants_type const &reactants, double coefficient)
std::shared_ptr< EKReactionBaseIndexed > new_ek_reaction_indexed(std::shared_ptr< LatticeWalberla > const &lattice, typename EKReactionBase::reactants_type const &reactants, double coefficient)