api.essential_bc#

Functions#

apply_essential_bc(a, *bcs, **kwargs)

apply_essential_bc_BlockLinearOperator(a, bc, *)

Apply homogeneous dirichlet boundary conditions in nD.

apply_essential_bc_BlockVector(a, bc, *[, ...])

Apply homogeneous dirichlet boundary conditions in nD.

apply_essential_bc_kronecker_dense_matrix(a, ...)

This function applies the homogeneous boundary condition to the Kronecker product matrix objects,

apply_essential_bc_stencil(a, *, axis, ext, ...)

This function applies the homogeneous boundary condition to the Stencil objects,

check_boundary_type(bc)

Details#

apply_essential_bc(a, *bcs, **kwargs)[source]#
check_boundary_type(bc)[source]#
apply_essential_bc_kronecker_dense_matrix(a, *, axis, ext, order, identity=False)[source]#
This function applies the homogeneous boundary condition to the Kronecker product matrix objects,

If the identity keyword argument is set to True, the boundary diagonal terms are set to 1.

Parameters:
aKroneckerDenseMatrix

The matrix to be modified.

axisint

Axis of the boundary, i.e. the index of the coordinate which remains constant.

extint

Extremity of the boundary, it takes the value of -1 or 1.

orderint

All function derivatives up to order are set to zero on the specified boundary. order >= 0 is required.

identitybool

If true, the diagonal terms corresponding to boundary coefficients are set to 1.

apply_essential_bc_stencil(a, *, axis, ext, order, identity=False)[source]#
This function applies the homogeneous boundary condition to the Stencil objects,

by setting the boundary degrees of freedom to zero in the StencilVector, and the corresponding rows in the StencilMatrix/StencilInterfaceMatrix to zeros. If the identity keyword argument is set to True, the boundary diagonal terms are set to 1.

Parameters:
aStencilVector, StencilMatrix or StencilInterfaceMatrix

The matrix or the Vector to be modified.

axisint

Axis of the boundary, i.e. the index of the coordinate which remains constant.

extint

Extremity of the boundary, it takes the value of -1 or 1.

orderint

All function derivatives up to order are set to zero on the specified boundary. order >= 0 is required.

identitybool

If True, the diagonal terms corresponding to boundary coefficients are set to 1.

apply_essential_bc_BlockLinearOperator(a, bc, *, identity=False, is_broken=True)[source]#

Apply homogeneous dirichlet boundary conditions in nD. is_broken is used to identify if we are in a multipatch setting, where we assume that the domain and codomain of each block of the BlockLinearOperator corresponds to a single patch.

Parameters:
aBlockLinearOperator

The BlockLinearOperator to be modified.

bc: Sympde.expr.equation.BasicBoundaryCondition

The boundary condition type that will be applied to a.

is_broken: bool

Set to True if we are in a multipatch setting and False otherwise.

apply_essential_bc_BlockVector(a, bc, *, is_broken=True)[source]#
Apply homogeneous dirichlet boundary conditions in nD.

is_broken is used to identify if we are in a multipatch setting, where we assume each block of the BlockVector corresponds to a different patch.

Parameters:
aBlockVector

The BlockVector to be modified.

bc: Sympde.expr.equation.BasicBoundaryCondition

The boundary condition type that will be applied to a.

is_broken: bool

Set to True if we are in a multipatch setting and False otherwise.