upwindflux.h 3.28 KB
Newer Older
Jonas Kusch's avatar
Jonas Kusch committed
1
2
3
4
5
6
7
#ifndef UPWINDFLUX_H
#define UPWINDFLUX_H

#include "numericalflux.h"

class UpwindFlux : public NumericalFlux
{
Jonas Kusch's avatar
Jonas Kusch committed
8
  public:
Jonas Kusch's avatar
Jonas Kusch committed
9
10
11
12
    /**
     * @brief UpwindFlux
     * @param settings
     */
steffen.schotthoefer's avatar
steffen.schotthoefer committed
13
    UpwindFlux();
Jonas Kusch's avatar
Jonas Kusch committed
14
15
16
17
18
19
20
21
22

    /**
     * @brief Flux computes flux on edge for fixed ordinate at a given edge
     * @param Omega fixed ordinate for flux computation
     * @param psiL left solution state
     * @param psiR right solution state
     * @param n scaled normal vector of given edge
     * @return numerical flux value
     */
23
24
25
    double Flux( const Vector& Omega, double psiL, double psiR, const Vector& n ) const override;

    /**
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
26
27
28
29
30
31
32
33
34
35
36
37
38
     * @brief Flux       Computes "Steger Warming" upwinding scheme for given flux jacobians of the PN Solver at a given edge and stores it in
     *                   resultFlux
     * @param AxPlus     Positive part of the flux jacobian in x direction
     * @param AxMinus    Negative part of the flux jacobian in x direction
     * @param AyPlus     Positive part of the flux jacobian in y direction
     * @param AyMinus    Negative part of the flux jacobian in y direction
     * @param AzPlus     Positive part of the flux jacobian in z direction
     * @param AzMinus    Negative part of the flux jacobian in z direction
     * @param psiL       Solution state of left hand side control volume
     * @param psiR       Solution state of right hand side control volume
     * @param n          Normal vector at the edge between left and right control volume
     * @param resultFlux Vector with resulting flux.
     * @return           void
39
     */
40
41
42
43
44
45
46
47
48
    Vector Flux( const Matrix AxPlus,
                 const Matrix AxMinus,
                 const Matrix AyPlus,
                 const Matrix AyMinus,
                 const Matrix AzPlus,
                 const Matrix AzMinus,
                 const Vector psiL,
                 const Vector psiR,
                 const Vector n ) const override;
steffen.schotthoefer's avatar
steffen.schotthoefer committed
49
50

    /**
Steffen Schotthöfer's avatar
Steffen Schotthöfer committed
51
52
53
54
55
56
57
58
59
60
61
62
63
     * @brief Flux       Computes "VanLeer" upwinding scheme for given flux jacobians of the PN Solver at a given edge and stores it in
     *                   resultFlux
     * @param AxPlus     Positive part of the flux jacobian in x direction
     * @param AxMinus    Negative part of the flux jacobian in x direction
     * @param AyPlus     Positive part of the flux jacobian in y direction
     * @param AyMinus    Negative part of the flux jacobian in y direction
     * @param AzPlus     Positive part of the flux jacobian in z direction
     * @param AzMinus    Negative part of the flux jacobian in z direction
     * @param psiL       Solution state of left hand side control volume
     * @param psiR       Solution state of right hand side control volume
     * @param n          Normal vector at the edge between left and right control volume
     * @param resultFlux Vector with resulting flux.
     * @return           void
steffen.schotthoefer's avatar
steffen.schotthoefer committed
64
65
66
67
68
69
70
71
72
73
74
     */
    void FluxVanLeer( const Matrix& Ax,
                      const Matrix& AxAbs,
                      const Matrix& Ay,
                      const Matrix& AyAbs,
                      const Matrix& Az,
                      const Matrix& AzAbs,
                      const Vector& psiL,
                      const Vector& psiR,
                      const Vector& n,
                      Vector& resultFlux ) const override;
Jonas Kusch's avatar
Jonas Kusch committed
75
76
};

Jonas Kusch's avatar
Jonas Kusch committed
77
#endif    // UPWINDFLUX_H