Skip to content

Commit

Permalink
Merge pull request #26 from WIAS-PDELib/feature/symgrad
Browse files Browse the repository at this point in the history
Add symmetric gradient operators
  • Loading branch information
pjaap authored Dec 3, 2024
2 parents 0845801 + 8e1d868 commit 2a536f9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# CHANGES

## next version
- added tests for explicit imports and undocumented names
- JuliaFormatter


### Added

- tests for explicit imports and undocumented names
- Runic.jl code formatting
- new operators `symgrad_Voigt` and `εV` for symmetric gradients in Voigt notation

## v0.8 November 1, 2024
- started changelog
- first registered version since repository move (fixed some URL links in the doc and readme)
Expand Down
4 changes: 2 additions & 2 deletions src/ExtendableFEM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using ExtendableFEMBase: ExtendableFEMBase, AbstractFiniteElement,
integrate_segment!, lazy_interpolate!, nodevalues,
nodevalues!, nodevalues_subset!, nodevalues_view,
norms, unicode_gridplot, unicode_scalarplot,
update_basis!
update_basis!, SymmetricGradient
using ExtendableGrids: ExtendableGrids, AT_NODES, AbstractElementGeometry,
Adjacency, AssemblyType, BEdgeNodes, BFaceFaces,
BFaceNodes, BFaceRegions, CellAssemblyGroups,
Expand Down Expand Up @@ -113,7 +113,7 @@ export print_table
include("unknowns.jl")
export Unknown
export grid, dofgrid
export id, grad, hessian, div, normalflux, tangentialflux, Δ, apply, curl1, curl2, curl3, laplace, tangentialgrad
export id, grad, hessian, div, normalflux, tangentialflux, Δ, apply, curl1, curl2, curl3, laplace, tangentialgrad, symgrad_voigt, εV

include("operators.jl")
#export AbstractOperator
Expand Down
17 changes: 17 additions & 0 deletions src/unknowns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,23 @@ alias for (u, TangentialGradient)
"""
tangentialgrad(u) = (u, TangentialGradient)

"""
symgrad_voigt(u, factor)
alias for (u, SymmetricGradient{factor}) in Voigt notation.
The `factor` is a real number applied to the (summed) off-diagonal entries.
In the current implementation in ExtendableFEMBase, factor = 0.5 represents the Voigt strain mapping [σ₁₁ σ₂₂ σ₃₃ σ₁₃ σ₂₃ σ₁₂],
while factor = 1.0 represents the Voigt strain mapping [ε₁₁ ε₂₂ ε₃₃ 2ε₁₃ 2ε₂₃ 2ε₁₂].
"""
symgrad_voigt(u, factor) = (u, SymmetricGradient{factor})

"""
εV(u, factor)
unicode alias for [`symgrad_voigt(u, factor)`](@ref).
"""
εV(u, factor) = symgrad_voigt(u, factor)

"""
grid(u)
Expand Down

0 comments on commit 2a536f9

Please sign in to comment.