Skip to content

Commit

Permalink
Version 2.1.0 (#6)
Browse files Browse the repository at this point in the history
* Update src files

* Update tests

* Update docs

* Update project
  • Loading branch information
hwyschka authored May 5, 2023
1 parent 488c6cf commit b2640ed
Show file tree
Hide file tree
Showing 13 changed files with 1,335 additions and 195 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.vtu
docs/build/
logo/*
Manifest.toml
200 changes: 200 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.2"
manifest_format = "2.0"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "9c209fb7536406834aa938fb149964b985de6c83"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.1"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[deps.FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "fc86b4fd3eff76c3ce4f5e96e2fdfa6282722885"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "1.0.0"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.4.1"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c7cb1f5d892775ba13767a87c7ada0b980ea0a71"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.16.1+2"

[[deps.LightXML]]
deps = ["Libdl", "XML2_jll"]
git-tree-sha1 = "e129d9391168c677cd4800f5c0abb1ed8cb3794f"
uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179"
version = "0.9.0"

[[deps.LinearAlgebra]]
deps = ["Libdl", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.0"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "9a6ae7ed916312b41236fcef7e0af564ef934769"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.13"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.VTKBase]]
git-tree-sha1 = "c2d0db3ef09f1942d08ea455a9e252594be5f3b6"
uuid = "4004b06d-e244-455f-a6ce-a5f9919cc534"
version = "1.0.1"

[[deps.WriteVTK]]
deps = ["Base64", "CodecZlib", "FillArrays", "LightXML", "TranscodingStreams", "VTKBase"]
git-tree-sha1 = "7b46936613e41cfe1c6a5897d243ddcab8feabec"
uuid = "64499a7a-5c06-52f2-abe2-ccb03c286192"
version = "1.18.0"

[[deps.XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "93c41695bc1c08c46c5899f4fe06d6ead504bb73"
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version = "2.10.3+0"

[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MinFEM"
uuid = "bd0dc85c-d10e-11e8-1961-03914cacc29c"
authors = ["Martin Siebenborn <[email protected]>", "Henrik Wyschka <[email protected]>"]
version = "2.0.1"
version = "2.1.0"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
28 changes: 18 additions & 10 deletions docs/src/lib/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ Depth = 2
Entity
```

## Quadrature

```@docs
gausslegendre_points
gausslegendre_weights
compute_coordinates_line
compute_coordinates_triangle
compute_coordinates_tetrahedron
compute_weights_line
compute_weights_triangle
compute_weights_tetrahedron
parentcoordinates
```

## Mesh Import

```@docs
Expand All @@ -34,20 +48,14 @@ getGMSHElementTypeFromDim
getParentBoundary
```

## Quadrature
## Mesh Utility

```@docs
gausslegendre_points
gausslegendre_weights
compute_coordinates_line
compute_coordinates_triangle
compute_coordinates_tetrahedron
compute_weights_line
compute_weights_triangle
compute_weights_tetrahedron
base_jacobian
circleratio
```

## Utility
## FEM Utility

```@docs
stressTensor
Expand Down
10 changes: 10 additions & 0 deletions docs/src/lib/public.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ MinFEM

```@docs
Mesh
Region
Boundary
Domain
PDESystem
Expand All @@ -40,20 +41,24 @@ unit_interval
unit_square
import_mesh
export_mesh
update_mesh!
deform_mesh!
deform_mesh
```

### Type Handling
```@docs
select_boundaries
select_domains
extract_elements
extract_nodes
```

### Function Discretization
```@docs
evaluate_mesh_function
evaluate_quadrature_function
evaluate_quadrature_function_boundary
```

### Mesh (Element) Properties
Expand All @@ -62,8 +67,11 @@ jacobian
jacobian_boundary
elementvolume
elementvolume_boundary
elementbarycenter
elementdiameter
elementdiameter_boundary
elementratio
elementangle
outernormalvector
stripwidth
boundingbox
Expand All @@ -74,7 +82,9 @@ barycenter
### Local Quadrature
```@docs
quadrature_points
quadrature_points_boundary
quadrature_weights
quadrature_weights_boundary
quadrature_order
integral_over_reference_element
```
Expand Down
9 changes: 9 additions & 0 deletions src/MinFEM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export unit_square,
unit_interval,
import_mesh,
export_mesh,
update_mesh!,
deform_mesh!,
deform_mesh

Expand All @@ -36,19 +37,27 @@ export jacobian,
jacobian_boundary,
elementvolume,
elementvolume_boundary,
elementbarycenter,
elementdiameter,
elementdiameter_boundary,
elementratio,
elementangle,
outernormalvector,
stripwidth,
boundingbox,
volume,
barycenter

export quadrature_points,
quadrature_points_boundary,
quadrature_weights,
quadrature_weights_boundary,
quadrature_order,
integral_over_reference_element

export evaluate_quadrature_function,
evaluate_quadrature_function_boundary

export prolong_multivector,
restrict_multivector

Expand Down
18 changes: 1 addition & 17 deletions src/extensions.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
"""
barycenter(mesh::Mesh) -> Vector{Float64}
Returns vector of coordinates of the barycenter of the domain definded by the mesh.
"""
function barycenter(mesh::Mesh)
M = assemble_massmatrix(mesh)
vol = volume(mesh)
bc = zeros(Float64, mesh.d)
for j = 1:mesh.d
bc[j] = sum(M * evaluate_mesh_function(mesh, x->x[j])) / vol
end

return bc
end

"""
pnorm(p::Float64,v::AbstractVector{Float64}, mesh::Mesh;
qdim::Int64=1, order::Int64=1) -> Float64
Expand Down Expand Up @@ -119,7 +103,7 @@ function pnorm_boundary(p::Float64, v::AbstractVector{Float64}, mesh::Mesh;
E = assemble_basismatrix_boundary(mesh, boundaryElements=boundaryElements,
qdim=qdim, order=order)
t = abs.(E * v)
le = mesh.nboundelems * length(quadrature_weights(mesh.d-1, order))
le = mesh.nboundelems * length(quadrature_weights_boundary(mesh.d, order))
end
elseif mod(length(v), mesh.nboundelems*qdim) == 0
t = abs.(v)
Expand Down
Loading

2 comments on commit b2640ed

@hwyschka
Copy link
Member Author

Choose a reason for hiding this comment

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

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

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 v2.1.0 -m "<description of version>" b2640edd547c598a7d6f1779771a93372e0393a6
git push origin v2.1.0

Please sign in to comment.