diff --git a/julia/TUG/docs/make.jl b/julia/TUG/docs/make.jl index ca0b84a..a334bba 100644 --- a/julia/TUG/docs/make.jl +++ b/julia/TUG/docs/make.jl @@ -2,12 +2,12 @@ using Pkg using Documenter pkg_path = abspath(joinpath(@__DIR__, "..")) -Pkg.develop(path=pkg_path) +Pkg.develop(path = pkg_path) using TUG makedocs( - sitename="TUG Documentation", - modules=[TUG], - format=Documenter.HTML(), - remotes=nothing + sitename = "TUG Documentation", + modules = [TUG], + format = Documenter.HTML(), + remotes = nothing, ) diff --git a/julia/TUG/src/Boundary.jl b/julia/TUG/src/Boundary.jl index 4dac5d4..0d75f20 100644 --- a/julia/TUG/src/Boundary.jl +++ b/julia/TUG/src/Boundary.jl @@ -46,10 +46,7 @@ struct BoundaryElement{T} end function BoundaryElement{T}(value::T)::BoundaryElement{T} where {T} - if value < 0 - throw(ArgumentError("No negative concentration allowed.")) - end - new{T}(CONSTANT, value) + new{T}(TUG.CONSTANT, value) end end @@ -114,14 +111,14 @@ It includes the dimension of the grid and boundary elements for each side. """ struct Boundary{T} dim::UInt8 - cols::UInt32 rows::UInt32 + cols::UInt32 boundaries::Vector{Vector{BoundaryElement{T}}} function Boundary{T}(grid::Grid{T})::Boundary{T} where {T} dim = grid.dim - cols = grid.cols rows = grid.rows + cols = grid.cols boundaries = Vector{Vector{BoundaryElement{T}}}(undef, 4) if dim == 1 @@ -136,7 +133,7 @@ struct Boundary{T} throw(ArgumentError("Only 1- and 2-dimensional grids are defined!")) end - new{T}(dim, cols, rows, boundaries) + new{T}(dim, rows, cols, boundaries) end end diff --git a/julia/TUG/src/TUG.jl b/julia/TUG/src/TUG.jl index 448dd97..403b9c1 100644 --- a/julia/TUG/src/TUG.jl +++ b/julia/TUG/src/TUG.jl @@ -9,14 +9,14 @@ export clone, getAlphaX_t, getAlphaY_t, getConcentrations, - setConcentrations!, - setAlphaX!, - setAlphaY!, getDomainCol, getDomainRow, getDeltaCol, getDeltaRow, - getDim + getDim, + setAlphaX!, + setAlphaY!, + setConcentrations! include("Boundary.jl")