9#include "coupling/indexing/CellIndex.h"
43 _inputCells(inputCellVector), _outputCells(outputCellVector), _type(type) {
45 if (filteredValues[0]) {
46 _scalarAccessFunctionPairs.push_back(
50 if (filteredValues[1]) {
51 _vectorAccessFunctionPairs.push_back(
55 if (filteredValues[2]) {
56 _scalarAccessFunctionPairs.push_back(
60 if (filteredValues[3]) {
61 _vectorAccessFunctionPairs.push_back(
65 if (filteredValues[4]) {
66 _scalarAccessFunctionPairs.push_back(
70 if (filteredValues[5]) {
71 _vectorAccessFunctionPairs.push_back(
75 if (filteredValues[6]) {
76 _scalarAccessFunctionPairs.push_back(
81 FilterInterface(
const char* type)
86 virtual ~FilterInterface() {};
98 virtual void operator()() = 0;
102 if (new_inputCells.size() != new_outputCells.size())
103 throw std::runtime_error(
"New input-, output-, and indexing vectors must "
104 "be of identical size.");
107 _outputCells = new_outputCells;
109#ifdef DEBUG_FILTER_INTERFACE
110 std::cout <<
" FI: Updated cell data." << std::endl;
117 const char* getType()
const {
return _type; }
118 std::vector<coupling::datastructures::CouplingCell<dim>*> getInputCells()
const {
return _inputCells; }
119 std::vector<coupling::datastructures::CouplingCell<dim>*> getOutputCells()
const {
return _outputCells; }
122 coupling::indexing::IndexTrait::noGhost>;
130 std::cout <<
"Index not found: " << index << std::endl;
131 throw std::runtime_error(
"FilterInterface: getInputCellofIndex(): Could not find index.");
135 if (index.
get() < _outputCells.size) {
136 return _outputCells[index.
get()];
138 std::cout <<
"Index not found: " << index << std::endl;
139 throw std::runtime_error(
"FilterInterface: getOutputCellofIndex(): Could not find index.");
181 std::vector<coupling::datastructures::CouplingCell<dim>*>
_inputCells;
182 std::vector<coupling::datastructures::CouplingCell<dim>*> _outputCells;
185 std::vector<ScalarAccessFunctionPair> _scalarAccessFunctionPairs;
188 std::vector<VectorAccessFunctionPair> _vectorAccessFunctionPairs;
defines the cell type with cell-averaged quantities only (no linked cells).
Definition CouplingCell.h:29
const tarch::la::Vector< dim, double > & getMicroscopicMomentum() const
Definition CouplingCell.h:51
const tarch::la::Vector< dim, double > & getCurrentVelocity() const
Definition CouplingCell.h:92
const tarch::la::Vector< dim, double > & getMacroscopicMomentum() const
Definition CouplingCell.h:64
void setTemperature(const double &temperature)
Definition CouplingCell.h:96
void setMicroscopicMass(const double &mass)
Definition CouplingCell.h:42
const double & getPotentialEnergy() const
Definition CouplingCell.h:68
const double & getMicroscopicMass() const
Definition CouplingCell.h:45
void setMacroscopicMomentum(const tarch::la::Vector< dim, double > &momentum)
Definition CouplingCell.h:61
void setPotentialEnergy(const double &potentialEnergy)
Definition CouplingCell.h:71
const double & getTemperature() const
Definition CouplingCell.h:99
const double & getMacroscopicMass() const
Definition CouplingCell.h:58
void setMacroscopicMass(const double &mass)
Definition CouplingCell.h:55
void setCurrentVelocity(const tarch::la::Vector< dim, double > &velocity)
Definition CouplingCell.h:89
void setMicroscopicMomentum(const tarch::la::Vector< dim, double > &momentum)
Definition CouplingCell.h:48
Definition FilterInterface.h:32
std::vector< coupling::datastructures::CouplingCell< dim > * > _inputCells
Definition FilterInterface.h:181
Definition CellIndex.h:85
value_T get() const
Definition CellIndex.h:138
Definition FilterPipeline.h:21
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15
Definition FilterInterface.h:164
Definition FilterInterface.h:168