Skip to content

Commit

Permalink
- Bump up the version
Browse files Browse the repository at this point in the history
- Add model dimensionality checks
  • Loading branch information
AkchurinDA committed Jan 4, 2025
1 parent 1bac46b commit 0bcf9b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Hephaestus"
uuid = "88b3b2ed-56ea-4eac-b1de-e42ac45953c8"
authors = ["Damir Akchurin <[email protected]>"]
version = "0.2.0"
version = "0.3.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
8 changes: 7 additions & 1 deletion src/Models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ struct Model{D}
distloads::Vector{DistributedLoad}

# Constructor:
Model(D::Int) = new{D}(
function Model(D::Int)
# Check the dimension of the model:
@assert D [2, 3] "Invalid model dimensionality. The model dimensional must be either 2 or 3."

# Initialize the model:
new{D}(
Vector{Node}(),
Vector{Section}(),
Vector{Material}(),
Vector{Element}(),
Vector{ConcentratedLoad}(),
Vector{DistributedLoad}())
end
end

"""
Expand Down

2 comments on commit 0bcf9b3

@AkchurinDA
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

Breaking changes

  • Dimensionality of a model is now carried as a parameter of Model() type.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/122408

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.0 -m "<description of version>" 0bcf9b3944e840ed3462aa82d73af769221222ac
git push origin v0.3.0

Please sign in to comment.