refactor: unify field ordering

[skip ci]
This commit is contained in:
nebmit 2024-03-12 15:03:50 +01:00
parent deb71df259
commit 65a16cac1c
No known key found for this signature in database
3 changed files with 13 additions and 16 deletions

View File

@ -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,
)

View File

@ -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

View File

@ -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")