Closed mjyshin closed 2 years ago
There have been some consolidations internally. Are you on the current version, 0.12.6 ? There, the
isdata
method is different from what you see in the error message.
Yes I am using 0.12.6.
(fvm) pkg> status
Status `~/fvm/Project.toml`
[cfc395e8] ExtendableGrids v0.7.9
[5eed8a63] GridVisualize v0.2.12
[91a5bcdd] Plots v1.21.2
[d330b81b] PyPlot v2.9.0
[82b139dc] VoronoiFVM v0.12.6
I am getting (in a fresh directory):
julia> using VoronoiFVM
(vvv) pkg> status
Status `~/Wias/work/julia/test/vvv/Project.toml`
[82b139dc] VoronoiFVM v0.12.6
julia> flux!(y,f,edge,data)=nothing
flux! (generic function with 1 method)
julia> data = (D=1.0,)
(D = 1.0,)
julia> phys = VoronoiFVM.Physics(flux=flux!,data=data)
VoronoiFVM.Physics(num_species=0, data=NamedTuple{(:D,), Tuple{Float64}}, flux=flux!, storage=default_storage, source=nosrc, bsource=nosrc, generic_operator=nofunc_generic, generic_operator_sparsity=nofunc_generic_sparsity)
The isdata(::VoronoiFVM.AbstractData)
definition is very old and outdated. Are you sure that you are using the right environment etc. ? An explanation could be that you ran that code in the global environment which still uses an very old version...
Ahh it looks like the problem was because I didn't have IJulia
added to the environment and I was using a Jupyter notebook and it must have defaulted to the base environment with an older version of VoronoiFVM
.
On an unrelated note, is there an easy way to make flux/reaction/storage space- and/or time-dependent?
As for space dependency:
You can access the i-th coordinate(s) of a node as node[i]
and of an edge as
edge[i,1]
resp. edge[i,2]
. I see that this is not well documented.
As for time dependency: I put this on my todo list. It is easy to pass the current time in the node/edge struct, however I need to think about how to make this compatible with DifferentialEquations.jl.
Can you say more about the problem you are trying to solve ?
Let us continue the discussion in #19
I wanted to pass parameters with something like
but I get an error
I have not gotten this error before, so I was wondering if there's something with a recent update that might have prompted it. Thank you in advance!