OpenLB 1.7
Loading...
Searching...
No Matches
superStructure.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2014 Peter Weisbrod, Albert Mink, Mathias J. Krause
4 * 2021 Adrian Kummerlaender
5 * E-mail contact: info@openlb.net
6 * The most recent release of OpenLB can be downloaded at
7 * <http://www.openlb.net/>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25#ifndef SUPER_STRUCTURE_H
26#define SUPER_STRUCTURE_H
27
28#include "utilities/aliases.h"
29
32
34
35namespace olb {
36
37
38template<typename T, unsigned D>
40protected:
50
51public:
52 using value_t = T;
53
55 virtual ~SuperStructure() {};
57 SuperStructure(CuboidGeometry<T,D>& cuboidGeometry,
58 LoadBalancer<T>& loadBalancer, int overlap = 2);
60 SuperStructure(int overlap = 1);
61
66
68 int getOverlap();
70 int getOverlap() const;
71
75 LoadBalancer<T> const& getLoadBalancer() const;
76
77 virtual void communicate() { };
78
80 template <typename F>
81 void forCorePhysLocations(F f) const;
82
84 template <typename F>
85 void forCorePhysLocations(PhysR<T,D> min, PhysR<T,D> max, F f) const;
86
89 template <typename F>
90 void forCoreSpatialLocations(F f) const;
91
94 template <typename F>
95 void forCoreSpatialLocations(PhysR<T,D> min, PhysR<T,D> max, F f) const;
96};
97
98
99}
100
101#endif
Base class for all LoadBalancer.
class for marking output with some text
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
virtual ~SuperStructure()
Virtual Destructor for inheritance.
int getOverlap()
Read and write access to the overlap.
void forCorePhysLocations(F f) const
Iterate over discrete physical locations.
virtual void communicate()
CuboidGeometry< T, D > & _cuboidGeometry
The grid structure is stored here.
void forCoreSpatialLocations(F f) const
Iterate over spatial locations NOTE: Based on physical locations (as opposed to its blockStructure ve...
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
int _overlap
Size of ghost cell layer (must be greater than 1 and greater_overlapBC, default =1)
SuperStructure(CuboidGeometry< T, D > &cuboidGeometry, LoadBalancer< T > &loadBalancer, int overlap=2)
Construction of a super structure.
OstreamManager clout
class specific output stream
LoadBalancer< T > & _loadBalancer
Distribution of the cuboids of the cuboid structure.
Plain old scalar vector.
Definition vector.h:47
The description of a vector of 2D cuboid – header file.
The description of a vector of 3D cuboid – header file.
Top level namespace for all of OpenLB.
std::conditional_t< D==2, CuboidGeometry2D< T >, CuboidGeometry3D< T > > CuboidGeometry
Definition aliases.h:47