MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lbdgape.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 LBDGAPE_H
8#define LBDGAPE_H
9
10#include "coupling.h"
11#include "couplingdgape.h"
12
13template <MInt nDim, MInt nDist, class SysEqn>
14class LbDgApe final : public CouplingDgApe<nDim, CouplingLB<nDim, nDist, SysEqn>> {
15 public:
16 // Typedefs
17 using Base = Coupling;
18 // Typedefs (LB)
20 using LbSolver = typename BaseLb::solverType;
21 // Typedefs (DG)
25
26 using BaseLb::lbSolver;
27
28 //--Ctor & Dtor
29 LbDgApe(const MInt couplingId, LbSolver* const lb, DgSolver* const dg)
30 : Base(couplingId), BaseDg(couplingId, dg, lb) {}
32
33 //--Methods
34 public:
35 // Main coupling functions
36 void init() override {
39 };
40 // Virtual methods to override
41 void finalizeCouplerInit() override;
42
43 private:
45 // Virtual methods to override
46 LbSolver& donorSolver(const MInt xSolverId = 0) const override { return lbSolver(xSolverId); };
47 void getDonorVelocityAndVorticity(const std::vector<MInt>& donorCellIds, MFloatScratchSpace& p_velocity,
48 MFloatScratchSpace& p_vorticity) override;
49
50 virtual void performUnitConversion(const MString& /*name*/, const MInt /*count*/, const MInt /*stride*/,
51 MFloat* /*data*/) override;
52 void calcSourceLambLinearized(const MFloat* const /*velocity*/, const MFloat* const /*vorticity*/,
53 MFloat* /*sourceTerms*/) override {
54 mTerm(1, AT_, "Error: calcSourceLambLinearized source term not implemented, yet, for lbdgape!");
55 };
56 void calcSourceLambNonlinear(const MFloat* const velocity, const MFloat* const vorticity,
57 MFloat* const sourceTerms) override;
58 void calcSourceQmII(const MFloat* const /*velocity*/, MFloat* const /*sourceTerms*/) override {
59 mTerm(1, AT_, "Error: calcSourceQmII source term not implemented, yet, for lbdgape!");
60 };
61 void calcSourceQmIII(const MFloat* const /*velocity*/, MFloat* /*sourceTerms*/) override {
62 mTerm(1, AT_, "Error: calcSourceQmIII source term not implemented, yet, for lbdgape!");
63 };
64 void calcSourceQe(const MFloat* const /*velocity*/, const MFloat /*time*/, MFloat* const /*sourceTerms*/) override {
65 mTerm(1, AT_, "Error: calcSourceQe source term not implemented, yet, for lbdgape!");
66 };
67 void calcSourceQc(const MFloat* const /*velocity*/, MFloat* const /*sourceTerms*/, const MFloat /*time*/,
68 const MInt /*timeStep*/) override {
69 mTerm(1, AT_, "Error: calcSourceQc source term not implemented, yet, for lbdgape!");
70 };
71
72 //---Variables----------------------------------------------------------------
73 private:
74 // Conversion-Factors
83};
84#endif // LBDGAPE_H
Intermediate class for coupling DG solver with APE sysEqn.
void init() override
typename BaseDg::solverType DgCartesianSolverType
LbSolverDxQy< nDim, nDist, SysEqn > solverType
Definition: coupling.h:430
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454
void calcSourceLambLinearized(const MFloat *const, const MFloat *const, MFloat *) override
Definition: lbdgape.h:52
void calcSourceQc(const MFloat *const, MFloat *const, const MFloat, const MInt) override
Definition: lbdgape.h:67
LbDgApe(const MInt couplingId, LbSolver *const lb, DgSolver *const dg)
Definition: lbdgape.h:29
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454
void calcSourceQe(const MFloat *const, const MFloat, MFloat *const) override
Definition: lbdgape.h:64
~LbDgApe()
Definition: lbdgape.h:31
void calcSourceQmII(const MFloat *const, MFloat *const) override
Definition: lbdgape.h:58
virtual void performUnitConversion(const MString &, const MInt, const MInt, MFloat *) override
Transform data from donor solver unit system into DG unit system.
Definition: lbdgape.cpp:105
void getDonorVelocityAndVorticity(const std::vector< MInt > &donorCellIds, MFloatScratchSpace &p_velocity, MFloatScratchSpace &p_vorticity) override
Get velocity and vorticity of donor solver.
Definition: lbdgape.cpp:70
void init() override
Definition: lbdgape.h:36
void calcSourceLambNonlinear(const MFloat *const velocity, const MFloat *const vorticity, MFloat *const sourceTerms) override
Definition: lbdgape.cpp:141
struct LbDgApe::ConversionFactors m_conversionLb2Dg
LbSolver & donorSolver(const MInt xSolverId=0) const override
Definition: lbdgape.h:46
void finalizeCouplerInit() override
Definition: lbdgape.cpp:14
void initConversionFactors()
Definition: lbdgape.cpp:25
void calcSourceQmIII(const MFloat *const, MFloat *) override
Definition: lbdgape.h:61
typename BaseDg::DgCartesianSolverType DgSolver
Definition: lbdgape.h:24
This class is a ScratchSpace.
Definition: scratch.h:758
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52