Parameters
Parameters bundles everything a physics evaluation needs that is not the solution field itself: boundary and initial conditions, sources, the time stepper, and the per-block physics and properties.
Per-block physics and properties
physics and properties may be given either as a single object shared by the whole mesh
p = create_parameters(mesh, asm, physics, props)or as a NamedTuple with one entry per element block, keyed by block name
p = create_parameters(
mesh, asm,
(steel = steel_physics, foam = foam_physics),
(steel = steel_props, foam = foam_props)
)In the single-object form the object is replicated across every block. In the NamedTuple form the keys must be exactly the mesh's block names: a block with no entry, or an entry naming no block, raises a BlockMismatchError rather than running with some block silently taking another block's material.
The entries are reordered to match the block order of the function space (see Block order), so the order the NamedTuple is written in does not matter — only the names do. Downstream, p.physics and p.properties are always keyed by block name and ordered by block index, which is the pairing foreach_block and the assembly kernels rely on.
API
FiniteElementContainers.AbstractParameters — Type
abstract type AbstractParametersFiniteElementContainers.Parameters — Type
struct Parameters{IT<:Integer, RT<:Number, IV<:AbstractArray{IT<:Integer, 1}, RV<:AbstractArray{RT<:Number, 1}, RM1<:(AbstractMatrix), RM2<:(AbstractMatrix), RM3<:(AbstractMatrix), RM4<:(AbstractMatrix), ICFuncs<:(AbstractVector), DBCFuncs<:(AbstractVector), SRCFuncs<:(AbstractVector), NBCFuncs<:(AbstractVector), PBCFuncs<:(AbstractVector), RBCFuncs<:(AbstractVector), Phys, Props, Coords<:FiniteElementContainers.AbstractField, Field<:FiniteElementContainers.AbstractField} <: FiniteElementContainers.AbstractParametersics::InitialConditions{ICFuncs, IV, RV} where {IT<:Integer, RT<:Number, IV<:AbstractVector{IT}, RV<:AbstractVector{RT}, ICFuncs<:(AbstractVector)}dirichlet_bcs::DirichletBCs{DBCFuncs, IV, RV} where {IT<:Integer, RT<:Number, IV<:AbstractVector{IT}, RV<:AbstractVector{RT}, DBCFuncs<:(AbstractVector)}neumann_bcs::NeumannBCs{NBCFuncs, IT, IV, RM1} where {IT<:Integer, IV<:AbstractVector{IT}, RM1<:(AbstractMatrix), NBCFuncs<:(AbstractVector)}periodic_bcs::PeriodicBCs{PBCFuncs, IV, RV} where {IT<:Integer, RT<:Number, IV<:AbstractVector{IT}, RV<:AbstractVector{RT}, PBCFuncs<:(AbstractVector)}robin_bcs::RobinBCs{RBCFuncs, IT, IV, RM2, RM3} where {IT<:Integer, IV<:AbstractVector{IT}, RM2<:(AbstractMatrix), RM3<:(AbstractMatrix), RBCFuncs<:(AbstractVector)}sources::Sources{SRCFuncs, RM4} where {RM4<:(AbstractMatrix), SRCFuncs<:(AbstractVector)}times::TimeStepperphysics::Anyproperties::Anystate_old::StateVariableField{RT, RV} where {RT<:Number, RV<:AbstractVector{RT}}state_new::StateVariableField{RT, RV} where {RT<:Number, RV<:AbstractVector{RT}}coords::FiniteElementContainers.AbstractFieldfield::FiniteElementContainers.AbstractFieldfield_old::FiniteElementContainers.AbstractFieldhvp_scratch_field::FiniteElementContainers.AbstractField
FiniteElementContainers._align_blocks — Method
Align a user-supplied physics/properties argument with the element blocks of fspace, returning a NamedTuple keyed by block name and ordered by block index, so that entry b always belongs to block b.
Everything downstream – _setup_state_variables, foreach_block, the assembly kernels – pairs entry b with block b positionally. A NamedTuple supplied in a different order than the mesh's blocks would therefore hand each block another block's material without any error, so it is permuted here, and its keys are required to be exactly the block names.
FiniteElementContainers.coordinates — Method
coordinates(
p::FiniteElementContainers.AbstractParameters
) -> Any
FiniteElementContainers.current_time — Method
current_time(
p::FiniteElementContainers.AbstractParameters
) -> Any
FiniteElementContainers.dirichlet_dofs — Method
dirichlet_dofs(
p::FiniteElementContainers.AbstractParameters
) -> Any
FiniteElementContainers.initialize! — Method
initialize!(p::FiniteElementContainers.AbstractParameters)
FiniteElementContainers.periodic_dofs — Method
periodic_dofs(
p::FiniteElementContainers.AbstractParameters
) -> Tuple{Any, Any}
FiniteElementContainers.time_step — Method
time_step(
p::FiniteElementContainers.AbstractParameters
) -> Any
FiniteElementContainers.update_bc_values! — Method
update_bc_values!(
p::FiniteElementContainers.AbstractParameters,
assembler
)
This method is used to update the stored bc values. This should be called at the beginning of any load step
This method only handles updating bc values for Dirichlet and Neumann BCs
Robin BC updates are handled in robin assembly method
FiniteElementContainers.update_dofs! — Method
update_dofs!(
asm::FiniteElementContainers.AbstractAssembler,
p::Parameters
)
FiniteElementContainers.update_time! — Method
update_time!(p::FiniteElementContainers.AbstractParameters)