proteus.NumericalFlux module
A class hierarchy for numerical flux (numerical trace) computations
- class proteus.NumericalFlux.NF_base(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, parallelPeriodic=False)[source]
Bases:
object
- updateInteriorNumericalFluxJacobian(l2g, q, ebq, ebq_global, dphi, fluxJacobian, fluxJacobian_eb, fluxJacobian_hj)[source]
- class proteus.NumericalFlux.DoNothing(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.NoFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, parallelPeriodic=False)[source]
- class proteus.NumericalFlux.StrongDirichlet(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Advection_DiagonalUpwind(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Advection_Diagonal_average(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG
- class proteus.NumericalFlux.Advection_DiagonalUpwind_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.ConstantAdvection_Diffusion_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.ConstantAdvection_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.MixedDarcy_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior
- class proteus.NumericalFlux.ConstantAdvection_Diffusion_NIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.ConstantAdvection_Diffusion_IIPG_exterior
- class proteus.NumericalFlux.ConstantAdvection_Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.ConstantAdvection_Diffusion_IIPG_exterior
- class proteus.NumericalFlux.Advection_DiagonalUpwind_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Curvature_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.Stokes_Advection_DiagonalUpwind_Diffusion_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
Bases:
proteus.NumericalFlux.NF_base
- hasInterior = False[source]
To use with regular Stokes, takes advantage of existence of ‘advectiveFlux’ flag even when there is no advective term
- class proteus.NumericalFlux.Stokes_Advection_DiagonalUpwind_Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
Bases:
proteus.NumericalFlux.Stokes_Advection_DiagonalUpwind_Diffusion_IIPG_exterior
- class proteus.NumericalFlux.StokesP_Advection_DiagonalUpwind_Diffusion_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.Diffusion_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.DarcySplitPressure_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.NF_base
weak dirichlet boundary conditions for Twophase_split_pressure class
Diffusion_IIPG_exterior is ok except for need to switch between psi_w and psi_n bc types
- class proteus.NumericalFlux.Diffusion_LDG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.NF_base
initial LDG numerical flux for pure diffusion
- class proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_LDG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
- class proteus.NumericalFlux.RusanovNumericalFlux_Diagonal(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind
apply numerical flux \(f_{num}(a,b) = 1/2(f(a)+f(b)-\bar{\lambda}(b-a)\) where \(\lambda >= max |f^{\prime}| for a<= u <= b\)
this one applies flux to each component of flux separately
- class proteus.NumericalFlux.RusanovNumericalFlux_Diagonal_Diffusion_IIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG
apply numerical flus \(f_{num}(a,b) = 1/2(f(a)+f(b)-\bar{\lambda}(b-a)\) where \(\lambda >= max |f^{\prime}|\) for \(a<= u <= b\) this one applies flux to each component of flux separately
- class proteus.NumericalFlux.ConvexOneSonicPointNumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions, sonicPoint=0.0, sonicFlux=0.0)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind
basic Godunov flux \(f_{num}(a,b) = max_{b<= u <= a} f(u)\) if \(a >= b = min_{a<= u <= b} f(u)\) otherwise where there is only one sonic point, \(u_s\) with \(f^{\prime}(u_s) = 0\) and \(f\) is convex so \(f(u_s)\) is a minimum
This class typically has to be “wrapped” for a given problem to specify the correct sonic point and sonic flux
- class proteus.NumericalFlux.HamiltonJacobi_DiagonalLesaintRaviart(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, speedEvaluationType=2)[source]
- class proteus.NumericalFlux.HamiltonJacobi_DiagonalLesaintRaviart_Diffusion_IIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, speedEvaluationType=1)[source]
- class proteus.NumericalFlux.HamiltonJacobi_DiagonalLesaintRaviart_Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, speedEvaluationType=1)[source]
- class proteus.NumericalFlux.HamiltonJacobi_Pressure_DiagonalLesaintRaviart_Diffusion_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, speedEvaluationType=1)[source]
Bases:
proteus.NumericalFlux.HamiltonJacobi_DiagonalLesaintRaviart_Diffusion_SIPG_exterior
- class proteus.NumericalFlux.DarcyFCFF_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.NF_base
weak dirichlet boundary conditions for Twophase_fc_ff class
- class proteus.NumericalFlux.DarcyFC_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.NF_base
weak dirichlet boundary conditions for Twophase_fc class
- class proteus.NumericalFlux.DarcyFCPP_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.NF_base
weak dirichlet boundary conditions for Twophase_fc class
- class proteus.NumericalFlux.ShallowWater_1D(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, h_eps=1e-08, tol_u=1e-08)[source]
- class proteus.NumericalFlux.ShallowWaterHLL_1D(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, h_eps=1e-08, tol_u=1e-08)[source]
- class proteus.NumericalFlux.ShallowWater_2D(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, h_eps=1e-08, tol_u=1e-08)[source]
- class proteus.NumericalFlux.RusanovNumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.RusanovNumericalFlux_Diagonal
Base class for Rusanov scheme for generic systems, relies on a user-specified estimate for the maximum (magnitude) eigenvalue for the system.
Default is to take
\[\bar{\lamda}= max |\vec f^{\prime} \cdot n\|\]Then we just apply apply numerical flux
\[f_{num}(a,b) = 1/2(f(a)+f(b)-\bar{\lambda}(b-a)\]For now, we will try to piggy back on the cfl calculation, assuming the user has implemented this correctly for the system in question
- class proteus.NumericalFlux.RusanovLDG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Diffusion_LDG
combine Rusanov flux for advection and LDG for diffusion right now advection jacobian is not calculated
- class proteus.NumericalFlux.HamiltonJacobi_DiagonalChengShu(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, speedEvaluationType=0)[source]
- class proteus.NumericalFlux.Stress_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Stress_SIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]
- class proteus.NumericalFlux.Richards_IIPG_exterior(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]