OpenLB 1.7
Loading...
Searching...
No Matches
superDiscretizationF2D.hh
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2019 Tom Braun
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#ifndef SUPER_DISCRETIZATION_F_2D_HH
25#define SUPER_DISCRETIZATION_F_2D_HH
26
29
30namespace olb {
31
32
33template <typename T, typename W>
35 T bottomBoundary,
36 T topBoundary,
37 int n)
38 :SuperF2D<T, W>(f->getSuperStructure(),f->getTargetDim()), _f(f), _bottomBoundary(bottomBoundary), _topBoundary(topBoundary), _n(n)
39{
40 this->getName()="Discretization(" + _f->getName() + ")";
41
42 LoadBalancer<T>& load = _f->getSuperStructure().getLoadBalancer();
43
44 for (int iC = 0; iC < load.size(); ++iC) {
45 this->_blockF.emplace_back(
46 new BlockDiscretizationF2D<W>(_f->getBlockF(iC), _bottomBoundary, _topBoundary, _n));
47 }
48}
49
50}
51#endif
Block functor for discretizing values by an interval (bottomBoundary,topBoundary),...
Smart pointer for managing the various ways of passing functors around.
Definition functorPtr.h:60
std::string & getName()
read and write access to name
Definition genericF.hh:51
Base class for all LoadBalancer.
SuperDiscretizationF2D(FunctorPtr< SuperF2D< T, W > > &&f, T bottomBoundary, T topBoundary, int n=1)
represents all functors that operate on a SuperStructure<T,2> in general
std::vector< std::unique_ptr< BlockF2D< W > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
Top level namespace for all of OpenLB.