Face Integrals

Face Integrals

This page describes the functions that evaluate the face and shared face integrals.

Entry Point

EulerEquationMod.evalFaceIntegrals

This function evaluates the face integrals in a DG formulation and updates the residual. The array eqn.flux_face must already be populated with the face flux.

Inputs:

  • mesh: an AbstractDGMesh

  • sbp: an SBP operator

  • eqn: an EulerData object

  • opts: the options dictonary

Outputs:

none
source

EulerEquationMod.evalSharedFaceIntegrals

This function does the computation that needs the parallel communication to have finished already, namely the face integrals for the shared faces

Inputs:

  • mesh

  • sbp

  • eqn

  • opts

source

Functions

EulerEquationMod.calcFaceFlux

This function calculates the DG flux between a specified set of faces, using the solution data at the faces stored in eqn.q_face. Note that the flux is negated because the face integrals have a negative sign in the weak form.

Conservative variables only!

Inputs:

  • mesh

  • sbp

  • eqn

  • functor: the functor that calculates the flux at a node

  • interfaces: an array of type Interface that specifies which interfaces to calculate the flux for

Inputs/Outputs:

  • face_flux: array to store the flux in, numDofPerNode x nnodesPerFace x length(interfaces)

The functor must have the signature:

func( uL, qR, aux_vars, dxidx, nrm, flux_j, eqn.params)

where uL and uR are the solution values for a node on the left and right elements, aux_vars are the auxiliary variables for the node, dxidx is the scaled mapping jacobian for elementL, and nrm is the face normal in reference space. flux_j is the array of length numDofPerNode to be populated with the flux. params is eqn.params.

source

Like calcFaceFlux, but computes the flux for a single element and then integrates it immediately, updating eqn.res

Inputs:

  • mesh

  • sbp

  • eqn

  • opts

  • functor: a FluxType that evalutes the flux

  • interfaces: the vector of Interfaces to compute the integrals for

source

Like calcSharedFaceElementIntegrals_element_inner, but for staggered grid.

data.q_recv is the solution grid data. This function interpolates it to the flux grid on the fly.

Inputs:

  • mesh_s: solution grid mesh

  • mesh_f: flux grid mesh

  • sbp_s: SBP operator for solution grid

  • sbp_f: SBP operator for the flux grid

  • opts: options dictionary

  • data: SharedFaceData

  • face_integral_functor: FaceElementIntegralType

  • flux_functor: FluxType passed to face_integral functor

Inputs/Outputs:

* eqn: equation object (lives on solution grid)

Aliasing restrictions: none

source

This function is a thin wrapper around calcSharedFaceElementIntegrals_element_inner, presenting the interface needed by finishExchangeData. See that function for the interface details.

source

This function loops over given set of shared faces and computes a face integral that uses data from all volume nodes. See FaceElementIntegralType for details on the integral performed.

Inputs:

  • mesh

  • sbp

  • eqn

  • opts

  • data: a SharedFaceData specifying which shared faces to compute

  • face_integral_functor

  • flux_functor

source

This function is a thin wrapper around calcSharedFaceIntegrals_inner. It present the interface needed by finishExchangeData.

source

This function is a thin wrapper around calcSharedFaceIntegrals_element_inner. It presents the interface required by finishExchangeData

source

This function calculates the shared face integrals for a given set of faces. It uses the MPI send and receive buffers that contain the solution for the elements on the boundary (rather than the data on the faces). This enables calculating a sparse jacobian with minimal parallel communication.

Inputs:

  • mesh

  • sbp

  • eqn

  • opts

  • data: a SharedFaceData specifying the faces to calculate

  • functor: the flux functor

source

EulerEquationMod.calcSharedFaceIntegrals

This function calculates the shared face integrals over a given set of faces.

Inputs:

  • mesh

  • sbp

  • eqn

  • opts

  • data: the SharedFaceData specifying which faces to compute

  • functor: the FluxType to use for the face flux

source

Like calcSharedFaceIntegrals_element_inner, but performs the integration and updates eqn.res rather than computing the flux only and storing it in eqn.flux_sharedface

source

Like calcSharedFaceIntegrals_inner, but performs the integration and updates eqn.res rather than computing the flux and storing it in eqn.flux_sharedface

source

This function loops over interfaces and computes a face integral that uses data from all volume nodes. See FaceElementIntegralType for details on the integral performed. This function works on the staggered grid.

Inputs: mesh_s: mesh object on solution mesh mesh_f: mesh object on flux mesh sbp_s: SBP operator on solution mesh sbp_f: SBP operator on flux mesh face_integral_functor: a FaceElementIntegralType functor flux_functor: a [FluxType] functor that is passed to face_integral_functor to use as the numerical flux function sbpface: an AbstractFace for the flux grid interfaces: vector of Interfaces that the integral will be computed for.

Inputs/Outputs: eqn: equation object (implicitly lives on solution grid). eqn.res is updated with the results.

source

This function loops over interfaces and computes a face integral that uses data from all volume nodes. See FaceElementIntegralType for details on the integral performed.

source

EulerEquationMod.getFluxFunctors

This function retrieves the flux functors from the dictonary and stores them to eqn.flux_func.

Inputs: mesh: an AbstractDGMesh sbp eqn opts

source

EulerEquationMod.interpolateFace

This function interpolates the solution values from the internal nodes to the face flux points of the elements

Inputs:

  • mesh: an AbstractDGMesh

  • sbp

  • eqn

  • opts

  • q: a 3D array of solution values at the nodes, numDofPerNode x numNodesPerElement x numEl

Inputs/Outputs:

  • q_face: a 4D array of solution values at each interface, numDofPerNode x 2 x numfacenodes x numInterface q_face[:, 1, j, i] stores the q values for elementL of interface i node j and q_face[:, 2, j, i] stores the values for elementR

eqn.aux_vars_face is also populated

source

EulerEquationMod.FluxDict

This dictonary maps the names of the fluxes (Strings) to the functor object itself. All flux functors should be added to the dictionary.

All fluxes have one method that calculates the flux in a particular direction at a node. Some fluxes have an additional method that computes the flux in several directions at a node in a single function call, which can be more efficient. See calcEulerFlux_standard for an example.

In general, these functors call similarly-named function in bc_solvers.jl. It is recommened to look at the documentation for those functions.

TODO: document signature of the functors here

source

Flux Functors

TODO: move this to another file (both code and docs)

Calls calcEulerFlux_Ducros

source

This flux function throws an error. Useful for defaults.

source

Calls calcEulerFlux_IR

source

Calls calcEulerFlux_IRSLF

source

This flux function sets F = q. Useful for testing

source

Calls calcEulerFlux_standard

source

Calls the RoeSolver

source