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{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 unknwon 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
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 assing 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