Solution objects
Dense solution arrays
VoronoiFVM.DenseSolutionArray
— Typeconst DenseSolutionArray=Matrix
Dense storage of solution
VoronoiFVM._add
— Method_add(U::Array{Tv, 2}, idof, val) -> Any
Add residual value into global degree of freedom
VoronoiFVM.dof
— Methoddof(a, ispec, K)
Get degree of freedom number
VoronoiFVM.values
— Methodvalues(a)
Array of values in solution array.
Sparse solution arrays
VoronoiFVM.SparseSolutionArray
— Typestruct SparseSolutionArray{Tv, Ti} <: AbstractArray{Tv, 2}
Struct holding solution information for SparseSystem. Solution is stored in a sparse matrix structure.
This class plays well with the abstract array interface.
Fields:
node_dof::SparseArrays.SparseMatrixCSC{Tv, Ti} where {Tv, Ti}
: Sparse matrix holding actual data.
Base.copy
— Methodcopy(this)
Create a copy of sparse solution array
Base.getindex
— Methodgetindex(a, ispec, inode)
Accessor for sparse solution array.
Base.setindex!
— Methodsetindex!(a, v, ispec, inode)
Accessor for sparse solution array.
Base.similar
— Methodsimilar(this)
Create a similar uninitialized sparse solution array
Base.size
— Methodsize(a)
Return size of sparse solution array.
VoronoiFVM._add
— Method_add(U::VoronoiFVM.SparseSolutionArray, idof, val) -> Any
Add residual value into global degree of freedom
VoronoiFVM.dof
— Methoddof(a, i, j)
Get number of degree of freedom. Return 0 if species is not defined in node.
VoronoiFVM.getdof
— Methodgetdof(a, i)
Return value for degree of freedom.
VoronoiFVM.setdof!
— Methodsetdof!(a, v, i)
Set value for degree of freedom.
VoronoiFVM.values
— Methodvalues(a)
Array of values in sparse solution array.
Transient solution
VoronoiFVM.AbstractTransientSolution
— Typeabstract type AbstractTransientSolution{T, N, A, B} <: AbstractDiffEqArray{T, N, A}
Abstract type for transient solution
VoronoiFVM.TransientSolution
— Typemutable struct TransientSolution{T, N, A, B} <: VoronoiFVM.AbstractTransientSolution{T, N, A, B}
Transient solution structure
Fields
u::Any
: Vector of solutions
t::Any
: Vector of times
history::TransientSolverHistory
: History
Interface
Object of this type adhere to the AbstractDiffEqArray
interface. For indexing and interpolation, see https://diffeq.sciml.ai/stable/basics/solution/.
In particular, a TransientSolution sol
can be accessed as follows:
sol[i]
contains the solution for timestepi
sol[ispec,:,i]
contains the solution for componentispec
at timestepi
sol(t)
returns a (linearly) interpolated solution value fort
.sol.t[i]
is the corresponding time for timestepi
sol[ispec,ix,i]
refers to solution of componentispec
at nodeix
at momenti
VoronoiFVM.TransientSolution
— MethodTransientSolution(t0,inival;
in_memory=true,
keep_open=true,
fname=tempname(pwd())*".jld2"
Constructor of transient solution with initial value and initial time.
in_memory
: if true (default), data are kept in main memory, otherwise on disk (via JLD2)keep_open
: if true, disk file is not closed during the existence of the objectfname
: file name for the disk file
VoronoiFVM.VectorOfDiskArrays
— MethodVectorOfDiskArrays(firstobj:AbstractArray;
keep_open=true,
fname= fname=tempname(pwd())*".jld2")
Constructor of vector of arrays stored on disk (via JLD2).
keep_open
: if true, disk file is not closed during the existence of the objectfname
: file name for the disk file
The disk file is automatically removed if the object is garbage collected.
VoronoiFVM.history
— Methodhistory(tsol)
Return solver history if log
was set to true. See see NewtonSolverHistory
, TransientSolverHistory
.
VoronoiFVM.history_details
— Methodhistory_details(tsol)
Return details of solver history from last solve
call, if log
was set to true. See details
.
VoronoiFVM.history_summary
— Methodhistory_summary(tsol)
Return summary of solver history from last solve
call, if log
was set to true.