MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
fvcartesianinterpolation.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef FVINTERPOLATION_H_
8#define FVINTERPOLATION_H_
9
10#include <algorithm>
13#include "GRID/cartesiangrid.h"
14#include "coupling.h"
15#include "couplingutils.h"
16#include "enums.h"
17
18using namespace std;
19
20template <MInt nDim, class SysEqn>
22
23class Coupling;
24
29template <MInt nDim_, class SysEqnOld, class SysEqnNew>
30class FvCartesianInterpolation : virtual public Coupling {
31 public:
32 static constexpr MInt nDim = nDim_;
33
34 // using CartesianSolver = maia::CartesianSolver<nDim, Solver>;
37
38 FvCartesianInterpolation(const MInt couplingId, OldFvSolver* oldS, NewFvSolver* newS);
40
41 void init() override;
42 void preCouple(MInt) override;
43 void postCouple(MInt) override;
44
45 private:
48
49 OldFvSolver& oldSolver() const { return *m_oldSolver; }
50 NewFvSolver& newSolver() const { return *m_newSolver; }
51
52 MInt noExchangeVariables() { return nDim + 2 /*+ (MInt)m_reconstructNut*/; };
53 // suppressed functions
56 void subCouple(MInt, MInt, std::vector<MBool>&){};
57 void cleanUp(){};
58 void initData(){};
61
62 void transferSolverData();
63
64 MInt a_noFvCellsOld() const { return oldSolver().a_noCells(); }
66 MInt a_noFvCellsNew() const { return newSolver().a_noCells(); }
68
69 const MFloat eps = 1e-16;
70 const MFloat epss = 1e-8;
71
74
76};
77
78#endif // ifndef FVINTERPOLATION_H_
NewFvSolver & newSolver() const
OldFvSolver & oldSolver() const
void transferSolverData()
interpolate variables from old to new
FvCartesianInterpolation(const MInt couplingId, OldFvSolver *oldS, NewFvSolver *newS)
void subCouple(MInt, MInt, std::vector< MBool > &)
MInt a_noCells() const
Returns the number of cells.
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58