OpenLB 1.8.1
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
31
33
34namespace olb {
35
36
37template<typename T, unsigned D>
39protected:
49
50public:
51 using value_t = T;
52
54 virtual ~SuperStructure() {};
55
57 SuperStructure(CuboidDecomposition<T,D>& cuboidDecomposition,
58 LoadBalancer<T>& loadBalancer, int overlap = 2);
59
64
66 int getOverlap();
68 int getOverlap() const;
69
73 LoadBalancer<T> const& getLoadBalancer() const;
74
75 virtual void communicate() { };
76
78 template <typename F>
79 void forCorePhysLocations(F f) const;
80
82 template <typename F>
83 void forCorePhysLocations(PhysR<T,D> min, PhysR<T,D> max, F f) const;
84
87 template <typename F>
88 void forCoreSpatialLocations(F f) const;
89
92 template <typename F>
93 void forCoreSpatialLocations(PhysR<T,D> min, PhysR<T,D> max, F f) const;
94
95};
96
97
98}
99
100#endif
Decomposition of a physical volume into a set of disjoint cuboids.
Base class for all LoadBalancer.
Definition vtiWriter.h:42
class for marking output with some text
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()
void forCoreSpatialLocations(F f) const
Iterate over spatial locations NOTE: Based on physical locations (as opposed to its blockStructure ve...
CuboidDecomposition< T, D > & _cuboidDecomposition
The grid structure is referenced here.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
SuperStructure(CuboidDecomposition< T, D > &cuboidDecomposition, LoadBalancer< T > &loadBalancer, int overlap=2)
Construction of a super structure.
int _overlap
Size of ghost cell layer (must be greater than 1 and greater_overlapBC, default =1)
OstreamManager clout
class specific output stream
LoadBalancer< T > & _loadBalancer
Distribution of the cuboids of the cuboid structure.
CuboidDecomposition< T, D > & getCuboidDecomposition()
Read and write access to cuboid geometry.
Top level namespace for all of OpenLB.