OpenLB 1.7
Loading...
Searching...
No Matches
eul2LagrDensity3D.hh
Go to the documentation of this file.
1/* This file is part of the porous model described in
2 * Guo and Zhao (2002) and implemented for OpenLB
3 *
4 * Copyright (C) 2016-2017 Davide Dapelo, Mathias J. Krause
5 * E-mail contact: dapelod@bham.ac.uk
6 *
7 * OpenLB e-mail contact: info@openlb.net
8 * The most recent release of OpenLB can be downloaded at
9 * <http://www.openlb.net/>
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this program; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26
32#ifndef EUL2LAGR_DENSITY_HH
33#define EUL2LAGR_DENSITY_HH
34
35namespace olb {
36
37template<typename T, typename DESCRIPTOR>
39 : BlockLatticeF3D<T, DESCRIPTOR>(blockLattice, 1)
40{
41 this->getName() = "eul2LagrDensity";
42}
43
44template<typename T, typename DESCRIPTOR>
46{
47 auto rhoP = this->_blockLattice.get(input[0], input[1], input[2]).template getFieldPointer<descriptors::EUL2LAGR>();
48 output[0] = rhoP[0];
49 return true;
50}
51
52template<typename T, typename DESCRIPTOR>
55 : SuperLatticeF3D<T, DESCRIPTOR>(sLattice, 1)
56{
57 this->getName() = "eul2LagrDensity";
58 int maxC = this->_sLattice.getLoadBalancer().size();
59 this->_blockF.reserve(maxC);
60 for (int iC = 0; iC < maxC; iC++) {
61 this->_blockF.emplace_back(new BlockLatticeEul2LagrDensity3D<T, DESCRIPTOR>(this->_sLattice.getBlock(iC)));
62 }
63}
64
65
66}
67
68#endif
functor returns pointwise external field for Lagrangian particle density, converted to Eulerian
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
BlockLatticeEul2LagrDensity3D(BlockLattice< T, DESCRIPTOR > &blockLattice)
represents all functors that operate on a DESCRIPTOR in general, e.g. getVelocity(),...
Platform-abstracted block lattice for external access and inter-block interaction.
std::string & getName()
read and write access to name
Definition genericF.hh:51
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
SuperLatticeEul2LagrDensity3D(SuperLattice< T, DESCRIPTOR > &sLattice)
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
SuperLattice< T, DESCRIPTOR > & _sLattice
Super class maintaining block lattices for a cuboid decomposition.
Top level namespace for all of OpenLB.