26 using CellIndex_T =
coupling::indexing::CellIndex<dim, coupling::indexing::IndexTrait::vector, scope..., coupling::indexing::IndexTrait::md2macro,
27 coupling::indexing::IndexTrait::noGhost>;
32 double sigsq_rel,
double hsq,
double hsq_rel,
int M = 2,
int d = 1)
34 _timeWindowSize(tws), _M(M), _d(d), _sigsq(sigsq), _sigsq_rel(sigsq_rel), _hsq(hsq), _hsq_rel(hsq_rel), _cycleCounter(0), _t(0),
38 for (
int t = 0; t < tws; ++t)
39 for (
auto idx : CellIndex_T()) {
41 coupling::filtering::Quantities<dim>& q = _flowfield(idxv, t);
43 for (
unsigned int d = 1; d <= dim; ++d)
45 coupling::filtering::Quantities<dim>& qp = _flowfield_prefiltered(idxv, t);
47 for (
unsigned int d = 1; d <= dim; ++d)
53 for (
auto idx : CellIndex_T()) {
55 for (
unsigned int d = 0; d < dim; d++)
56 if (idxv[d] == 0 || idxv[d] == domainSize[d] - 1)
58 _innerCellIndices.push_back(idx);
63 std::cout <<
" NLM: Created NLM instance." << std::endl;
64 std::cout <<
" WARNING: Regardless of configuration, NLM always filters "
65 "macroscopic mass and momentum."
72 std::cout <<
" NLM: Destroyed NLM instance." << std::endl;
112 const unsigned int _timeWindowSize;
115 const unsigned int _M;
116 const unsigned int _d;
118 double _sigsq, _sigsq_rel;
119 double _hsq, _hsq_rel;
121 unsigned int _cycleCounter;
125 coupling::filtering::Flowfield<dim> _flowfield;
126 coupling::filtering::Flowfield<dim> _flowfield_prefiltered;
127 coupling::filtering::Patchfield<dim> _patchfield;
128 std::vector<CellIndex_T> _innerCellIndices;
130 inline unsigned int posmod(
int i,
int n)
const {
return (i % n + n) % n; }
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15