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

#include "numericalflux.h"
Jonas Kusch's avatar
Jonas Kusch committed
5
#include "typedef.h"
Jonas Kusch's avatar
Jonas Kusch committed
6
7
8

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

    /**
     * @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
     */
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
    double Flux( const Vector& Omega, double psiL, double psiR, const Vector& n ) const override;

    /**
     * @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
     */
    void 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,
               Vector& resultFlux ) const override;
steffen.schotthoefer's avatar
steffen.schotthoefer committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

    /**
     * @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
     */
    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
77
78
};

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