proteus.ADR module
An optimized Advection-Diffusion-Reaction module
- class proteus.ADR.SubgridError(coefficients, nd)[source]
Bases:
proteus.SubgridError.SGE_base
SubgridError approximation for ADR equations
- class proteus.ADR.ShockCapturing(coefficients, nd, shockCapturingFactor=0.25, lag=True, nStepsToDelay=None)[source]
Bases:
proteus.ShockCapturing.ShockCapturing_base
Residual-based shock capturing for ADR equations
- class proteus.ADR.NumericalFlux_IIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_IIPG_exterior
- class proteus.ADR.NumericalFlux_SIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_SIPG_exterior
- class proteus.ADR.NumericalFlux_NIPG(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]
Bases:
proteus.NumericalFlux.Advection_DiagonalUpwind_Diffusion_NIPG_exterior
- proteus.ADR.NumericalFlux[source]
alias of
proteus.ADR.NumericalFlux_SIPG
- class proteus.ADR.Coefficients(aOfX, fOfX, velocity=None, nc=1, nd=2, l2proj=None, timeVaryingCoefficients=False, forceStrongDirichlet=False, useMetrics=0.0, sc_uref=1.0, sc_beta=1.0, embeddedBoundary=False, embeddedBoundary_penalty=100.0, embeddedBoundary_ghost_penalty=0.1, embeddedBoundary_sdf=None, embeddedBoundary_u=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
Coefficients of linear ADR equations
Set the number of components (equations) of the PDE and initialize the dicitionaries describing the form of the coefficients. Strings naming each component (used for viewing and archiving) and a structure defining the sparsity pattern of diffusion tensors may also be provided.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- initializeElementQuadrature(t, cq)[source]
Give the TC object access to the element quadrature storage
- initializeElementBoundaryQuadrature(t, cebq, cebq_global)[source]
Give the TC object access to the element boundary quadrature storage
- class proteus.ADR.LevelModel(uDict, phiDict, testSpaceDict, matType, dofBoundaryConditionsDict, dofBoundaryConditionsSetterDict, coefficients, elementQuadrature, elementBoundaryQuadrature, fluxBoundaryConditionsDict=None, advectiveFluxBoundaryConditionsSetterDict=None, diffusiveFluxBoundaryConditionsSetterDictDict=None, stressTraceBoundaryConditionsSetterDict=None, stabilization=None, shockCapturing=None, conservativeFluxDict=None, numericalFluxType=None, TimeIntegrationClass=None, massLumping=False, reactionLumping=False, options=None, name='defaultName', reuse_trial_and_test_quadrature=True, sd=True, movingDomain=False)[source]
Bases:
proteus.Transport.OneLevelTransport
Optimized LevelModel for ADR equations
Allocate storage and initialize some variables.
- Parameters
uDict (dict) – Dictionary of
proteus.FemTools.FiniteElementFunction
objects.phiDict (dict) – Dictionary of
proteus.FemTools.FiniteElementFunction
objects.testSpaceDict (dict) – Dictionary of FiniteElementSpace objects
dofBoundaryConditionsDict (dict) – Dictionary of DOFBoundaryConditions objects for the Dirichlet conditions.
coefficients (
proteus.TransportCoefficients.TC_base
) – Problem’s Transport Coefficients class.elementQuadratureDict (dict) – Dictionary of dictionaries of quadrature rules for each element integral in each component equation.
elementBoundaryQuadratureDict (dict) – Dictionary of dictionaries of quadrature rules for each element boundary integral in each component equation
stabilization (bool) –
shockCapturing (bool) –
numericalFlux (bool) –
bdyNullSpace (bool) – Indicates whether the boundary conditions create a global null space.
Notes
The constructor sets the input arguments, calculates dimensions, and allocates storage. The meanings of variable suffixes are
global – per physical domain
element – per element
elementBoundary – per element boundary
The prefix n means ‘number of’.
Storage is divided into quantities required at different sets of points or geometric entities. Each type of storage has a dictionary for all the quantities of that type. The names and dimensions of the storage dictionaries are
e – at element
q – at element quadrature, unique to elements
ebq – at element boundary quadrature, unique to elements
ebq_global – at element boundary quadrature, unique to element boundary
ebqe – at element boundary quadrature, unique to global, exterior element boundary
phi_ip – at the generalized interpolation points required to build a nonlinear phi
- calculateElementQuadrature()[source]
Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points.
This function should be called only when the mesh changes.
- calculateElementBoundaryQuadrature()[source]
Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points on element boundaries.
This function should be called only when the mesh changes.