MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
filtering
filters
WriteToFileJunctor.h
1
// This file is part of the Mamico project. For conditions of distribution
2
// and use, please see the copyright notice in Mamico's main folder
3
4
#pragma once
5
6
#define DEBUG_WTF_JUNCTION
7
8
#include "coupling/filtering/filters/WriteToFile.h"
9
#include "coupling/filtering/interfaces/AsymmetricalJunctorInterface.h"
10
11
namespace
coupling
{
12
namespace
filtering
{
13
template
<
unsigned
int
dim>
class
WriteToFileJunctor
;
14
}
15
}
// namespace coupling
16
24
template
<
unsigned
int
dim>
class
coupling::filtering::WriteToFileJunctor
:
public
coupling::filtering::AsymmetricalJunctorInterface
<dim> {
25
public
:
26
WriteToFileJunctor(
27
// first cell data set
28
const
std::vector<
coupling::datastructures::CouplingCell<dim>
*> inputCellVector1,
29
const
std::vector<
coupling::datastructures::CouplingCell<dim>
*> outputCellVector1,
30
31
// second cell data set
32
const
std::vector<
coupling::datastructures::CouplingCell<dim>
*> inputCellVector2,
33
// no secondary output cells
34
35
//"global" parameters for both WriteToFile instances
36
const
std::array<bool, 7> filteredValues,
37
38
// WriteToFile-specific parameters. [0] is for the first WriteToFile
39
// instance and [1] for the second one respectively.
40
std::array<std::string, 2> location, std::array<bool, 2> overwrite = {
false
}, std::array<int, 2> oneCellOnly = {-1})
41
:
coupling::filtering::AsymmetricalJunctorInterface<dim>
(inputCellVector1, outputCellVector1, inputCellVector2, filteredValues,
"WTF-J"
) {
42
// write to file instance covering first cell data set
43
coupling::filtering::AsymmetricalJunctorInterface<dim>::_filter1 =
44
new
coupling::filtering::WriteToFile<dim>
(inputCellVector1, outputCellVector1, filteredValues, location[0], overwrite[0], oneCellOnly[0]);
45
46
// write to file instance covering second cell data set
47
coupling::filtering::AsymmetricalJunctorInterface<dim>::_filter2 =
48
new
coupling::filtering::WriteToFile<dim>
(inputCellVector2, {},
// no output
49
filteredValues, location[1], overwrite[1], oneCellOnly[1]);
50
}
51
52
~WriteToFileJunctor() {
53
#ifdef DEBUG_WTF_JUNCTION
54
std::cout <<
" WTF-J: Destroyed WriteToFileJunctor instance."
<< std::endl;
55
#endif
56
}
57
};
coupling::datastructures::CouplingCell
defines the cell type with cell-averaged quantities only (no linked cells).
Definition
CouplingCell.h:29
coupling::filtering::AsymmetricalJunctorInterface
Definition
AsymmetricalJunctorInterface.h:24
coupling::filtering::WriteToFileJunctor
Definition
WriteToFileJunctor.h:24
coupling::filtering::WriteToFile
Definition
WriteToFile.h:37
coupling::filtering
Definition
FilterPipeline.h:21
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0