OpenLB 1.7
Loading...
Searching...
No Matches
superLattice2D.hh
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2007 Mathias J. Krause
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
29#ifndef SUPER_LATTICE_2D_HH
30#define SUPER_LATTICE_2D_HH
31
32#include <limits>
33#include <numeric>
34
36#include "cell.h"
40#include "superLattice2D.h"
41#include "io/base64.h"
44#include "io/serializerIO.h"
45
46namespace olb {
47
48//TODO: 200116 preliminary version
49template<typename T, typename DESCRIPTOR>
51 T size,
54{
55 FunctorPtr<SuperIndicatorF2D<T>>&& indicator = sGeometry.getMaterialIndicator(material);
56 const int overlap = indicator->getSuperGeometry().getOverlap();
57 for (int iC = 0; iC < sLattice.getLoadBalancer().size(); ++iC) {
58 int globIC = sLattice.getLoadBalancer().glob(iC);
59 BlockIndicatorF2D<T>& blockIndicator = indicator->getBlockIndicatorF(iC);
60 setBlockExternalPSMParticleField( sGeometry.getBlockGeometry(iC), velocity, size, epsilon,
61 sLattice.getBlock(iC), blockIndicator, globIC, overlap);
62 }
63}
64
65
66
67//Set Zeta-Field (Geng2019)
68/* TODO: Change that it uses the new particle interface
69template<typename T, typename DESCRIPTOR>
70void setSuperZetaParticleField( SuperGeometry<T,2>& sGeometry, AnalyticalF<2,T,T>& velocity,
71 SmoothIndicatorF2D<T,T,true>& sIndicator,
72 SuperLattice<T, DESCRIPTOR>& sLattice )
73{
74 for (int iC = 0; iC < sLattice.getLoadBalancer().size(); ++iC) {
75 setBlockZetaParticleField( sGeometry.getBlockGeometry(iC), velocity, sIndicator,
76 sLattice.getBlock(iC) );
77 }
78}
79*/
80
81} // namespace olb
82
83#endif
Definition of a LB cell – header file.
AnalyticalF are applications from DD to XD, where X is set by the constructor.
Base block indicator functor (discrete)
Smart pointer for managing the various ways of passing functors around.
Definition functorPtr.h:60
Representation of a statistic for a parallel 2D geometry.
std::unique_ptr< SuperIndicatorF< T, D > > getMaterialIndicator(std::vector< int > &&materials)
Returns a material indicator using the given vector of materials.
BlockGeometry< T, D > & getBlockGeometry(int locIC)
Read and write access to a single block geometry.
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
Super class maintaining block lattices for a cuboid decomposition.
BlockLattice< T, DESCRIPTOR > & getBlock(int locC)
Return BlockLattice with local index locC.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
The description of a vector of 2D cuboid – header file.
Wrapper functions that simplify the use of MPI.
Top level namespace for all of OpenLB.
void setSuperExternalPSMParticleField(SuperGeometry< T, 2 > &sGeometry, int material, AnalyticalF2D< T, T > &velocity, T size, SuperLatticeF2D< T, DESCRIPTOR > &epsilon, SuperLattice< T, DESCRIPTOR > &sLattice)
Representation of a parallel 2D geometry – header file.
The description of a 2D super lattice – header file.