Carmen Code
 All Classes Files Functions Variables Macros Pages
Functions
FluxCorrection.cpp File Reference

Computes the mixed correction in the numerical fluxes (Dedner, 2002) More...

#include "Carmen.h"
Include dependency graph for FluxCorrection.cpp:

Functions

void fluxCorrection (Vector &Flux, const Vector &AvgL, const Vector &AvgR, int AxisNo)
 This function apply the divergence-free correction to the numerical flux. More...
 

Detailed Description

Computes the mixed correction in the numerical fluxes (Dedner, 2002)

Author
Anna Karina Fontes Gomes
Version
2.0

Function Documentation

void fluxCorrection ( Vector Flux,
const Vector AvgL,
const Vector AvgR,
int  AxisNo 
)

This function apply the divergence-free correction to the numerical flux.

Parameters
FluxNumerical flux vector
AvgLLeft average vector
AvgRRight average vector
AxisNoAxis of interest
Returns
void
10 {
11  auxvar = Flux.value(AxisNo+6);
12 
13  Flux.setValue(AxisNo+6, Flux.value(AxisNo+6) + (AvgL.value(6) + .5*(AvgR.value(6) - AvgL.value(6))
14  - ch*.5*(AvgR.value(AxisNo+6) - AvgL.value(AxisNo+6))));
15 
16  Flux.setValue(6, ch*ch*(AvgL.value(AxisNo+6) + .5*(AvgR.value(AxisNo+6) - AvgL.value(AxisNo+6))
17  - .5*(AvgR.value(6) - AvgL.value(6))/ch));
18 
19 }
real ch
Definition: Parameters.cpp:140
real auxvar
Definition: Parameters.cpp:141
void setValue(const int n, const real a)
Sets the component n to value a.
Definition: Vector.h:545
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565

Here is the caller graph for this function: