Docs › Numerical API reference › onesim.numerics.fem
B.5 onesim.numerics.fem
BrezziDouglasMarini class
BrezziDouglasMarini(order: int = 1) -> None
Use as the H(div) flux space with complete vector polynomials of order at least one.
Methods and properties.
bind(*, mesh, quadrature_order=None)
Bind this declaration to the supplied execution context and collaborators.
CIP class
CIP(*, penalty: object = 0.1, factory: object | None = None) -> None
Select a continuous interior penalty on jumps of physical first derivatives.
Methods and properties.
bind_physical(*, operator)
Bind the numerical operation to the supplied physical model and geometry.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
ConsistentMassStability class
ConsistentMassStability(*, dense_threshold: int = 256, relative_tolerance: float = 1e-10) -> None
Compute a compatible generalized spectral bound from the free stiffness and consistent mass blocks. Configure dense threshold and eigensolver tolerance.
Methods and properties.
maximum_step(*, rate, state, time, declaration)
Compute the stability-based maximum step for the supplied state and rate.
ConstraintAugmentation class
ConstraintAugmentation(weight: float = 1.0) -> None
Add a weighted constraint contribution to a compatible primal block while preserving the exact constraint.
Methods and properties.
bind_mixed(*, operator)
Bind a mixed operator on its declared spaces.
DGJumpPenalty class
DGJumpPenalty(*, coefficient: float) -> None
Use a jump-based interior dissipation contribution with an explicit nonnegative coefficient.
Methods and properties.
bind(*, space, model, law, periodic)
Bind this declaration to the supplied execution context and collaborators.
DGPolynomialLimiter class
DGPolynomialLimiter(slope_limiter: object = None, invariant_domain: object = None, factory: object = None) -> None
Apply a slope reduction and optional convex admissibility scaling on a compatible DG stage.
Methods and properties.
to_mapping()
Return the mapping representation used for configuration and diagnostics.
bind(*, space, model, law, periodic)
Bind this declaration to the supplied execution context and collaborators.
DiscontinuousLagrange class
DiscontinuousLagrange(order: int = 1) -> None
Use as element for cell-local polynomials. Order zero gives a cellwise constant space.
Methods and properties.
bind_cell_space(*, mesh, quadrature_order=None)
Bind the discrete cell-supported space for the supplied mesh.
bind(*, mesh, quadrature_order=None, periodic=False)
Bind this declaration to the supplied execution context and collaborators.
DissipativeMassStability class
DissipativeMassStability(*, dense_threshold: int = 256, relative_tolerance: float = 1e-10) -> None
Resolve a spectral interval or an M-norm contractivity bound for the supported dissipative operator.
Methods and properties.
maximum_step(*, rate, state, time, declaration)
Compute the stability-based maximum step for the supplied state and rate.
EqualOrderVelocityPressure class
EqualOrderVelocityPressure(order: int = 1) -> None
Select equal-degree velocity and pressure spaces with a compatible stabilized formulation.
Methods and properties.
bind(*, mesh, quadrature_order=None)
Bind this declaration to the supplied execution context and collaborators.
FiniteElement class
FiniteElement(*, element: object, quadrature_order: int | None = None, provider: object | None = None, stabilization: object | None = None, convection: object | None = None, diffusion: object | None = None, reaction_sources: object | None = None, limiter: object | None = None, stability: object | None = None, initialization: object | None = None, boundary_enforcement: object | None = None) -> None
Choose an element space, integration rule, stabilization, boundary enforcement and compatible term components.
Methods and properties.
bind_space(mesh, *, factory=None, periodic=None)
Build the selected actual FE space through its explicitly selected owner.
GalerkinAdvection class
GalerkinAdvection(factory: object | None = None) -> None
Select the Galerkin advection contribution in an appropriate finite-element weak form.
Methods and properties.
bind(*, space, field_binding)
Bind this declaration to the supplied execution context and collaborators.
GalerkinDiffusion class
GalerkinDiffusion(*, factory: object = None) -> None
Select the Galerkin diffusion contribution where the physical residual exposes that port.
Methods and properties.
bind_volume(*, space)
Unweighted physical Cartesian gradient form on the selected volume space.
bind(*, space, coefficients, periodic, boundaries, boundary_enforcement=None)
Bind this declaration to the supplied execution context and collaborators.
GLS class
GLS(*, tau: object, factory: object | None = None, strong_residual: object | None = None) -> None
Select Galerkin least-squares stabilization with a scale tau and a compatible strong residual.
Methods and properties.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
GradDiv class
GradDiv(*, penalty: object = 1.0, factory: object = None) -> None
Select a penalty on the divergence of the velocity in a compatible mixed momentum assembly.
Methods and properties.
bind(*, space, balance, mesh_motion=None)
Bind this declaration to the supplied execution context and collaborators.
HcurlNitsche class
HcurlNitsche(penalty: float = 50.0) -> None
Use in boundary_enforcement for weak tangential traces with a dimensionless penalty.
Methods and properties.
bind_hcurl(*, space, model, mesh)
Bind the H(curl) operator on the supplied carrier.
HydrostaticGraphViscosity class
HydrostaticGraphViscosity(*, mass: object, invariant_domain: object, maximum_expansions: int = 32, factory: object = None, dry_linearization: object = None) -> None
Combine graph viscosity with hydrostatic equilibrium and a shallow-water invariant domain.
Methods and properties.
bind_graph(*, space, model, law, boundaries, flux)
Build the graph-based operation on the supplied discrete support.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
InterpolatedFluxDivergence class
InterpolatedFluxDivergence(*, factory: object | None = None) -> None
Use a compatible continuous formulation that differentiates the interpolated physical flux.
Methods and properties.
bind(*, space)
Bind this declaration to the supplied execution context and collaborators.
InvariantDomainGraphViscosity class
InvariantDomainGraphViscosity(*, mass: object, invariant_domain: object, maximum_expansions: int = 32, factory: object = None) -> None
Choose a continuous-graph viscosity treatment using a selected mass operator and invariant domain.
Methods and properties.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
bind_graph(*, space, model, law, boundaries, flux)
Build the graph-based operation on the supplied discrete support.
Lagrange class
Lagrange(order: int = 1) -> None
Use as element for a continuous nodal space. Order is total degree on simplices and per-coordinate degree on supported hexahedra.
MixedContinuityContribution class
MixedContinuityContribution(*, mass: object = None, velocity: object = None, pressure: object = None, load: object = None) -> None
Provide explicit mass, velocity, pressure or load pieces for the mixed continuity assembly.
MixedDiffusionElement class
MixedDiffusionElement(*, flux: object, scalar: object) -> None
Pair an H(div) flux space with a discontinuous scalar element for a mixed diffusion solve.
Methods and properties. order. Read the nominal selected order.
bind(*, mesh, quadrature_order=None)
Bind this declaration to the supplied execution context and collaborators.
MixedMomentumContribution class
MixedMomentumContribution(*, mass: object = None, momentum: object = None, pressure: object = None, load: object = None) -> None
Provide explicit mass, momentum, pressure or load pieces for the mixed momentum assembly.
Nedelec class
Nedelec(order: int = 1) -> None
Use as element for first-family H(curl) edge elements. The positive public order starts at one.
Nitsche class
Nitsche(*, penalty: float = 10.0, symmetry: float = 1.0, factory: object | None = None) -> None
Enforce compatible diffusion or inflow traces weakly. Penalty and symmetry select the boundary form.
Methods and properties.
bind_physical(*, operator)
Bind the numerical operation to the supplied physical model and geometry.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
OrderedFields class
OrderedFields(*, lower: str, upper: str, minimum_separation: float) -> None
Constrain two named fields to remain ordered with a specified minimum separation.
Methods and properties.
bind(*, model, law)
Bind this declaration to the supplied execution context and collaborators.
admissible(values)
Test the supplied state against the invariant-domain rule.
maximum_scaling(mean, samples)
Compute the permitted scaling toward an admissible mean.
PSPG class
PSPG(*, time_scale: object, factory: object = None) -> None
Set the stabilization time scale for the supported pressure-stabilized mixed residual.
Methods and properties.
bind(*, space, balance, mesh_motion=None)
Bind this declaration to the supplied execution context and collaborators.
RaviartThomas class
RaviartThomas(order: int = 0) -> None
Use as the H(div) flux space with polynomial subdegree k. RT0 has order zero.
Methods and properties.
bind(*, mesh, quadrature_order=None)
Bind this declaration to the supplied execution context and collaborators.
RowSumLumping class
RowSumLumping(factory: object = None) -> None
Supply row-sum mass lumping to a compatible nodal or graph-viscosity method.
Methods and properties.
diagonal(*, space, consistent_mass)
Evaluate the diagonal entries used by the mass or operator contract.
ScalarInterval class
ScalarInterval(field: str, lower: float, upper: float) -> None
Constrain the named scalar field to an interval by mean-preserving scaling in a supported limiter.
Methods and properties.
coordinate_bounds(*, point_count)
Return the bounds used by the compatible limiter.
bind(*, model, law)
Bind this declaration to the supplied execution context and collaborators. tolerance. Read the tolerance used in the bound check.
admissible(values)
Test the supplied state against the invariant-domain rule.
maximum_scaling(mean, samples)
Compute the permitted scaling toward an admissible mean.
source_step(values, source)
Forward-source bound for both faces of the selected scalar interval.
StateLimiterPort protocol
StateLimiterPort(*args, **kwargs)
Structural contract for an executable state limiter on the bound spatial state.
Methods and properties.
limit(values, *, time: float, stage_id: object)
Return the limited state or slope for the supplied carrier and admissibility policy.
SUPG class
SUPG(*, tau: object, factory: object | None = None, strong_residual: object | None = None) -> None
Select streamline-upwind Petrov–Galerkin stabilization with tau and a supported strong residual.
Methods and properties.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.
SymmetricInteriorPenalty class
SymmetricInteriorPenalty(*, penalty: float = 10.0, factory: object | None = None) -> None
Select symmetric interior-penalty diffusion for DG with an explicit penalty.
Methods and properties.
bind(*, space, coefficients, periodic, boundaries=None)
Bind this declaration to the supplied execution context and collaborators.
TaylorHood class
TaylorHood(order: int = 2) -> None
Select a mixed velocity–pressure space with pressure one polynomial degree lower than velocity.
Methods and properties.
bind(*, mesh, quadrature_order=None)
Bind this declaration to the supplied execution context and collaborators.
VolumeCIP class
VolumeCIP(*, diffusivity: object, factory: object | None = None) -> None
Penalize jumps of the normal derivative with an explicitly supplied diffusivity.
Methods and properties.
bind(*, space, balance)
Bind this declaration to the supplied execution context and collaborators.