# proteus.mprans.RDLS module¶

class proteus.mprans.RDLS.SubgridError(coefficients, nd)[source]
initializeElementQuadrature(mesh, t, cq)[source]
calculateSubgridError(q)[source]
updateSubgridErrorHistory(initializationPhase=False)[source]
class proteus.mprans.RDLS.ShockCapturing(coefficients, nd, shockCapturingFactor=0.25, lag=True, nStepsToDelay=None)[source]
initializeElementQuadrature(mesh, t, cq)[source]
updateShockCapturingHistory()[source]
class proteus.mprans.RDLS.PsiTC(model, nOptions)[source]
stepExact_model(tOut)[source]
initialize_dt_model(t0, tOut)[source]
updateSubstep()[source]
choose_dt_model()[source]
class proteus.mprans.RDLS.Coefficients(applyRedistancing=True, epsFact=2.0, nModelId=None, u0=None, rdModelId=0, penaltyParameter=0.0, useMetrics=0.0, useConstantH=False, weakDirichletFactor=10.0, backgroundDiffusionFactor=0.01, computeMetrics=False, ELLIPTIC_REDISTANCING=0, alpha=1000000000.0, backgroundDissipationEllipticRedist=1.0, outputQuantDOFs=False, nullSpace='NoNullSpace', useExact=False, copyList=True, initialize=True)[source]

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.

redistanceLevelSetCoefficientsEvaluate()[source]
initialize()[source]
attachModels(modelList)[source]

Give the TC object access to other models in a loosely coupled split operator formulation (e.g. a transport equation for concentration might get velocity from a flow equation)

initializeMesh(mesh)[source]

Give the TC object access to the mesh for any mesh-dependent information.

initializeElementQuadrature(t, cq)[source]

initializeElementBoundaryQuadrature(t, cebq, cebq_global)[source]

initializeGlobalExteriorElementBoundaryQuadrature(t, cebqe)[source]

preStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself before the time step.

postStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself after the time step.

getICDofs(cj)[source]
updateToMovingDomain(t, c)[source]
evaluate(t, c)[source]

Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.

static setZeroLSweakDirichletBCs(vt)[source]
static setZeroLSweakDirichletBCs2(vt)[source]
static setZeroLSweakDirichletBCs3(vt)[source]
class proteus.mprans.RDLS.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, bdyNullSpace=False)[source]

Allocate storage and initialize some variables.

Parameters

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

nCalls = 0[source]
runAtEOS()[source]
getMetricsAtEOS(u_exact)[source]
calculateCoefficients()[source]
calculateElementResidual()[source]

Calculate all the element residuals

getNormalReconstruction()[source]
getResidual(u, r)[source]

Calculate the element residuals and add in to the global residual

getJacobian(jacobian)[source]
getJacobianNew(jacobian)[source]
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.

calculateExteriorElementBoundaryQuadrature()[source]

Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points on global element boundaries.

This function should be called only when the mesh changes.

estimate_mt()[source]
calculateSolutionAtQuadrature()[source]
calculateAuxiliaryQuantitiesAfterStep()[source]
updateAfterMeshMotion()[source]
proteus.mprans.RDLS.setZeroLSweakDirichletBCs(RDLSvt)[source]
proteus.mprans.RDLS.setZeroLSweakDirichletBCsSimple(RDLSvt)[source]