Forms
Bramble.DirichletConstraint — Typestruct DomainMarkers{FType}Alias for storage of Dirichlet constraints.
Bramble._dirichlet_bc_indices! — Method_dirichlet_bc_indices!(A, marker_indices)Internal helper to apply Dirichlet boundary conditions to matrix A for a given set of indices.
Bramble._dirichlet_bc_indices! — Methoddirichletbcindices!(A::SparseMatrixCSC, indexin_marker::BitVector)
Applies Dirichlet boundary conditions to a sparse matrix A by directly manipulating its CSC data structure for high performance.
Bramble.dirichlet_bc! — Methoddirichlet_bc!(A::AbstractMatrix, Ωₕ::AbstractMeshType, labels::Symbol...)Applies Dirichlet boundary conditions to matrix A based on marked regions in the mesh Ωₕ.
For each index i associated with the given Dirichlet labels, this function:
- Sets all elements in the
i-th row ofAto zero. - Sets the diagonal element
A[i, i]to one.
Bramble.dirichlet_bc! — Methoddirichlet_bc!(v::AbstractVector, Ωₕ::AbstractMeshType, bcs::DirichletConstraint, labels::Symbol...)Apply Dirichlet boundary conditions to vector v using the DirichletConstraint object bcs and the mesh Ωₕ.
Bramble.symmetrize! — Methodsymmetrize!(A, F, Ωₕ, labels)Modifies the linear system Ax = F to make A symmetric after applying Dirichlet conditions. It updates the vector F and zeros out the columns of A corresponding to Dirichlet nodes.
The algorithm goes as follows: for any given row i where Dirichlet boundary conditions have been applied
- calculate `dᵢ = cᵢ .* F`, where `cᵢ` is the `i`-th column of `A`;
- replace `F` by substracting `dᵢ` to `F` (except for the `i`-th component)
- replace all elements in the `i`-th column of `A` (except the `i`-th by zero).Bramble.LinearForm — Typestruct LinearForm{TestType,F} <: LinearFormType
test_space::TestType
form_expr::F
endStructure to store the data associated with a llinear form
\[\begin{array}{rcll} l \colon & W_h &\longrightarrow &\mathbb{R} \\ & v &\longmapsto & l(v). \end{array}\]
The field form_expr has the expression of the form and the remaining field stores the test space $W_h$.
Bramble.LinearFormType — TypeLinearFormTypeAbstract type for linear forms.
Bramble._assemble! — Method_assemble!(x::AbstractVector, l::LinearForm)In-place assemble of a linear form into a given vector.
Bramble._assemble! — Method_assemble!(uₕ::VectorElement, l::LinearForm)In-place assemble of a linear form into a given VectorElement.
Bramble.test_space — Methodtest_space(a::LinearForm)Returns the test space of a linear form.
Bramble.BilinearForm — Typestruct BilinearForm{TrialType,TestType,F} <: BilinearFormType
trial_space::TrialType
test_space::TestType
form_expr::F
endStructure to store the data associated with a bilinear form
\[\begin{array}{rcll} a \colon & W_h \times V_h &\longrightarrow &\mathbb{R} \\ & (u,v) &\longmapsto & a(u,v). \end{array}\]
The field form_expr has the expression of the form and the remaining fields store the trial and test spaces $W_h$ and $V_h$.
Bramble.BilinearFormType — TypeBilinearFormTypeAbstract type for bilinear forms.
Bramble._assemble! — Method_assemble!(A::AbstractMatrix, a::BilinearForm)Helper function. Copies the assembled matrix of a bilinear form to a given matrix.
Bramble._assemble — Method_assemble(a::BilinearForm)Helper function. Returns the assembled matrix of a bilinear form.
Bramble.test_space — Methodtest_space(a::BilinearForm)Returns the test space of a bilinear form.
Bramble.trial_space — Methodtrial_space(a::BilinearForm)Returns the trial space of a bilinear form.