METHOD
FluxMethod Class Referenceabstract

#include <flux.h>

Inheritance diagram for FluxMethod:
Collaboration diagram for FluxMethod:

Public Member Functions

 FluxMethod (Data *data, Model *model)
 
virtual ~FluxMethod ()
 
virtual void F (double *cons, double *prims, double *aux, double *f, double *fnet)=0
 
virtual void fluxReconstruction (double *cons, double *prims, double *aux, double *f, double *frecon, int dir, int vars)=0
 

Public Attributes

Datadata
 
Modelmodel
 

Detailed Description

Abstract base class for flux reconstruction methods

May want to implement various numerical flux functions. Should all have same API.
Functions use the form of the flux vector from the given model and, via their respective methods, determine the net flux through each cell for use in the time integrators.

Definition at line 17 of file flux.h.

Constructor & Destructor Documentation

◆ FluxMethod()

FluxMethod::FluxMethod ( Data data,
Model model 
)
inline

Base constructor.

Constructor stores pointers to the Data and Model classes.

Parameters
[in]*datapointer to Data class
[in]*modelpointer to Model class

Definition at line 31 of file flux.h.

◆ ~FluxMethod()

virtual FluxMethod::~FluxMethod ( )
inlinevirtual

Destructor.

Definition at line 33 of file flux.h.

Member Function Documentation

◆ F()

virtual void FluxMethod::F ( double *  cons,
double *  prims,
double *  aux,
double *  f,
double *  fnet 
)
pure virtual

Numerical flux function.

Pure virtual function to set the API for the numerical flux function. The net flux through a cell is stored in the fnet vector as a result of the state vectors given.

Parameters
[in]*conspointer to conserved vector
[in]*primspointer to primitive vector
[in]*auxpointer to auxiliary vector
[in]*fpointer to a flux work array to store the initial flux vector
[in,out]*fnetpointer to the array containing the net flux through every cell

Implemented in FVS.

◆ fluxReconstruction()

virtual void FluxMethod::fluxReconstruction ( double *  cons,
double *  prims,
double *  aux,
double *  f,
double *  frecon,
int  dir,
int  vars 
)
pure virtual

Flux reconstruction.

Reconstructs the fluxes at the center of the cells to the faces upwind and downwind and computes the difference, giving an approximation of the net flux (in the specified direction) at the cell faces. Method uses a second order WENO reconstruction.

Parameters
[in]*conspointer to conserved vector
[in]*primspointer to primitive vector
[in]*auxpointer to auxiliary vector
[in]*fpointer to a flux work array to store the initial flux vector
[in,out]*freconpointer to the array containing the reconstructed values of the fluxes at the cell faces
[in]dirthe direction in which to determine flux reconstruction with (0, 1, 2) = (x, y, z)
[in]varssize of the vector to reconstruct (saves time when using subgrid models). Default values is -1, which autos to Ncons.
Note
This is an approximation of the net flux at the cell faces, not the cell centers, and so the final approximation of the flux through a cell required differencing the values obtained here at either end of the cell. This is performed in F
See also
F

Implemented in FVS.

Member Data Documentation

◆ data

Data* FluxMethod::data

Pointer to data class containing global simulation data.

Definition at line 21 of file flux.h.

◆ model

Model* FluxMethod::model

Pointer to model class containing method for computing flux vector.

Definition at line 22 of file flux.h.


The documentation for this class was generated from the following file: