MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
filtering
interfaces
AsymmetricalJunctorInterface.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, or at
3
// www5.in.tum.de/mamico
4
5
#pragma once
6
7
#define DEBUG_ASYM_JUNCTOR_INTERFACE
8
9
#include "coupling/filtering/interfaces/FilterInterface.h"
10
11
namespace
coupling
{
12
namespace
filtering
{
13
template
<
unsigned
int
dim>
class
AsymmetricalJunctorInterface
;
14
}
15
}
// namespace coupling
16
24
template
<
unsigned
int
dim>
class
coupling::filtering::AsymmetricalJunctorInterface
:
public
coupling::filtering::FilterInterface
<dim> {
25
public
:
26
AsymmetricalJunctorInterface(
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
// first cell data set
32
const
std::vector<
coupling::datastructures::CouplingCell<dim>
*> inputCellVector2,
33
// no output
34
35
// parameters not specific to either 1 or 2
36
const
std::array<bool, 7> filteredValues,
const
char
* type)
37
:
// The first cell data set in stored in FI's member variables...
38
coupling::filtering::FilterInterface<dim>
(inputCellVector1, outputCellVector1, filteredValues, type),
39
//...while the second cell data set is stored within this class
40
_inputCellVector2
(inputCellVector2) {}
41
42
virtual
void
operator()() {
43
(*_filter1)();
44
(*_filter2)();
45
}
46
47
~AsymmetricalJunctorInterface() {
48
// TODO: check for corrupt/memory leaks here
49
delete
_filter1;
50
delete
_filter2;
51
};
52
53
// TODO: make FI's updateCellData function unusable
54
void
updateCellData(std::vector<
coupling::datastructures::CouplingCell<dim>
*>& new_inputCellVector1,
55
std::vector<
coupling::datastructures::CouplingCell<dim>
*>& new_outputCellVector1,
56
std::vector<
coupling::datastructures::CouplingCell<dim>
*>& new_inputCellVector2) {
57
std::cout <<
" AJI: Updating cell data."
<< std::endl;
58
_inputCellVector2
= new_inputCellVector2;
59
60
// Assumes the input c-style vectors to be nonempty. May be problematic.
61
coupling::filtering::FilterInterface<dim>::updateCellData(new_inputCellVector1, new_outputCellVector1);
62
}
63
64
protected
:
70
std::vector<coupling::datastructures::CouplingCell<dim>*>
_inputCellVector2
;
71
72
/*
73
* The first cell data set should be fed to _filter1 and the second one to
74
* _filter2. Note that you have to do this manually in your implementation of
75
* this interface. For an example, cf. filters/WriteToFileJunctor.h
76
*/
77
coupling::filtering::FilterInterface<dim>
* _filter1;
78
coupling::filtering::FilterInterface<dim>
* _filter2;
79
};
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::AsymmetricalJunctorInterface::_inputCellVector2
std::vector< coupling::datastructures::CouplingCell< dim > * > _inputCellVector2
Definition
AsymmetricalJunctorInterface.h:70
coupling::filtering::FilterInterface
Definition
FilterInterface.h:32
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