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.FESpaceType
struct 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.

source
ExtendableFEMBase.FESpaceMethod
function 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.

source
Base.eltypeMethod
eltype(
    _::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.

source
Base.get!Method
get!(FES::FESpace, DM::Type{<:DofMap}) -> Any

To be called by getindex. This triggers lazy creation of non-existing dofmaps

source
Base.getindexMethod
Base.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.

source
Base.showMethod
show(
    io::IO,
    FES::FESpace{Tv, Ti, FEType<:AbstractFiniteElement, APT}
)

Custom show function for FESpace that prints some information and all available dofmaps.

source
ExtendableFEMBase.assemblytypeMethod
assemblytype(
    _::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.

source

DofMaps

ExtendableFEMBase.DofMapType
abstract 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].

source

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]).

DofMapExplanation
CellDofsdegrees of freedom for on each cell
FaceDofsdegrees of freedom for each face
EdgeDofsdegrees of freedom for each edge (in 3D)
BFaceDofsdegrees of freedom for each boundary face
BEdgeDofsdegrees of freedom for each boundary edge (in 3D)