FESpace
To generate a finite element space only a finite element type and a grid is needed, dofmaps are generated automatically on their first demand.
ExtendableFEMBase.AbstractFiniteElement
— Typeabstract type AbstractFiniteElement
root type for finite element types
ExtendableFEMBase.FESpace
— Typestruct FESpace{Tv, Ti, FEType<:AbstractFiniteElement,AT<:AssemblyType}
name::String # full name of finite element space (used in messages)
broken::Bool # if true, broken dofmaps are generated
ndofs::Int # total number of dofs
coffset::Int # offset for component dofs
xgrid::ExtendableGrid[Tv,Ti} # link to xgrid
dofgrid::ExtendableGrid{Tv,Ti} # link to (sub) grid used for dof numbering (expected to be equal to or child grid of xgrid)
dofmaps::Dict{Type{<:AbstractGridComponent},Any} # backpack with dofmaps
end
A struct that has a finite element type as parameter and carries dofmaps (CellDofs, FaceDofs, BFaceDofs) plus additional grid information and access to arrays holding coefficients if needed.
ExtendableFEMBase.FESpace
— Methodfunction FESpace{FEType<:AbstractFiniteElement,AT<:AssemblyType}(
xgrid::ExtendableGrid{Tv,Ti};
name = "",
broken::Bool = false)
Constructor for FESpace of the given FEType, AT = ONCELLS/ONFACES/ONEDGES generates a finite elements space on the cells/faces/edges of the provided xgrid (if omitted ONCELLS is used as default). The broken switch allows to generate a broken finite element space (that is piecewise H1/Hdiv/HCurl). If no name is provided it is generated automatically from FEType. If no AT is provided, the space is generated ON_CELLS.
Base.eltype
— Methodeltype(
_::FESpace{Tv, Ti, FEType<:AbstractFiniteElement, APT}
) -> Type{FEType} where FEType<:AbstractFiniteElement
Custom eltype
function for FESpace
returns the finite element type parameter of the finite element space.
Base.get!
— Methodget!(FES::FESpace, DM::Type{<:DofMap}) -> Any
To be called by getindex. This triggers lazy creation of non-existing dofmaps
Base.getindex
— MethodBase.getindex(FES::FESpace,DM::Type{<:DofMap})
Generic method for obtaining dofmap. This method is mutating in the sense that non-existing dofmaps are created on demand. Due to the fact that components are stored as Any the return value triggers type instability.
Base.setindex!
— Methodsetindex!(FES::FESpace, v, DM::Type{<:DofMap}) -> Any
Set new dofmap
Base.show
— Methodshow(
io::IO,
FES::FESpace{Tv, Ti, FEType<:AbstractFiniteElement, APT}
)
Custom show
function for FESpace
that prints some information and all available dofmaps.
ExtendableFEMBase.assemblytype
— Methodassemblytype(
_::FESpace{Tv, Ti, FEType<:AbstractFiniteElement, APT}
) -> Any
returns the assembly type parameter of the finite element space, i.e. on which entities of the grid the finite element is defined.
ExtendableFEMBase.broken
— Methodbroken(FES::FESpace) -> Bool
returns true if the finite element space is broken, false if not
ExtendableFEMBase.get_AT
— Methodget_AT(_::FESpace{Tv, Ti, FEType, AT}) -> Any
returns the support of the finite element space
ExtendableFEMBase.get_FEType
— Methodget_FEType(_::FESpace{Tv, Ti, FEType, AT}) -> Any
returns the finite element type of the finite element space
ExtendableFEMBase.ndofs
— Methodndofs(FES::FESpace) -> Int64
returns the total number of degrees of freedom of the finite element space.
DofMaps
ExtendableFEMBase.BEdgeDofs
— Typeabstract type BEdgeDofs <: DofMap
Key type describing the dofs for each boundary edge of the dofgrid
ExtendableFEMBase.BEdgeDofsParent
— Typeabstract type BEdgeDofsParent <: DofMap
Key type describing the dofs for each boundary edge of the parentgrid
ExtendableFEMBase.BFaceDofs
— Typeabstract type BFaceDofs <: DofMap
Key type describing the dofs for each boundary face of the dofgrid
ExtendableFEMBase.BFaceDofsParent
— Typeabstract type BFaceDofsParent <: DofMap
Key type describing the dofs for each boundary face of the parentgrid
ExtendableFEMBase.CellDofs
— Typeabstract type CellDofs <: DofMap
Key type describing the dofs for each cell of the dofgrid
ExtendableFEMBase.CellDofsParent
— Typeabstract type CellDofsParent <: DofMap
Key type describing the dofs for each cell of the parentgrid
ExtendableFEMBase.DofMap
— Typeabstract type DofMap <: ExtendableGrids.AbstractGridAdjacency
Dofmaps are stored as an ExtendableGrids.AbstractGridAdjacency in the finite element space and collect information with respect to different AssemblyTypes. They are generated automatically on demand and the dofmaps associated to each subtype can be accessed via FESpace[DofMap].
ExtendableFEMBase.EdgeDofs
— Typeabstract type EdgeDofs <: DofMap
Key type describing the dofs for each edge of the dofgrid
ExtendableFEMBase.EdgeDofsParent
— Typeabstract type EdgeDofsParent <: DofMap
Key type describing the dofs for each edge of the parentgrid
ExtendableFEMBase.FaceDofs
— Typeabstract type FaceDofs <: DofMap
Key type describing the dofs for each face of the dofgrid
ExtendableFEMBase.FaceDofsParent
— Typeabstract type FaceDofsParent <: DofMap
Key type describing the dofs for each face of the parentgrid
The following DofMap subtypes are available and are used as keys to access the dofmap via FESpace[DofMap]
(which is equivalent to FESpace.dofmaps[DofMap]
).
DofMap | Explanation |
---|---|
CellDofs | degrees of freedom for on each cell |
FaceDofs | degrees of freedom for each face |
EdgeDofs | degrees of freedom for each edge (in 3D) |
BFaceDofs | degrees of freedom for each boundary face |
BEdgeDofs | degrees of freedom for each boundary edge (in 3D) |