Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

flux_calc.c File Reference

Generic flux calculation function for mb_cns, etc. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../../util/source/compiler.h"
#include "../../util/source/useful.h"
#include "../../util/source/logfile.h"
#include "../../geometry/source/geom.h"
#include "./flux_calc.h"
#include "../../mb_cns/source/cns_debug_level.h"
#include "../../mb_cns/source/cns_work_vector.h"
#include "../../mb_cns/source/mb_cfg.h"

Functions

int set_flux_calculator (int iflux)
 Sets a global variable to select the flux calculator.
int get_flux_calculator (void)
 Returns the index of the selected flux calculator.
int copy_gas_state (struct flow_state *from_gs, struct flow_state *to_gs)
 Copy the flow_state data (gas_data plus flow velocities.).
int compute_interface_flux (struct flow_state Lft[], struct flow_state Rght[], struct flux_data_1D IF[], int first, int last)
 Compute the inviscid fluxes (in 2D) across the cell interfaces.
int compute_interface_flux_3D (struct flow_state Lft[], struct flow_state Rght[], struct flux_data_1D IFlux[], int first, int last)
 Compute the inviscid fluxes (in 3D) across the cell interfaces.

Variables

int flux_calculator


Detailed Description

Generic flux calculation function for mb_cns, etc.

Author:
PA Jacobs
Version:
05-Aug-04 : Extracted from mb_cns/source/cns_invs.c.

Function Documentation

int compute_interface_flux struct flow_state  Lft[],
struct flow_state  Rght[],
struct flux_data_1D  IF[],
int  first,
int  last
 

Compute the inviscid fluxes (in 2D) across the cell interfaces.

This is the top-level function that calls the previously selected flux calculator. Much of the detailed work is delegated.

Parameters:
Lft : pointer to the array of LEFT flow states
Rght : pointer to the array of RIGHT flow states
IF : pointer to the array of interfaces where the fluxes are to be stored
first : index of the first interface to be used
last : index of the last interface

int compute_interface_flux_3D struct flow_state  Lft[],
struct flow_state  Rght[],
struct flux_data_1D  IFlux[],
int  first,
int  last
 

Compute the inviscid fluxes (in 3D) across the cell interfaces.

This is the top-level function that calls the previously selected flux calculator. Much of the detailed work is delegated.

Parameters:
Lft : pointer to the array of LEFT flow states
Rght : pointer to the array of RIGHT flow states
IF : pointer to the array of interfaces where the fluxes are to be stored
first : index of the first interface to be used
last : index of the last interface
Todo:
Really don't require npq_mom and xyz_mom to be separately stored. Just keep xyz_mom (and rename to momentum).

int copy_gas_state struct flow_state from_gs,
struct flow_state to_gs
 

Copy the flow_state data (gas_data plus flow velocities.).

Parameters:
from_gs : pointer to source data structure
to_gs : pointer to target data structure


Generated on Tue Oct 25 10:24:13 2005 for CFCFD by  doxygen 1.4.4