Problem Description
Central object is the ProblemDescription which is given as a weak form of your problem and usually does not need any information on the discretisation at this point (but of course can depend on region numbers).
ExtendableFEM.ProblemDescription
— Typestruct ProblemDescription
Structure holding data for a problem description with the following fields:
name::String
: The name of the problem used for printout messages. Default: "My Problem"
unknowns::Vector{Unknown}
: A vector of Unknowns that are involved in the problem.
operators::Vector{ExtendableFEM.AbstractOperator}
: A vector of operators that are involved in the problem.
Constructors and assign functions
ExtendableFEM.assign_operator!
— Methodassign_operator!(PD::ProblemDescription, o::AbstractOperator)
Assigns the AbstractOperator o to the ProblemDescription PD and returns its position in the operators array of the ProblemDescription.
ExtendableFEM.assign_unknown!
— Methodassign_unknown!(PD::ProblemDescription, u::Unknown)
Assigns the Unknown u to the ProblemDescription PD and returns its position in the unknowns array of the ProblemDescription.
ExtendableFEM.replace_operator!
— Methodreplace_operator!(PD::ProblemDescription, j::Int, o::AbstractOperator)
Replaces the j-th operator of the ProblemDescription PD by the new operator o. Here, j is the position in operator array returned by the assign_operator! function. Nothing is returned (as the new operator gets position j).
Unknowns
An Unknown is an identifies that encodes a physical quantity in the ProblemDescription.
ExtendableFEM.Unknown
— Typestruct Unknown
Structure holding information for an unknown with the following fields:
name::String
: The name of the unknown used for printout messages.
identifier::Any
: The identifier of the unknown used for assignments to operators.
parameters::Dict{Symbol, Any}
: Further properties of the unknown can be stored in a Dict, see constructor.
ExtendableFEM.Unknown
— Methodfunction Unknown(
u::String;
identifier = Symbol(u),
name = u,
kwargs...)
Generates and returns an Unknown with the specified name, identifier and other traits.
Example: BilinearOperator([grad(1)], [grad(1)]; kwargs...) generates a weak Laplace operator.
Keyword arguments:
algebraic_constraint
: is this unknown an algebraic constraint?. Default: nothingdimension
: dimension of the unknown. Default: nothingsymbol_ansatz
: symbol for ansatz functions of this unknown in printouts. Default: nothingsymbol_test
: symbol for test functions of this unknown in printouts. Default: nothing
Base.div
— Methoddiv(u)
alias for (u, Divergence)
ExtendableFEM.apply
— Methodapply(u, FO::Type{<:AbstractFunctionOperator})
alias for (u, FO)
ExtendableFEM.average
— Methodaverage(o:Tuple{Union{Unknown, Int}, StandardFunctionOperator})
alias for (o[1], Average{o[2]})
ExtendableFEM.curl1
— Methodcurl1(u)
alias for (u, CurlScalar)
ExtendableFEM.curl2
— Methodcurl2(u)
alias for (u, Curl2D)
ExtendableFEM.curl3
— Methodcurl3(u)
alias for (u, Curl3D)
ExtendableFEM.dofgrid
— Methoddofgrid(u)
alias for (u, "dofgrid") (triggers gridplot for the dofgrid in plot)
ExtendableFEM.grad
— Methodgrad(u)
alias for (u, Gradient)
ExtendableFEM.grid
— Methodgrid(u)
alias for (u, "grid") (triggers gridplot in plot)
ExtendableFEM.hessian
— Methodhessian(u)
alias for (u, Hessian)
ExtendableFEM.id
— Methodid(u)
alias for (u, Identity)
ExtendableFEM.jump
— Methodjump(o:Tuple{Union{Unknown, Int}, StandardFunctionOperator})
alias for (o[1], Jump{o[2]})
ExtendableFEM.laplace
— Methodlaplace(u)
alias for (u, Laplacian)
ExtendableFEM.normalflux
— Methodnormalflux(u)
alias for (u, NormalFlux)
ExtendableFEM.other
— Methodother(o:Tuple{Union{Unknown, Int}, StandardFunctionOperator})
alias for (o[1], Right{o[2]})
ExtendableFEM.tangentialflux
— Methodtangentialflux(u)
alias for (u, TangentFlux)
ExtendableFEM.tangentialgrad
— Methodtangentialgrad(u)
alias for (u, TangentialGradient)
ExtendableFEM.this
— Methodthis(o:Tuple{Union{Unknown, Int}, StandardFunctionOperator})
alias for (o[1], Left{o[2]})
ExtendableFEM.Δ
— MethodΔ(u)
alias for (u, Laplacian)
Operators
Operator is a quite general concept and is everything that makes modifications to the system matrix, hence classical representations of weak discretisations of differential operators, penalisations for boundary conditions or constraints, or stabilisation terms.
Types of operators
The three most important operator classes are:
- NonlinearOperator (e.g. the convection term in a Navier-Stokes problem)
- BilinearOperator (e.g. the Laplacian in a Poisson problem)
- LinearOperator (e.g. the right-hand side in a Poisson or Navier-Stokes problem)
To assign boundary conditions or global constraints there are three possibilities:
- InterpolateBoundaryData
- HomogeneousData
- FixDofs
- CombineDofs
Entities and Regions
Each operator assembles on certain entities of the mesh, the default is a cell-wise assembly. Most operators have the entities kwarg to changes that. Restrictions to subsets of the entities can be made via the regions kwarg.
Entities | Description |
---|---|
AT_NODES | interpolate at vertices of the mesh (only for H1-conforming FEM) |
ON_CELLS | assemble/interpolate on the cells of the mesh |
ON_FACES | assemble/interpolate on all faces of the mesh |
ON_IFACES | assemble/interpolate on the interior faces of the mesh |
ON_BFACES | assemble/interpolate on the boundary faces of the mesh |
ON_EDGES (*) | assemble/interpolate on all edges of the mesh (in 3D) |
ON_BEDGES (*) | assemble/interpolate on the boundary edges of the mesh (in 3D) |
(*) = only reasonable in 3D and still experimental, might have some issues
Function Operators
The definition of operators often involves paris of an Unknown and a FunctionOperator (or an alias as listed above). FunctionOperators are something like Identity, Gradient etc. (see here for a complete list). Additional FunctionOperators for the evaluation of discontinuous operators on faces available (needed in particular for defining operators in DG context or face terms in a posteriori error estimators):
ExtendableFEM.Average
— TypeAverage{StandardFunctionOperator}
evaluates the average of a StandardFunctionOperator
ExtendableFEM.DiscontinuousFunctionOperator
— TypeDiscontinuousFunctionOperator
Subtype of AbstractFunctionOperator dedicated to evaluations of discontinuous quantities on faces like jumps, averages etc.
ExtendableFEM.Jump
— TypeJump{StandardFunctionOperator}
evaluates the jump of a StandardFunctionOperator
ExtendableFEM.Left
— TypeLeft{StandardFunctionOperator}
evaluates the left (w.r.t. orientation of the face) value of a StandardFunctionOperator
ExtendableFEM.Right
— TypeAverage{StandardFunctionOperator}
evaluates the right (w.r.t. orientation of the face) value of a StandardFunctionOperator