preCICE
Loading...
Searching...
No Matches
src
io
ExportContext.hpp
Go to the documentation of this file.
1
#ifndef PRECICE_IO_EXPORTCONTEXT_HPP_
2
#define PRECICE_IO_EXPORTCONTEXT_HPP_
3
4
#include <memory>
5
#include <string>
6
#include <utility>
7
#include "
io/Export.hpp
"
8
9
namespace
precice::io
{
10
11
struct
ConfiguredExport
{
12
// @brief Path to export location.
13
std::string
location
;
14
15
// @brief Exporting every N time windows (equals -1 when not set).
16
int
everyNTimeWindows
= -1;
17
18
// @brief If true, export is done in every iteration (also implicit).
19
bool
everyIteration
=
false
;
20
21
// @brief If true, updates the series file after every export. Otherwise only at the end
22
bool
updateSeries
=
false
;
23
24
// @brief type of the exporter (e.g. vtk).
25
std::string
type
;
26
27
// @brief Configured mesh name to export (empty means export all meshes).
28
std::string
configuredMeshName
;
29
};
30
31
struct
ExportContext
:
public
ConfiguredExport
{
32
// @brief Exporters performing the actual export.
33
std::unique_ptr<Export>
exporter
;
34
35
// @brief Name of the mesh to export.
36
std::string
meshName
;
37
};
38
40
inline
ExportContext
makeExportContext
(
ConfiguredExport
config
, std::unique_ptr<io::Export> exporter, std::string meshName)
41
{
42
return
{std::move(
config
), std::move(exporter), std::move(meshName)};
43
}
44
45
}
// namespace precice::io
46
47
#endif
/* PRECICE_IO_EXPORTCONTEXT_HPP_ */
Export.hpp
precice::config
Definition
Configuration.cpp:26
precice::io
provides Import and Export of the coupling mesh and data.
Definition
Acceleration.hpp:10
precice::io::makeExportContext
ExportContext makeExportContext(ConfiguredExport config, std::unique_ptr< io::Export > exporter, std::string meshName)
Creates an ExportContext from configuration and mesh name.
Definition
ExportContext.hpp:40
precice::io::ConfiguredExport
Definition
ExportContext.hpp:11
precice::io::ConfiguredExport::configuredMeshName
std::string configuredMeshName
Definition
ExportContext.hpp:28
precice::io::ConfiguredExport::everyIteration
bool everyIteration
Definition
ExportContext.hpp:19
precice::io::ConfiguredExport::type
std::string type
Definition
ExportContext.hpp:25
precice::io::ConfiguredExport::updateSeries
bool updateSeries
Definition
ExportContext.hpp:22
precice::io::ConfiguredExport::location
std::string location
Definition
ExportContext.hpp:13
precice::io::ConfiguredExport::everyNTimeWindows
int everyNTimeWindows
Definition
ExportContext.hpp:16
precice::io::ExportContext
Definition
ExportContext.hpp:31
precice::io::ExportContext::meshName
std::string meshName
Definition
ExportContext.hpp:36
precice::io::ExportContext::exporter
std::unique_ptr< Export > exporter
Definition
ExportContext.hpp:33