HomogeneousData
HomogeneousData
provides a convenient way to enforce homogeneous (zero) Dirichlet boundary conditions or constraints in a finite element problem. It automatically sets the solution to zero on specified regions or entities.
API Reference
ExtendableFEM.HomogeneousData
— MethodHomogeneousData(
u;
entities,
kwargs...
) -> HomogeneousData{_A, ON_CELLS} where _A
Construct an operator that enforces homogeneous (typically zero) values for the unknown u
on specified mesh entities and regions, using a penalty method.
When assembled, the operator penalizes the degrees of freedom (dofs) of u
to the value specified by the value
keyword (default: 0
) on the selected entities and regions.
Arguments
u
: The unknown (field variable) to be constrained.
Keyword Arguments
entities
: The mesh entities on which to apply the condition (e.g.,ON_CELLS
,ON_BFACES
,ON_FACES
). Default isON_CELLS
.mask
: array of zeros/ones to set which components should be set by the operator (only works with componentwise dofs, add a 1 or 0 to mask additional dofs). Default: Any[]name
: name for operator used in printouts. Default: ''HomogeneousData''penalty
: penalty for fixed degrees of freedom. Default: 1.0e30regions
: subset of regions where operator should be assembly only. Default: Any[]value
: constant value of the data. Default: 0verbosity
: verbosity level. Default: 0
Returns
A HomogeneousData
operator instance specifying the constraint.
ExtendableFEM.HomogeneousBoundaryData
— MethodHomogeneousBoundaryData(
u;
entities,
kwargs...
) -> HomogeneousData
Construct an operator that enforces homogeneous (typically zero) values for the unknown u
on boundary faces and specified boundary regions, using a penalty method.
This is a convenience constructor for imposing homogeneous Dirichlet or essential boundary conditions on the boundary of the domain. It is equivalent to calling HomogeneousData(u; entities=ON_BFACES, ...)
.
Arguments
u
: The unknown (field variable) to be constrained.
Keyword Arguments
entities
: The boundary entities on which to apply the condition (default:ON_BFACES
).mask
: array of zeros/ones to set which components should be set by the operator (only works with componentwise dofs, add a 1 or 0 to mask additional dofs). Default: Any[]name
: name for operator used in printouts. Default: ''HomogeneousData''penalty
: penalty for fixed degrees of freedom. Default: 1.0e30regions
: subset of regions where operator should be assembly only. Default: Any[]value
: constant value of the data. Default: 0verbosity
: verbosity level. Default: 0
Returns
- A
HomogeneousData
operator instance specifying the boundary constraint.
Example: Zero Dirichlet Boundary Condition
# Impose u = 0 on boundary region 1
assign_operator!(PD, HomogeneousBoundaryData(u; regions = [1]))