Quantities
The concept of quantities is implemented on top of the concept of species numbers. They have been introduces in order to be able to handle discontinuities at interfaces.
VoronoiFVM.AbstractQuantity
— Typeabstract type AbstractQuantity{Ti<:Integer}
Abstract supertype of quantities
VoronoiFVM.ContinuousQuantity
— Typestruct ContinuousQuantity{Ti} <: VoronoiFVM.AbstractQuantity{Ti}
A continuous quantity is represented by exactly one species number
ispec::Any
: Species number representing the quantity
id::Any
: Quantity identifier allowing to use the quantity as index in parameter fields
VoronoiFVM.ContinuousQuantity
— Method ContinuousQuantity(system,regions; ispec=0, id=0)
Add continuous quantity to the regions listed in regions
.
Unless specified in ispec
, the species number is generated automatically.
Unless specified by id
, the quantity ID is generated automatically.
VoronoiFVM.DiscontinuousQuantity
— Typestruct DiscontinuousQuantity{Ti} <: VoronoiFVM.AbstractQuantity{Ti}
A discontinuous quantity is represented by different species in neighboring regions.
regionspec::Vector
: Species numbers representing the quantity in each region
id::Any
: Quantity identifier allowing to use the quantity as index in parameter fields
VoronoiFVM.DiscontinuousQuantity
— Method DiscontinuousQuantity(system,regions; regionspec=nothing, id=0)
Add discontinuous quantity to the regions listed in regions
.
Unless specified in regionspec
, the species numbers for each region are generated automatically.
Unless specified by id
, the quantity ID is generated automatically.
VoronoiFVM.InterfaceQuantity
— Typestruct InterfaceQuantity{Ti} <: VoronoiFVM.AbstractQuantity{Ti}
An interface quantity is represented by exactly one species number
ispec::Any
: Species number representing the quantity
bregspec::Vector
: boundary regions, where interface quantity is defined
id::Any
: Quantity identifier allowing to use the quantity as index in parameter fields
VoronoiFVM.InterfaceQuantity
— Method InterfaceQuantity(system,regions; ispec=0, id=0)
Add interface quantity to the boundary regions given in breg
.
Unless specified in ispec
, the species number is generated automatically.
Unless specified by id
, the quantity ID is generated automatically.
Base.getindex
— MethodA[q]
Access columns of vectors A
using id of quantity q
. This is meant for vectors indexed by species.
Base.getindex
— MethodM[q,i]
Access columns M
using id of quantity q
. This is meant for nspecies x nregions matrices e.g. defining parameters.
Base.getindex
— Methodnode[quantity]
edge[quantity]
Return species number on AbstractNode
or AbstractEdge
Base.getindex
— Methodbnode[quantity,ireg]
Return species number of discontinuous quantity region ireg
adjacent to BNode
.
Base.getindex
— Methodbnode[quantity]
Return species number of discontinuous quantity region ireg
adjacent to BNode
for outer boundary nodes.
Base.getindex
— Methodu[q,j]
Return value of quantity in unknowns on edge in flux callbacks.
Base.getindex
— Methodu[q]
Return value of quantity in unknowns on node in node callbacks.
Base.getindex
— Methodu[q,ireg]
Return value of discontinuous quantity in unknowns adjacent to unknowns on boundary node.
Base.setindex!
— MethodA[q]
Set element of A
using id of quantity q
This is meant for vectors indexed by species.
Base.setindex!
— MethodM[q,i]
Set element of M
using id of quantity q
. This is meant for nspecies x nregions matrices e.g. defining parameters.
Base.setindex!
— Methodf[q]=value
Set rhs value for quantity in callbacks
Base.setindex!
— Methodf[q,ireg]=v
Set rhs value for discontinuous quantity in adjacent regions of boundary node.
VoronoiFVM.boundary_dirichlet!
— Methodboundary_dirichlet(system, quantity, ibc, value)
Set Dirichlet boundary value
for quantity
at boundary ibc
.
VoronoiFVM.num_quantities
— Methodnum_quantities(system)
Number of quantities defined for system
VoronoiFVM.subgrids
— Methodsubgrids(quantity, system)
Return a vector of subgrids containing a subgrid for each region where discontinuous quantity is defined.
VoronoiFVM.subgrids
— Methodsubgrids(quantity, system)
Return the subgrid where interface quantity is defined.
VoronoiFVM.views
— Methodviews(quantity, subgrids,system)
Return a vector of solutions containing the solutions with respect tp each region where discontinuous quantity is defined.