OpenLB 1.7
Loading...
Searching...
No Matches
gnuplotHeatMapWriter.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2017 Marc Haussmann
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 GNUPLOT_HEATMAP_WRITER_H
25#define GNUPLOT_HEATMAP_WRITER_H
26
27#include <iomanip>
28#include <iostream>
29#include <list>
30
33
34namespace olb {
35
36namespace heatmap {
37
38template <typename T>
39struct plotParam {
40 std::string name;
41 bool writeCSV = false;
42 bool fullScreenPlot = false;
44 int contourlevel = 0;
45 std::string colour = std::string("rainbow");
48 T minValue = 0.;
49 T maxValue = 0.;
50
52 zoomOrigin(0.0, 0.0),
53 zoomExtend(1.0, 1.0)
54 {
55 }
56
57};
58
66template <typename T>
67void write(BlockReduction3D2D<T>& blockReduction, int iT, const plotParam<T> param = {},
68 const std::vector<T>& valueArea = std::vector<T>());
69
77template <typename T>
78void write(BlockReduction2D2D<T>& blockReduction, int iT, const plotParam<T> param = {},
79 const std::vector<T>& valueArea = std::vector<T>());
80
81namespace detail {
82
83template <typename T>
84void genericHeatMapInterface(const HyperplaneLattice3D<T>& hyperPlane, BlockF2D<T>& blockData, int iT,
85 const std::vector<T>& valueArea, const plotParam<T>& param);
86
87
88
89template <typename T>
114
115template <typename T>
117
118template <typename T>
119void writeHeatMapPlotFile(detailParam<T>& param, const std::vector<T>& valueArea);
120
121template< typename T >
122void executeGnuplot(detailParam<T>& param);
123
124bool gnuplotInstalled();
125
126} // namespace detail
127
128} // namespace heatmap
129
130} // namespace olb
131
132#endif
represents all functors that operate on a cuboid in general, mother class of BlockLatticeF,...
BlockReduction3D2D reduces the data of a SuperF3D functor to the intersection between a given hyperpl...
Parametrization of a hyperplane lattice.
Plain old scalar vector.
Definition vector.h:47
void writeHeatMapDataFile(detailParam< T > &param)
void genericHeatMapInterface(const HyperplaneLattice3D< T > &hyperPlane, BlockF2D< T > &blockData, int iT, const std::vector< T > &valueArea, const plotParam< T > &param)
void executeGnuplot(detailParam< T > &param)
void writeHeatMapPlotFile(detailParam< T > &param, const std::vector< T > &valueArea)
void write(BlockReduction3D2D< T > &blockReduction, int iT, const plotParam< T > param={}, const std::vector< T > &valueArea=std::vector< T >())
This function is used to plot heat maps as jpeg files.
Top level namespace for all of OpenLB.
const HyperplaneLattice3D< T > * hyperPlane