opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
ParallelFileMerger.hpp
1
/*
2
Copyright 2016 Dr. Blatt - HPC-Simulation-Software & Services
3
Copyright 2016 STATOIL AS.
4
5
This file is part of the Open Porous Media project (OPM).
6
7
OPM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
OPM is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OPM. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef OPM_PARALLELFILEMERGER_HEADER_INCLUDED
22
#define OPM_PARALLELFILEMERGER_HEADER_INCLUDED
23
24
#include <filesystem>
25
#include <iosfwd>
26
#include <memory>
27
#include <regex>
28
#include <string>
29
30
namespace
Opm
{
31
namespace
detail {
32
33
namespace
fs = ::std::filesystem;
34
41
class
ParallelFileMerger
42
{
43
public
:
48
ParallelFileMerger
(
const
fs::path& output_dir,
49
const
std::string& deckname,
50
bool
show_fallout =
false
);
51
52
void
operator()(
const
fs::path& file);
53
54
private
:
59
void
appendFile(std::ofstream& of,
const
fs::path& file,
const
std::string& rank);
60
62
std::regex debugFileRegex_;
64
std::regex logFileRegex_;
66
std::regex fileWarningRegex_;
68
std::unique_ptr<std::ofstream> debugStream_;
70
std::unique_ptr<std::ofstream> logStream_;
72
bool
show_fallout_;
73
};
74
75
}
// end namespace detail
76
}
// end namespace Opm
77
78
#endif
// end header guard
Opm::detail::ParallelFileMerger::ParallelFileMerger
ParallelFileMerger(const fs::path &output_dir, const std::string &deckname, bool show_fallout=false)
Constructor.
Definition
ParallelFileMerger.cpp:32
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
utils
ParallelFileMerger.hpp
Generated by
1.17.0