Global Constraints
GlobalConstraints are additional constraints that the user does not wish to implement as a global Lagrange multiplier because it e.g. causes a dense row in the system matrix and therefore may destroy the performance of the sparse matrix routines. Such a constraint may be a fixed integral mean. Another application are periodic boundary conditions or glued-together quantities in different regions of the grid. Here a CombineDofs constraint may help.
GradientRobustMultiPhysics.CombineDofs
— Typefunction CombineDofs(idX::Int,idY::Int,dofsX::Array{Int,1},dofsY::Array{Int,1})
constructs a CombineDofs constraint that (if assigned to a PDEDescription) ensures that the dofsX of the unknown with id idX matches the dofsY of the unknown with id idY.
GradientRobustMultiPhysics.CombineDofs
— Typestruct CombineDofs{T} <: AbstractGlobalConstraint
combines specified degrees of freedom of two unknown (can be the same), which allows to glue together different unknowns in different regions or periodic boundary conditions
GradientRobustMultiPhysics.FixedDofs
— Typestruct FixedDofs{T} <: AbstractGlobalConstraint
fixes integral mean of the unknown to the specified value
GradientRobustMultiPhysics.FixedDofs
— Methodfunction FixedDofs(unknown_id::Int, value::Real; name::String = "")
constructs a FixedDofs constraint that (if assigned to a PDEDescription) ensures that the dofs are fixed to the specified values.
GradientRobustMultiPhysics.FixedIntegralMean
— Typestruct FixedIntegralMean <: AbstractGlobalConstraint
fixes integral mean of the unknown to the specified value
GradientRobustMultiPhysics.FixedIntegralMean
— Methodfunction FixedIntegralMean(unknown_id::Int, value::Real; name::String = "")
constructs a FixedIntegralMean constraint that (if assigned to a PDEDescription) ensures that the unknown with the specified id has an integral mean value.
GradientRobustMultiPhysics.get_periodic_coupling_info
— Methodfunction get_periodic_coupling_info(FES, xgrid, b1, b2, is_opposite::Function; factor_vectordofs = "auto")
computes the dofs that have to be coupled for periodic boundary conditions on the given xgrid for boundary regions b1, b2. The isopposite function evaluates if two provided face midpoints are on opposite sides to each other (the mesh xgrid should be appropriate). For vector-valued FETypes the user can provide factorvectordofs to incorporate a sign change if needed. This is automatically done for all Hdiv-conforming elements and (for the normal-weighted face bubbles of) the Bernardi-Raugel element H1BR.
GradientRobustMultiPhysics.add_constraint!
— Functionadd_constraint!(
PDE::PDEDescription,
GC::AbstractGlobalConstraint
)
Adds the given global constraint to the PDEDescription.