OpenLB 1.7
Loading...
Searching...
No Matches
heuristicLoadBalancer.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2012 Jonas Fietz, 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
24
25#ifndef HEURISTIC_LOAD_BALANCER_H
26#define HEURISTIC_LOAD_BALANCER_H
27
28
31#include "geometry/cuboid3D.h"
32#include "geometry/cuboid3D.hh"
36
37
38
39
40namespace olb {
41
50template<typename T>
51class HeuristicLoadBalancer final : public LoadBalancer<T> {
52private:
53 // Handles the MPI communication
54#ifdef PARALLEL_MODE_MPI
56#endif
57 CuboidGeometry3D<T>* _cGeometry3d;
58 CuboidGeometry2D<T>* _cGeometry2d;
59
60 double _ratioFullEmpty;
61
62public:
64 ~HeuristicLoadBalancer() override;
65
66 HeuristicLoadBalancer(CuboidGeometry3D<T>& cGeometry3d, const double ratioFullEmpty=1., const double weightEmpty=.0);
67 HeuristicLoadBalancer(CuboidGeometry2D<T>& cGeometry2d, const double ratioFullEmpty=1., const double weightEmpty=.0);
68
69 void reInit(CuboidGeometry3D<T>& cGeometry3d, const double ratioFullEmpty=1., const double weightEmpty=.0);
70 void reInit(CuboidGeometry2D<T>& cGeometry2d, const double ratioFullEmpty=1., const double weightEmpty=.0);
71
72 void swap(HeuristicLoadBalancer<T>& loadBalancer);
73
74};
75} // namespace olb
76
77#endif
A cuboid structure represents the grid of a considered domain.
A cuboid geometry represents a voxel mesh.
Constructs a load balancer from a given cuboid geometry using a heurist.
void swap(HeuristicLoadBalancer< T > &loadBalancer)
void reInit(CuboidGeometry3D< T > &cGeometry3d, const double ratioFullEmpty=1., const double weightEmpty=.0)
Base class for all LoadBalancer.
Helper class for non blocking MPI communication.
Definition mpiManager.h:51
The description of a single 3D cuboid – header file.
The description of a single 3D cuboid – generic implementation.
The description of a vector of 2D cuboid – header file.
The description of a vector of 3D cuboid – header file.
The description of a vector of 3D cuboid – generic implementation.
Wrapper functions that simplify the use of MPI.
Top level namespace for all of OpenLB.